generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Listening for hard collisions

Previous Thread :: Next Thread 
complexo is not online. 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 is not online. complexo
Joined: 07 Jan 2009
Total Posts: 1547
20 Jan 2017 02:56 PM
Bump
Report Abuse
complexo is not online. complexo
Joined: 07 Jan 2009
Total Posts: 1547
20 Jan 2017 05:34 PM
Bump
Report Abuse
pinballboy7 is not online. pinballboy7
Joined: 12 Mar 2009
Total Posts: 1485
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 is not online. 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
FIyingNarwhaI is not online. FIyingNarwhaI
Joined: 10 Apr 2012
Total Posts: 956
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 is not online. complexo
Joined: 07 Jan 2009
Total Posts: 1547
20 Jan 2017 07:18 PM
There's very little physics control overall.
Report Abuse
FIyingNarwhaI is not online. FIyingNarwhaI
Joined: 10 Apr 2012
Total Posts: 956
21 Jan 2017 04:04 AM
rip


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image