Game Development Community

Gravity and Physics In Torque

by EGUY · in Torque Game Engine · 02/13/2005 (11:18 am) · 1 replies

I've played around with Torque examples and I was wondering whether things can have negative weight and they fly up rather fall down. I want to include a jetpack in my game that would make the player's weight negative and then slowly increase it (to slow it down as the player reached the highest part of the jump) until it returned to the player's normal weight. Would this work?

I am also wondering about how Torque handles physics like if an object was thrown, can it bounce or would it just hit the ground?

#1
02/13/2005 (11:23 am)
I would suggest that you use more accurate physics in your description (and therefore, your implementation) of your desired functionality. Jet Packs (were they to actually exist!) in "real world" would simply be providing an acceleration in a specific direction to an object over time, and not cause a negative gravity scenario. Since TGE handles accelerations very well, you would achieve your effect very easily in the stock code--you could even take a look at how players jump (or move in the Z-axis in general) to see how to implement it.

An example you could view to see what I mean is in the Think Tanks demo, the jump pads that a tank can run over--as far as I can guess from "black box" observation, they just apply an impulse to the tank, and then let the rest of the physics code handle it.