Question by
EnzoMilanese · Aug 02, 2020 at 02:52 PM ·
physicsrigidbodycollider3d
Player passing through walls when in corners
This is what is happening: https://youtu.be/0Pt-Mjz8WfU
The character is stopped by the colliders in the walls but if I continue to walk towards an corner, it goes through the colliders.
The character's rigidbody and capsule collider: Both walls have box colliders within them.
The code that governs the player walk is this: void FixedUpdate() { movement = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical")); _rigidBody.MovePosition(_rigidBody.position + movement * Velocity * Time.deltaTime); //Velocity = 10 ...
e6c9e9ca-0e16-4fb6-8fdb-2a500dd9eb99.jpg
(47.7 kB)
Comment
Your answer
Follow this Question
Related Questions
Player moving though walls while pressing two keys 0 Answers
Unity 5 Cloth Colliders inflating mesh 1 Answer
How to fix this problem? 1 Answer