0
\$\begingroup\$

I am in a 3d environnement, when I jump, i'm calculating the hitPoint of the end jump. I want to know when I jump, if there is a GAP between my initial point, and the end point.

But I don't want to set any trigger in the Level Design...

My Initial Idea is to do Raycast each 5-6 steps, but I wonder if this is too much cost effective. MayBe it isn't ?

enter image description here

\$\endgroup\$
2
  • \$\begingroup\$ Depending on how your world is designed it might be enough to just check if the surface you jump from and the surface you land on are the same object or not. However this doesn't work if there are surfaces without a gap between them, or concave floors. \$\endgroup\$
    – tkausl
    Feb 3 '19 at 20:35
  • 1
    \$\begingroup\$ I will expand on the idea presented on first comment. I would look into creating groups, whether programmatically, or through the editor itself and tag them. Rather than per surface, instead per continuous platform / surface. These could be as simple as bounding boxes with an UID assigned to each one. \$\endgroup\$
    – ErnieDingo
    Feb 4 '19 at 0:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.