Vehicle Physics
by Jonathan Noyola · in Torque 3D Beginner · 07/19/2011 (10:35 pm) · 2 replies
I've been working for a few days on getting my vehicles to work in game, and I can't find any documentation (or even the confirmation of the existence) of vehicle collision physics.
For example, when a moving vehicle crashes into a still vehicle, one remains in place while the other pushes against it. Neither move. Vehicle on Player collision also has a number of problems.
If anyone could help me find a solution or point me in the right direction it would be greatly appreciated.
I know I didn't give a whole lot of detail, but I'm assuming this must be a problem others have run into and know about.
For example, when a moving vehicle crashes into a still vehicle, one remains in place while the other pushes against it. Neither move. Vehicle on Player collision also has a number of problems.
If anyone could help me find a solution or point me in the right direction it would be greatly appreciated.
I know I didn't give a whole lot of detail, but I'm assuming this must be a problem others have run into and know about.
About the author
I've been programming for 10 years now. Proficient in many programming languages. Stanford '16: BS CS, BS Math, MS CS (Artificial Intelligence). Favorite games: GW2, LoL, Borderlands, NWN2
#2
So I actually started using impulses to fake collision responses, because I figured it would come to that. Until I make the decision to purchase T3D Pro, would anyone like to work with me to create basic physics for collision responses? Or has anyone already done this?
EDIT: Doing a search for Henry Todd led me to many other threads on the same topic, and all of the fixes were for Pro users. Perhaps its time one of the fixes is included in the next release? I think this is a big issue that should be addressed soon. And I'll still be trying my own, non-source-change fixes.
07/20/2011 (12:48 pm)
Okay, that's what I assumed. While I am considering buying Pro at the amazingly low price, if you look at my resources you can tell that I'm a firm believer that almost anything can be done without source code changes, it just might take longer.So I actually started using impulses to fake collision responses, because I figured it would come to that. Until I make the decision to purchase T3D Pro, would anyone like to work with me to create basic physics for collision responses? Or has anyone already done this?
EDIT: Doing a search for Henry Todd led me to many other threads on the same topic, and all of the fixes were for Pro users. Perhaps its time one of the fixes is included in the next release? I think this is a big issue that should be addressed soon. And I'll still be trying my own, non-source-change fixes.
Associate Chris Haigler
Jester Dance
In your case, the best you're going to be able to do is "fake" the collision response by using the vehicle's onCollision method to test what kind of object was hit and depending on its type, apply an impulse (via applyImpulse()) to "push" it away from the vehicle.