I have a problem I don’t know how to solve.
I am making an excavator which can dig holes in the terrain.
I have, on the scoop, a Rigidbody, which lowers the height map of the terrain on contact, using OnCollissionEnter
The Rigidbody has to be non kinematic in order for this function, however there is an unfortunate side effect that sometimes when the non-kinematic rigid body comes into contact with the terrain it knocks it out of position.
So, it has to be non-kinematic in order to make an effect upon the terrain, but it also has to be kinematic in order to stay in place.
Any idea how I can solve this?
You can set your handle rigidbody to be kinematic and make your collider on that handle to be trigger. This way you can receive OnTriggerEnter function when your handle collides with the terrain. Now all you need to check is if the other collider is terrain from the script attached to your handle.