0
\$\begingroup\$

No matter how thick the wall is, the player will glitch through. I've tried changing the settings on the rigidbody but nothing have worked. The walls fits together almost perfectly. Why is this happening?

I already searched a lot and also found a lot of questions regarding the same problem at "Unity Answers" - not a single one of them gets answered. I dont know why, it seems theyr community is almost dead.

\$\endgroup\$
5
  • \$\begingroup\$ could you please show the components on the wall and the player? im specifically interested in the colliders you have put on them. \$\endgroup\$ Apr 23, 2019 at 1:00
  • 1
    \$\begingroup\$ It's also useful to show the code you're using to move the player. A common error is moving a physics body with transform.position or transform.Translate, which takes the motion out or the control of the physics simulation to stop it at collision boundaries. \$\endgroup\$
    – DMGregory
    Apr 23, 2019 at 1:08
  • \$\begingroup\$ @ Kamran A box collider for the walls and a capsule collider for the character. @DMGregory i use position and translate, what should i use instead? \$\endgroup\$
    – MBrain
    Apr 23, 2019 at 1:36
  • \$\begingroup\$ See previous questions discussing this issue for some strategies, including use of Rigidbody members like velocity or AddForce, or using physics queries like shapecasts to check for free space before you translate. \$\endgroup\$
    – DMGregory
    Apr 23, 2019 at 1:43
  • \$\begingroup\$ Nice, the linked answer is great! Thank you! \$\endgroup\$
    – MBrain
    Apr 23, 2019 at 2:42

0

Browse other questions tagged .