Changing gravity on the fly?
by Terra Snover · in Torque 3D Professional · 04/23/2011 (12:01 am) · 2 replies
I have been slamming my head on my desk trying to figure out how to change the gravity of my player character on the fly. Like they hit a trigger and the gravity of the character changes to the x axes (now the wall is the floor) they hit another trigger and the gravity changes the z, etc. So are there any thoughts? Thanks.
#2
Don't forget to turn your player over while you're at it - gravity doesn't rotate you in engine....
04/23/2011 (6:55 am)
You could make an arena like the one in Tron: Legacy. That sounds fun! Though it'd be timer based rather than trigger based.Don't forget to turn your player over while you're at it - gravity doesn't rotate you in engine....
Torque Owner Ivan Mandzhukov
Liman3D
Setting gravityMod to -1 will inverse the gravity in the zone.
In order to change gravity on each axis,you have to do some changes,because gravityMod and velocityMod are just floats,but not vectors. You could zero your gravity and work with mAppliedForce,it is a vector.