I've been messing around with aschar and aircontrols, and I've got some semblance of flight going on. Not all of the variables are commented, though, and after several hours, I'm having trouble getting it all to my liking.
As it stands, one has nigh unlimited jump fuel. I eliminated a check for y-velocity, so you can re-engage the jump even after you begin to fall, but I can't get any additional altitude out of it, just a glide. Does anyone know what I'm missing?
Help with mod?
Re: Help with mod?
Hmm, you would need to nullify the effects of gravity while flying. Something like applying a force upwards to balance gravity while you are airborne.
Re: Help with mod?
I think jump works like this:
1) when you press the jump key while you're on the ground, apply a force to push you up
2) if the jump key is kept pressed down, ignore gravity -> the same force pushes you farther than it would with gravity
3) once jump fuel runs out or jump key is released, gravity starts affecting the character, slowing his ascent and then turning it into a descent
If it works like that (it's been a while though, I might remeber it wrong), you need to apply upwards force to the character in addition to nullifying gravity.
1) when you press the jump key while you're on the ground, apply a force to push you up
2) if the jump key is kept pressed down, ignore gravity -> the same force pushes you farther than it would with gravity
3) once jump fuel runs out or jump key is released, gravity starts affecting the character, slowing his ascent and then turning it into a descent
If it works like that (it's been a while though, I might remeber it wrong), you need to apply upwards force to the character in addition to nullifying gravity.
-
- Posts: 54
- Joined: Sun Nov 28, 2010 8:27 pm
Re: Help with mod?
Thanks for the replies, guys!