I have a Runner
class, which is a Cube with Rigid Body increases speed gradually with codes in Update()
:
rigidbody.AddRelativeForce(new Vector3(speed, 0, 0), ForceMode.Acceleration);
When I collide with a non-rigid body (a primitive capsule), the Runner
stops by the capsule. I have applied the code to destroy the capsule upon collision, but the Runner
’s speed is still affected. How can the speed not to be affected by the collision? Did I need to set something on the capsule?