Game Development Community

Movement while in the air

by Jared Hoberock · in Torque Game Engine · 03/01/2002 (12:01 pm) · 7 replies

Is there a way I can make it so I can still control the movement of my player while I am jumping? So, I jump, and then want to change directions in mid air. Is this possible?

Thanks, D

#1
03/01/2002 (2:44 pm)
I hope not :P I'm happy to see that this "feature" is removed because it was pretty cheesy in Quake and Half-Life.

I'm sure there's a way, I believe movement is restricted to times when the feet of the object are touching the ground in order to prevent such unrealistic behavior.
#2
03/01/2002 (3:17 pm)
You could apply small forces to your player to shift him in air. I havent tested the jetting feature at all, but if its mostly there it wouldnt be hard to use that to control your player in air. Or you could build something similar. I believe you could do this in script if you wanted to by using the applyimpulse function.
#3
03/11/2002 (1:22 pm)
It's pretty easy to do things like this if you're not fazed by the thought of messing with the engine code. The updateMove member function of Player is where most of the player movement stuff occurs. Relevant to your question, in the version of that function that comes with the TGE SDK, it specifically only pays attention to the movement keys input if the player object's feet are touching a "runnable surface". You could remove that restriction (and possibly make the movement keys have less effect if the player's feet are not touching the ground) if you wanted air movement.
#4
03/11/2002 (3:18 pm)
Jumppack thread in the other forum, basically does what you are asking.
#5
03/12/2002 (4:56 am)
Uh, which other forum? I ran a forum search on "jumppack" and it didn't find anything.
Thanks,
D
#6
03/12/2002 (5:01 am)
Sorry, I found what you were talking about.
#7
03/18/2002 (3:36 pm)
A little annoying to read the same thread in two different forums... Anyway, Mr Baxter's solution here is what I was thinking of when replying in the other one.