How to Disable double jump

I set up a simple sphere control. With the jump function I run into the issue of being able to press space continously and then “fly” with the sphere.
i did event tick with linetrace by channel and its working but when my ball goes up heigher the linetrace do not following the location, its only working on flat ground. how can i set to follow the ball location continuosly.

Try it like so:


Also, you do not need to run this onTick. You could test it only when you press jump.

Perfect, Thank you!

Can i ask why the line trace not working? just for learn something new :slight_smile:

when its collideing shows true and falls at the same time, it is normal?

A line trace would work too, but we need to use the entire vector rather than just Z. In your example the trace was only checking world coordinate x:0, y:0. If the ball ever moved away from the world centre, the results would be inaccurate.

You can enable debug on the trace nodes to visualise what the trace is doing. if you Tick it, set it to For One Frame:


Besides the vector, a sphere is a volume, it may be more handy to trace with a sphere - perhaps there are some edges or ramps, or nooks & crannies. Kind of depends on how the level is made and how you want it to work.

i see, Thanks again! <3

Looks normal to me.

Red is just a Ttrace, Green is a Hit. When you’re on the ground, you trace and hit. When in the air, we still trace, but can’t hit the ground.