My gameobject has a CapsuleCollider and I use CapsuleCast to check for horizontal collisions when moving horizontally so the gameobject won't pass thru obstacles. It works 100% of the time except when I select the gameobject in Hierarchy.

When I have the gameobject selected, whenever I try to bump a wall continuously, it shakes/jitters until it eventually goes thru the wall. But this only happens when I have the object selected in Hierarchy. If I click on the scene so that the object is not selected and do the exact same thing (bump a wall continuously), there is no shaking/jitter and it doesn't pass thru the wall no matter how long I bump it.

This passing in the wall when selected is also consistent. Hundred percent of the time it will pass thru when I have it selected (and does the shaking) and also hundred percent of the time it doesn't if I don't have the object selected. Shouldn't selecting an object don't have any effect on this? Please give me some ideas of why.

  • 1
    \$\begingroup\$ What you describe seems to be a bug coming from Unity and not from your code. The good part of it is that, once the game is build, no one will be able to select objects in the hierarchy anymore, so the issue will not happen. Doesn't seem like a real issue to me tbh. \$\endgroup\$ – lvictorino Oct 18 '19 at 12:46

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.