0
votes

I'm using a character controller, which moves the character along a set path using ray casting: enter image description here

This works fine for moving by x and z axis, and I'm also able to land on objects if I hit them directly from top. But if I enter an object with a collider from the side, either pass through or get stuck: enter image description here

I assume this happens because the player is set to position itself along the raycast, and to avoid the player to teleport up on the platforms, I need the raycast to ignore them. Now this causes the new collision problem. Does anyone have any idea on how to work around this, so my player properly is colliding with the platforms? I'm using all physics inside a FixedUpdate(), and the path is created using the Tween plug-in, but I assume this issue would appear with any script using raycast in this manner.

1

1 Answers

0
votes

Add specific mask to those platforms, and in code where you calling ray cast, just add new variable for mask and there just don't select the platform mask.