In my project I have the following:
a large-ish number of fixed objects that don’t move, but have a “health” value.
a small number of moving objects that can collide with these fixed objects.
I need to do this:
- Upon a collision, the fixed object’s health value gets reduced by an amount that is dependent on the speed of the moving object.
- If the fixed object’s health value reaches zero, it is destroyed and the moving object continues to move with little (or preferably zero) impact on it’s velocity.
- If the health value doesn’t reach zero, the moving object bounces off as if it has hit an immovable object.
From looking around in the online docs, I’m wondering if this is even possible in Unity. It seems that once the collision has been detected, the response will occur. However, admittedly I’m new to Unity so I could be overlooking something glaringly obvious.