Game Development Community

Minipulating gravity possible?

by Robert Ladner · in Torque Game Engine · 08/21/2005 (12:40 pm) · 3 replies

Is there a way to manipulate Gravity in torque Ex: you are in a room and you see a switch on the wall and you hit it and all of a sudden your character starts to fall to what use to be the ceiling of the room.

#1
08/21/2005 (2:32 pm)
Have you tried messing with physical zones?
#2
08/25/2005 (7:30 am)
A physical zone wouldn't be able to cause the reverted gravity effect. At most, it would simulate a large fan on the flow, pointing upwards.

Changing gravity properly should also change the up vector objects are using, and for that you'll need to pinpoint all areas in code where the objects relevant to your project "align themseleves up" and change the code accordling. Of the top of my head, the player rotation code would require a bunch of changes to align to anything other than Point3F(0, 0 1), and the collision code probably would need changes as well, since the Player collision code is anti-rotation.
#3
08/25/2005 (9:48 am)
I have successfully made it so the gravity can be specified by a vector (requires c++ changes). That is, the player will fall in any direction. I have not worked much with changing the player's up vector. There is a resource here that will get you started with changing the player's orientation.

I'll note that I simply changed the gravity for the Player class. If I were to do it again, I would probably go to at least the ShapeBase class, and perhaps even further up the hierarchy. That way, if you want other objects to be effected, they can.