Gravity
by Lofwyre · in Torque X 2D · 12/12/2006 (11:09 am) · 12 replies
Very impressed with TorqueX.
It appears there is physics in the engine but I haven't found a way to have a ball drop using gravity, I can give it some directional movement and it will bounce off things, but not fall down. I imagine there must be a way to do this, something I'm missing?
Cheers
It appears there is physics in the engine but I haven't found a way to have a ball drop using gravity, I can give it some directional movement and it will bounce off things, but not fall down. I imagine there must be a way to do this, something I'm missing?
Cheers
#2
Thanks again for the assistance.
12/12/2006 (2:00 pm)
Thanks mate, so would that be constant force on the object (sprite) or somewhere in the level. I can't see a constant force for the selected object in the physics panel (just linear force which I'm using). Any clues in what menu / control panel I'm supposed to set constant force.Thanks again for the assistance.
#3
If it's not visible on the builder is it there in C# ?
12/13/2006 (3:16 am)
I am, too, looking for constant force.If it's not visible on the builder is it there in C# ?
#4
I just took a peek at TGBX and it doesn't look like the force component is in there yet so you'll need to add this by hand (i.e., in code). I'll add the issue as a bug in our database.
12/19/2006 (1:39 pm)
Force is handled a little differently in TorqueX than it was in TGB. In TGB there were some properties on the object to control force. I don't recall all of them but they were hard-coded. In TorqueX we have a force component. If you want to add forces to your object you add this component and then add a force. Gravity would simply be a MasslessForce with ConstantDirection=180 and ConstantDirectionIsWorldSpace=true. The strength is determined by the game (set min, max, and initial strength to all be the same on the force).I just took a peek at TGBX and it doesn't look like the force component is in there yet so you'll need to add this by hand (i.e., in code). I'll add the issue as a bug in our database.
#5
Cheers
12/19/2006 (2:01 pm)
AH, thanks very much for that, after reading through the docs I noticed the information on forces but its good to have a definate answer and some direction (no pun intended)Cheers
#7
I was with you all the way up until the 'MAMA' part. :)
01/07/2007 (8:36 pm)
Quote:I LOVE COMPONENTS! ....
I was with you all the way up until the 'MAMA' part. :)
#9
"My Mama says that alligators are ornery because they got all them teeth and no toothbrush."
...classic.
01/08/2007 (5:34 am)
Oh man, I just saw that movie on one of those fancy movie channels over the holidays at my folks place."My Mama says that alligators are ornery because they got all them teeth and no toothbrush."
...classic.
#10
Please help urgently it would be gratly appreciated.
Thank you
mel
04/04/2008 (2:57 am)
Can someone please give exact directions on how to get gravity using Torque X. I am trying to create a character wherby when he jumps he then falls back to the floor because at the moment he just stays floating in mid air.Please help urgently it would be gratly appreciated.
Thank you
mel
#11
07/23/2009 (3:45 pm)
As with Melanie, I need someone to detail for me how to apply gravity to an object so it will fall to the ground. Then I will apply an upward velocity to it to simulate a jump. I assume the T2DForceComponent would do this but Im not sure how to make it work properly.
#12
07/23/2009 (3:57 pm)
Got it! ForceComponent->Massless Force->Constant Direction must be 0. Be sure to apply a min, max and initial strength. (I had them all equal to 4 and it worked.)

Torque Owner Jason Cahill
Default Studio Name