OVRPlayerController dash implementation not working
I've been attempting to implement a dash into my game, but have not had any luck. It looks like pre-made code on the OVRPlayerController keeps my script from working, but I can't figure out what's going on. Here is what I have attempted to take the rigid body I threw on the player and force it forward when the left thumbstick is clicked in....
//dashing variables
public Rigidbody rb;
float speed = 5f;
void Start()
{
//grabs rigidbody for dashing
rb = GetComponent<Rigidbody>();
}
void FixedUpdate()
{
if (OVRInput.GetDown(OVRInput.Button.PrimaryThumbstick))
{
//Player dash forward script
rb.MovePosition(rb.position + Vector3.forward * speed * 2 * Time.deltaTime);
}
