Update accessibility
This commit is contained in:
parent
6c0170e4cf
commit
3f3f7f4d77
@ -2085,7 +2085,7 @@ namespace Passer.Humanoid {
|
|||||||
hitNormal = Vector3.zero;
|
hitNormal = Vector3.zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsMyRigidbody(Rigidbody rigidbody) {
|
public virtual bool IsMyRigidbody(Rigidbody rigidbody) {
|
||||||
return
|
return
|
||||||
rigidbody != null && (
|
rigidbody != null && (
|
||||||
rigidbody == humanoidRigidbody ||
|
rigidbody == humanoidRigidbody ||
|
||||||
|
@ -13,17 +13,17 @@ namespace Passer.Humanoid {
|
|||||||
/// This is the HandTarget of the hand to which the socket is attached
|
/// This is the HandTarget of the hand to which the socket is attached
|
||||||
public HandTarget handTarget;
|
public HandTarget handTarget;
|
||||||
|
|
||||||
protected override void MoveHandleToSocket(Transform socketTransform, Handle handle) {
|
//protected override void MoveHandleToSocket(Transform socketTransform, Handle handle) {
|
||||||
DebugLog("MoveHandleToHand");
|
// DebugLog("MoveHandleToHand");
|
||||||
|
|
||||||
Transform handleTransform = handle.GetComponent<Transform>();
|
// Transform handleTransform = handle.GetComponent<Transform>();
|
||||||
Rigidbody handleRigidbody = handle.GetComponentInParent<Rigidbody>();
|
// Rigidbody handleRigidbody = handle.GetComponentInParent<Rigidbody>();
|
||||||
if (handleRigidbody != null)
|
// if (handleRigidbody != null)
|
||||||
handleTransform = handleRigidbody.transform;
|
// handleTransform = handleRigidbody.transform;
|
||||||
|
|
||||||
handleTransform.rotation = handle.RotationTo(socketTransform.rotation) * handleTransform.rotation;
|
// handleTransform.rotation = handle.RotationTo(socketTransform.rotation) * handleTransform.rotation;
|
||||||
handleTransform.position += handle.TranslationTo(socketTransform.position);
|
// handleTransform.position += handle.TranslationTo(socketTransform.position);
|
||||||
}
|
//}
|
||||||
|
|
||||||
protected override void MoveSocketToHandle(Transform socketTransform, Handle handle) {
|
protected override void MoveSocketToHandle(Transform socketTransform, Handle handle) {
|
||||||
DebugLog("MoveHandToHandle");
|
DebugLog("MoveHandToHandle");
|
||||||
@ -155,7 +155,7 @@ namespace Passer.Humanoid {
|
|||||||
DestroyedJoints destroyedJoints = objRigidbody.GetComponent<DestroyedJoints>();
|
DestroyedJoints destroyedJoints = objRigidbody.GetComponent<DestroyedJoints>();
|
||||||
|
|
||||||
// Check if we are grabbing a hand
|
// Check if we are grabbing a hand
|
||||||
BasicHandPhysics handPhysics = objRigidbody.GetComponent<BasicHandPhysics>();
|
BasicHandPhysics handPhysics = objRigidbody.GetComponentInParent<BasicHandPhysics>();
|
||||||
if (handPhysics != null) { // We are grabbing a hand
|
if (handPhysics != null) { // We are grabbing a hand
|
||||||
if (thisRigidbody == null) {
|
if (thisRigidbody == null) {
|
||||||
DebugLog("Cannot attach to hand because this handRigidbody is not present");
|
DebugLog("Cannot attach to hand because this handRigidbody is not present");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user