Game Development Community

Gravity

by Edward Gardner · in Torque Game Engine · 08/23/2001 (6:57 pm) · 8 replies

What script is this set in?

I need to be able to have my little dudes jump a LITTLE higher ;)

#1
08/23/2001 (7:02 pm)
Carefull not to bounce off the sky! :)

I would be interested in this too, though mine is more of a passing interest. I found nothing in a quick search of the scripts, but that doesnt mean it isnt there. :)
#2
08/23/2001 (7:11 pm)
Try changing jumpForce in server/scripts/player.cs, that'll make him jump higher.

If I remember correctly the gravity is defined somewhere in the C++ code, don't have the code infront of me so I'm not sure on that one.

--Oli
#3
08/23/2001 (7:21 pm)
Setting jumpForce just increases the strength that the player's posesss for jumping, it doesn't change the gravity.

I think there should be some way to set the gravity in the mission scripts themselves. Something like this should be map specific, not server specific.
#4
08/23/2001 (7:48 pm)
I never implied that setting jumpForce changed gravity, but it'll make his "little dudes jump a LITTLE higher" and that was basically what he asked for.

--Oli
#5
08/23/2001 (8:12 pm)
Found it:

Line 619 in player.cs

jumpForce = 15.5 * 90;

the higher the number 15.5 (it starts at 9.soemthing), the more force you jump with. 90 is the mass of the player.

a shout out to Palisade on IRC for the solution.
#6
08/23/2001 (9:02 pm)
There are other uses for gravity people. I think he wants to know how to change the gravity. Search for

GravityMod

In the actual code. I think that is what you are after? I didnt try it out, but I think that is right (if not, just search for gravity in the code). Someone on the forums changed the gravity so that there wasnt any (they are making a space game). Search for space in the forums and you should find that thread. I think that they changed the gravity but I might be wrong.
#7
08/24/2001 (4:53 am)
Think the jump strength will suffice for now, but I will want to look into it later.

Thanks folks.
#8
08/24/2001 (11:35 pm)
I think gravityMod is right. It's usually -20.


Dark