Hi there!
So, I’m now programing the collision system for my game, and when my ship hits a asteroid two things happen:
- I loose control of my ship;
- The asteroid goes flying to a place very far away;
First how can I prevent the loss of control of my ship, and second, how can I prevent the asteroid from going to “a place very far away”, and instead just divert slightly its course?
The ship has a rigidbody with a mass of 1, and a capsule collider, while the asteroid (a cube, at this moment) has a rigidbody with a mass of 0.5 and a cube collider. Both rigidbodies are affected by gravity (which is 0 in this scene). At this moment the only scripts I’ve is the one to control the ship, the camera script, and nothing more.
So, how can I fix this?
Thanks in advance.
João Borrego