I have three main questions related to colliders & object transforms.
I have a missile and a shield. The shield is a simple quad with a rigidbody and boxcollider attached. The missile is an egg with a thruster. It has a rigidbody and collider attached.
In both questions I have the missile moving forward by:
transform.position + transform.forward * speed * time.deltatime
The shield is fixed in space a few units in front of the camera (at the moment).
Q1
When the missile collides with the shield it veers of at an angle, with its forward vector apparently pointing in the direction it is veering. That, i suppose, is what I would expect. What I do not expect is that after travelling, in what appears to be in a straight line, it begins to curve. What causes this curving behavior some time after the collision, and how would I correct that?
Q2
Sometimes the missile passes through the shield. This is not the typical miss that I would expect when an object is moving fast and between T1 and T2 its position moves past the collider. Rather, when travelling perpendicular towards the shield, it impacts the shield, stops, and then after what appear to be a bit of “struggle”, for lack of a better word, it begins to slowly pass through the shield before taking off at its normal speed. Is this normal? If so, what parameters are controlling whether, and how much the time it takes, to pass through the shield?
Q3- Can you recommend some good resources on the behavior of the physics engine and how it affects transforms and the changes that are user applied in scripts?