0
\$\begingroup\$

In episode 10 of Sebastian Lague's "[Unity] Creating a 2D Platformer" series, he creates a jump through platform by using "Continue;" in his vertical collisions script.

This worked great for a jump through platform, but when used by an object that I want to interact with, but not colliding with like a regular platform, problems come up.

When the player is complete covered, collision acts up. Because "Continue" makes the player fall through the platform a bit before correcting itself.

Gif of the problem

Ignore the weird lines caused by the compressed gif.

What I want to do is be able to interact with objects without colliding with them. I use raycast2d collision to do this, it's from his video.

Here's the part of the video where he programs it. https://youtu.be/rVfR14UNNDo?t=268

If there's any other info you'd like, just let me know. Thanks

\$\endgroup\$
0
\$\begingroup\$

Solved! I have one set of raycast2d (Raycast2D hit) for platforming collision and another set of raycast2d (Raycast2D Touched) for objects you interact with, but don't collide with like platforms.

Thanks for your help! As always, I greatly appreciate it.

\$\endgroup\$
  • \$\begingroup\$ This answer would be even better if it walked the reader through a sample of how to apply this fix to the code / scene setup you were using. \$\endgroup\$ – DMGregory Nov 4 at 14:32

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.