Game Development Community

Rotating gravity

by Hunter · in Torque X 2D · 03/01/2008 (12:09 pm) · 4 replies

Hey all,

Is it feasible in TXB to rotate the orientation of gravity? I see where gravity is defined and I can modify it along the Y axis, but I am having trouble getting it to work along the X axis. Currently it looks like gravity is defined as a float value, is it possible to redefine or override this as a vector value? Or is there a simpler way that I am overlooking?

Thanks for the help,

#1
06/24/2009 (3:55 pm)
I am not sure but I would like to find out if you can change gravity from a y only vector.


you know have it run 3x, 9y.



:?
#2
06/27/2009 (12:32 pm)
Where do you see gravity defined?
#3
06/27/2009 (12:39 pm)
Suppose you were to add a T2DForceComponent?
#4
06/27/2009 (7:57 pm)
With the TDForceComponent, I think you could do this with MasslessForce and then set the constant direction to the angle that you wanted. 0 = straight down and then clockwise through 90 = left, 180 = up, 270 = right.