Simple 3D collision issue
I made this simple test collision scene:
The capsule has a default rigid body and the 2 red cubes have a standard box collider.
The capsule has this script to move it with the keyboard:
using UnityEngine;
public class player : MonoBehaviour
{
void FixedUpdate()
{
transform.Translate(Vector3.forward * Input.GetAxis("Vertical") * 4 * Time.fixedDeltaTime);
}
}
Collision between the capsule and the cubes happens, but the first one shakes, and finally is able to go through the cubes:
The capsule has a default scale, and the two cubes have a distance of 0.6 between them, so the capsule shouldn't go through.
If I increase the capsule's collider radius from 0.5 to 0.7, it doesn't go through anymore, but it still shakes when contacting the cubes. I tried to change rigid body collision detection from Discrete to Continuous or Continuous Dynamic, but it didn't change anything.
Your answer
Follow this Question
Related Questions
Collision or Triggers both not working. 3D. 1 Answer
Function called when a GameObject doesn't collide with ANYTHING 1 Answer
Collision between objects not being detected 0 Answers
Who collided first 0 Answers
How to make a bowl? 0 Answers