I am trying to write this:
public void Speedboost(Rigidbody m_Rigidbody)
{
Vector3 OriginalSpeed = m_Rigidbody.velocity;
}
I want to access the velocity of the Rigidbody, but it triggers an error that says:
'Rigidbody' does not contain a definition for 'velocity'
I can be certain that this command exist, so why isn't this working?
I would appreciate any help, thanks in advance!
Here's an official unity link to that exact command:
https://docs.unity3d.com/ScriptReference/Rigidbody-velocity.html
↧