Hi,
I’m having problems converting this command to c#:
collision.rigidbody.velocity.x = (collision.transform.position.x - transform.position.x)*8;
I get the following error in c#:
Assets/Scripts/Player.cs(38,37): error CS1612: Cannot modify a value type return value of `UnityEngine.Rigidbody.velocity’. Consider storing the value in a temporary variable
Thanks in advance for any help.