01-06-2020 11:39 AM
void Update()
{
if (ovrGrab.isGrabbed)
{
if (OVRInput.Get(gripR))
{
rightHand = true;
}
if (OVRInput.Get(gripL))
{
rightHand = false;
}
if (nextFire > 0)
{
nextFire -= Time.deltaTime;
allowFire = true;
return;
}
if (allowFire)
{
if(OVRInput.Get(gripR))
{
if(rightHand)
{
if (OVRInput.Get(FireR, handR))
{
nextFire = FireRate;
allowFire = false;
simple.FireAway();
}
}
}
else if (OVRInput.Get(gripL))
{
if (!rightHand)
{
if (OVRInput.Get(FireL, handL))
{
nextFire = FireRate;
allowFire = false;
simple.FireAway();
}
}
}
}
}
}
}
[code\]
Solved! Go to Solution.
01-06-2020 01:31 PM
Now after alot of digging into forums, docs, youtube and many other areas, I just happened to stumble onto my answer. For whatever reason this works. If you are having issues like I was, this should fix your problem. Where I put OVRInput.Button can be assigned as a variable like so :Code (CSharp):
public OVRInput.Button button;I hope this helps those that need it.Code (CSharp):
(OVRInput.Get(OVRInput.Button, OVRGrabbable.grabbedBy.GetController()));
01-06-2020 01:31 PM
Now after alot of digging into forums, docs, youtube and many other areas, I just happened to stumble onto my answer. For whatever reason this works. If you are having issues like I was, this should fix your problem. Where I put OVRInput.Button can be assigned as a variable like so :Code (CSharp):
public OVRInput.Button button;I hope this helps those that need it.Code (CSharp):
(OVRInput.Get(OVRInput.Button, OVRGrabbable.grabbedBy.GetController()));