Humanoid Control for Unity v4
|
A Socket attached to a hand.
Public Types | |
enum | AttachMethod { Unknown , Parenting , ReverseParenting , Joint , StaticJoint , ColliderDuplication } |
Public Member Functions | |
override bool | Attach (Handle handle, bool rangeCheck=true) |
Tries to attach the given Transform to this socket. | |
override void | AttachStaticJoint (Transform objTransform) |
override void | Release (bool releaseSticky=false) |
Releases a Transform from the socket. | |
override void | ReleaseStaticJoint () |
void | Attach (GameObject objectToAttach) |
bool | Attach (GameObject objectToAttach, bool rangeCheck) |
virtual bool | Attach (Transform transformToAttach, bool rangeCheck=true) |
Tries to attach the given Transform to this socket. | |
void | OnDrawGizmosSelected () |
Static Public Member Functions | |
static Mesh | GenerateGizmoMesh1 () |
static Mesh | GenerateGizmoMesh () |
Public Attributes | |
HandTarget | handTarget |
The handTarget of the socket. | |
GameObject | attachedPrefab |
A prefab which is used to attach to the socket at startup. | |
Transform | attachedTransform |
The Transform attached to this socket. | |
Handle | attachedHandle |
string | socketTag |
A tag for limiting which handles can be held by the socket. | |
AttachMethod | attachMethod = AttachMethod.Unknown |
bool | destroyOnLoad = false |
GameObjectEventHandlers | attachEvent |
A GameObject Event for triggering changes in the Transform held by the Socket. | |
Protected Member Functions | |
override void | MoveSocketToHandle (Transform socketTransform, Handle handle) |
override void | MassRedistribution (Rigidbody socketRigidbody, Rigidbody objRigidbody) |
override bool | AttachRigidbody (Rigidbody objRigidbody, Handle handle, bool rangeCheck=true) |
override void | AttachRigidbodyParenting (Rigidbody objRigidbody, Handle handle) |
override void | AttachRigidbodyJoint (Rigidbody objRigidbody, Handle handle) |
override void | AttachSocketParenting (Rigidbody objRigidbody, Handle handle, Rigidbody socketRigidbody) |
override void | ReleaseRigidbodyJoint () |
override void | ReleaseSocketParenting (Rigidbody objRigidbody, Transform socketTransform) |
override void | ReleaseStaticObject () |
override void | MassRestoration (Rigidbody socketRigidbody, Rigidbody objRigidbody) |
virtual void | MoveHandleToSocket (Transform socketTransform, Rigidbody handleRigidbody, Handle handle) |
virtual void | MoveHandleToSocket (Transform socketTransform, Handle handle) |
virtual void | MoveRailToSocket (Transform socketTransform, Transform railTransform, Handle rail) |
virtual void | MoveSocketToHandle (Transform socketTransform, Rigidbody socketRigidbody, Handle handle) |
void | AttachTransformParenting (Transform objTransform, Handle handle) |
virtual void | AttachRigidbodyReverseJoint (Rigidbody objRigidbody, Handle handle) |
Attach handle to socket using a static joint on the handle. | |
virtual void | AttachSocketParenting (Transform objTransform, Handle handle, Rigidbody thisRigidbody) |
virtual bool | AttachStaticObject (Transform objTransform, Handle handle) |
virtual void | AttachStaticJointRotY (Transform objTransform) |
IEnumerator | ClearReleasingTransform () |
virtual void | ReleaseRigidbodyParenting () |
void | ReleaseRigidbodyReverseJoint () |
void | ReleaseSocketParenting (Transform objTransform) |
void | ReleaseTransformParenting () |
virtual void | Awake () |
virtual void | Update () |
void | UpdateHolding () |
virtual void | OnSceneUnload (UnityEngine.SceneManagement.Scene _) |
Static Protected Member Functions | |
static void | DebugLog (string s) |
Protected Attributes | |
Transform | releasingTransform |
Transform | attachedTransformParent |
The parent of the attached transform before it was attached. | |
RigidbodyDisabled | rigidbodyDisabled = null |
float | originalMass = 1 |
bool | originalUseGravity = false |
Mesh | gizmoMesh |
Static Protected Attributes | |
static string[] | attachEventTypeLabels |
Properties | |
bool | isOccupied [get] |
Does the socket currently have a handle attached? | |
|
protectedvirtual |
Reimplemented from Passer.Socket.
|
protectedvirtual |
Reimplemented from Passer.Socket.
|
virtual |
Tries to attach the given Transform to this socket.
If the Handle has the right Socket Tag it will be attached to the socket. Static and Kinematic Rigidbodies will be attached by parenting. Non-Kinematic Rigidbodies will be attached using a joint.
handle | The Handle to attach to this socket |
Reimplemented from Passer.Socket.
|
protectedvirtual |
Reimplemented from Passer.Socket.
|
protectedvirtual |
Reimplemented from Passer.Socket.
|
protectedvirtual |
Reimplemented from Passer.Socket.
|
protectedvirtual |
Reimplemented from Passer.Socket.
|
virtual |
Reimplemented from Passer.Socket.
|
virtual |
Releases a Transform from the socket.
Note that if the Transform is not taken out of the range of the socket or held by another Socket, it will automatically snap back to the Socket.
Reimplemented from Passer.Socket.
|
protectedvirtual |
Reimplemented from Passer.Socket.
|
protectedvirtual |
Reimplemented from Passer.Socket.
|
protectedvirtual |
Reimplemented from Passer.Socket.
|
virtual |
Reimplemented from Passer.Socket.
|
protectedvirtual |
Reimplemented from Passer.Socket.
|
virtualinherited |
Tries to attach the given Transform to this socket.
If the Transform has a Handle with the right Socket Tag it will be attached to the socket. Static and Kinematic Rigidbodies will be attached by parenting. Non-Kinematic Rigidbodies will be attached using a joint.
transformToAttach | The Transform to attach to this socket |
HandTarget Passer.Humanoid.HandSocket.handTarget |
The handTarget of the socket.
This is the HandTarget of the hand to which the socket is attached
|
inherited |
The Transform attached to this socket.
If the socket holds a Handle, this will contain the Transform of the Handle. It will be null otherwise
|
protectedinherited |
The parent of the attached transform before it was attached.
This is used to restore the parent when the transform is released again.
|
inherited |
A tag for limiting which handles can be held by the socket.
If set (not null or empty) only Handles with the given tag will fit in the socket.
|
staticprotectedinherited |
|
inherited |
A GameObject Event for triggering changes in the Transform held by the Socket.