Turn off gravity for certain AIPlayers ?
by Orion Elenzil · in Torque Game Engine · 02/01/2006 (1:46 pm) · 2 replies
I've tried a few things but not the right things apparently -
is there a way to disable gravity for certain AIPlayers ?
i'd like to pose a few bots around the scene for a quick demo
and don't have time to make the proper collision geometry to support them.
many thanks,
orion
is there a way to disable gravity for certain AIPlayers ?
i'd like to pose a few bots around the scene for a quick demo
and don't have time to make the proper collision geometry to support them.
many thanks,
orion
About the author
Associate Manoel Neto
Default Studio Name
In player.h
In player.cc:
It's defined as a static, so it's the same for all players. Remove the static definition, and move the initialization to inside of the Player class constructor. Then you'll need to add some code to change it's value (setGravity() and getGravity(), going by the engine standards), create console methods to expose those to script, and add mGravity to the network ghosting process, so you can change it on the server and make it change on the client as well.
But be aware that it'll only affect the downward force that affects the player (the gravity isn't even a vector).