Game Development Community

How do I turn off gravity in T3D?

by Kevin Mills · in Torque 3D Beginner · 08/20/2011 (11:05 am) · 5 replies

I am somewhat new to the T3D community so this question may already be answered elsewhere. If so please point me in the right direction. I have gone into player.cpp and set mGravity=0 but this has had no effect. When recompiling the source code are there old files that need to be deleted first or something? I feel like the game is falling back onto some older files somehow, since changing the value to 0 does absolutely nothing. Thanks in advance.

#1
08/21/2011 (8:39 am)
You could use a Physical Zone to the level with gravityMod = 0, and adapt your player's movements to be able to move there.
#2
08/21/2011 (7:51 pm)
Hmm ok, Ill give that a shot. Thanks!
#3
08/22/2011 (1:52 am)
Just zero the z acceleration in updateMove()
#4
08/22/2011 (6:05 pm)
Which file contains updateMove()? Are you talking about in Player.cpp? If so I didn't see anything that referes tot he z-axis movement.
#5
08/23/2011 (5:40 am)
I'd say that's the line Ivan was talking about (line ~2147) :
// Acceleration due to gravity
   VectorF acc(0.0f, 0.0f, mGravity * mGravityMod * TickSec);