my actor floats to the top??? help please
Hipster_Owl_Studios
Member, PRO Posts: 214
Im trying to make my actor jump by making a button and i got that part working thanks to some guys on the fourm(thanks!) but the problem is when i press the jump button he jumps but then he jst floats up to the top he doesnt come back down? i cant figure it out can someone please help me thanks!
Comments
Two ways to make your actor come back down, dont know which one you prefer to use, either make sure gravity on Y is set to about 270 or so (dont know why thats just what I use) on the scene attributes, then, assumin you have a boolean for "jump pressed" true or false, put the jump acceleration on a timer
rule
game.jump = true
timer
for 0.4 seconds
accelerate 90 degrees relative to scene
The other (and recommended) way is NOT to use gravity, but to put a downward acceleration on your actor to simulate gravity. Probably less processor hungry than than usin gravity, dont know just read it somewhere!!
I realise this is a bit vague, but as I say, im only just learnin myself!!
Hope this helps
Marc
So... switch one gravity to something like 300.
When Spacebar is pressed:
For 1.5 seconds (check run to completion)
Accelerate upwards at 200
And that's all there is to it. Tweak to your liking