There is a problem with Carlos3DGS' solution, you have no actual jumping curve and thus the jump will feel unnatural and not smooth. Additionally, when the ceiling's surface is not orthogonal to the z-axis, your player will probably slide along the ceiling because of the GLIDE option and it's upwards movement won't be stopped (because then result > 0).

Quote:
This works well, but whenever less than half of the player entity hits the ceiling, he continues to stay floating, most likely because of the ellipsoid collision system being used when hitting blocks.

Then either remove my.max_z or decrease the factor.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends