- Home /
AddTorque not increasing relativeVelocity magnitude of a collision
I have 2 rigidbody objects that will collide with each other. One is spinning (like a propeller) using Rigidbody.AddTorque()
in FixedUpdate()
and the player will control this object and must 'smash' it with the other object.
Now I'm trying to calculate the force at which the propeller object impacts the other object.
I've been using if (collision.relativeVelocity.magnitude > minimumMagnitude)
(if true, then apply damage, if not, then no damage is applied) to measure this force and so far with other objects that are not spinning using AddTorque()
, this works quite well, but for some reason the AddTorque()
is not adding to the relativeVelocity so the measured number is always quite a lot lower than it's supposed to be.
What am I doing wrong here?
Velocity is a speed in one direction. If you have no displacement you have no velocity.
What you are looking for is Angular Velocity.
I see, so in other words velocity (and thus collision.relativeVelocity
) is only for 'movement' and does not measure rotational forces. Since I need to measure the force of impact between two objects, and there is no such collision.relativeAngularVelocity
how do I do this?
Answer by meat5000 · Apr 03, 2016 at 01:17 PM
You can use
collision.rigidbody.angularVelocity
to find the Angular Velocity from the other colliding object.
Your answer
Follow this Question
Related Questions
Rigidbodies won't collide if mass difference is too high 0 Answers
Character Controller meets Rigidbody 1 Answer
How to get collisions on Character controller? 1 Answer
Rigidbody.MovePosition/MoveRotation Hits far away colliders 2 Answers
Jump Boost 0 Answers