Answers for "how to make rb.addforce 2d"

C#
6

how to make rb.addforce 2d

public Rigidbody rb; //make reference in Unity Inspector

public float SpeedX = 0.1f;
public float SpeedY = 0.5f;

rb.AddForce(new Vector2(SpeedX, SpeedY));
Posted by: Guest on June-24-2020

C# Answers by Framework

Browse Popular Code Answers by Language