Hey guys, I have VERY little info on this, so I know answers may not be perfect but it would be great if I could get some guesses or recommendations. In my game, there is a ball constantly hitting an object in my scene.
The issue is sometimes the ball goes through the object. The ball’s collision detection is set to Continuous, and the object’s collision detection is set to Continuous Dynamic. That’s how people with this problem normally solve it. I never edit the transform of the ball directly I always use something like Vector3.move towards so the collision system is always informed of what’s going on. I have tried setting both collision detections to Continuous Dynamic at the same time, but nothing has worked! The ball going through the object is a rare occasion like probably 1 in 30, but definitely enough for somebody who plays a good bit. Does anybody have any guesses or recommendations on how to solve this?
If it helps, the object with collision detection on Continuous Dynamic is a kinematic.
EDIT: Sometimes I do edit the rotation directly.
Ok, so I probably fixed the issue, I now edit the position via the rigidbody. Using Vector3.MoveTowards is not part of the rigidbody. I still have some scripts that edit the position of some objects directly but I thought it would be okay to leave it since those objects are gonna become irrelevant to the player. While editing the transform directly to one object will effect that part of the physics system will it messup the physics for the rest of the game, or just that object?
Changing transform of a game object with a rigid body will affect the game object in question and in reverse all other rigidbodies that may interact with it. If a ball tunnels through the paddle, so could the paddle tunnel through the ball. It‘s only a question of point of view.