Update accessibility

This commit is contained in:
Pascal Serrarens 2023-03-30 13:06:50 +02:00
parent 6c0170e4cf
commit 3f3f7f4d77
2 changed files with 11 additions and 11 deletions

View File

@ -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 ||

View File

@ -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");