complexo
|
  |
| Joined: 07 Jan 2009 |
| Total Posts: 1547 |
|
|
| 20 Jan 2017 06:30 AM |
Any ways to do this? Simply listening for touch events then grabbing the velocity of the toucher won't do, because that would make a gentle brushing from a fast object be regarded as a solid collision. Also if an object is already touching another object, I'm not sure a touch event would be triggered if one of the objects is suddenly pushed hard into the other. |
|
|
| Report Abuse |
|
|
complexo
|
  |
| Joined: 07 Jan 2009 |
| Total Posts: 1547 |
|
| |
|
complexo
|
  |
| Joined: 07 Jan 2009 |
| Total Posts: 1547 |
|
| |
|
|
| 20 Jan 2017 05:37 PM |
| Afaik, your best bet is tracking the velocity of objects and checking the last velocity before collision to decide how hard the collision was. |
|
|
| Report Abuse |
|
|
complexo
|
  |
| Joined: 07 Jan 2009 |
| Total Posts: 1547 |
|
|
| 20 Jan 2017 06:05 PM |
I could try having a variable called "lastVelocity".
Then every time the velocity of an object changes: 1) deltaV = Part.Velocity-lastVelocity 2) deltaV = Part:GetMass() * deltaV/(combinedMassOfTouchingParts) 3) The lastVelocity of all touching parts is changed by -deltaV, and so this allows unmoving parts to detect hard impacts, the function usually called by a change in velocity is run.
It's not perfectly accurate, since the way momentum is divided over touching parts is only an approximation |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2017 06:12 PM |
Is there no way to detect the Impulse of an object against another? Come on ROBLOX.
|
|
|
| Report Abuse |
|
|
complexo
|
  |
| Joined: 07 Jan 2009 |
| Total Posts: 1547 |
|
|
| 20 Jan 2017 07:18 PM |
| There's very little physics control overall. |
|
|
| Report Abuse |
|
|
| |
|