Added TouchedStaticObject
This commit is contained in:
parent
870b5a5546
commit
6c94ef65f8
@ -911,6 +911,17 @@ namespace Passer.Humanoid {
|
||||
public bool twoHandedGrab = false;
|
||||
public Vector3 targetToSecondaryHandle;
|
||||
|
||||
public bool TouchedStaticObject() {
|
||||
if (touchedObject == null)
|
||||
return false;
|
||||
|
||||
Rigidbody rb = touchedObject.GetComponent<Rigidbody>();
|
||||
if (rb == null || rb.isKinematic)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool GrabbedStaticObject() {
|
||||
if (grabbedObject != null && grabbedRigidbody && grabbedKinematicRigidbody)
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user