PhysicsWorld.TransformChangeReason
Defines the reason why a Transform changed. Register and unregister for transform changes with PhysicsWorld.RegisterTransformChange and PhysicsWorld.UnregisterTransformChange.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Enum
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
[Flags]public enum PhysicsWorld.TransformChangeReason
Fields
Value | Description |
|---|---|
| Animation | The animation system wrote a physics-based world-space TRS change. |
| Any | Any transform change. |
| AnyLocal | The local position, rotation or scale of the transform changed. |
| AnyWorld | The world-space position, rotation or scale of the transform changed. |
| LocalPosition | The local position of the transform changed. This does not propagate to children or parent transforms. See _localPosition. |
| LocalRotation | The local rotation of the transform changed. This does not propagate to children or parent transforms. See _localRotation. |
| LocalScale | The local scale of the transform changed. This does not propagate to children or parent transforms. See _localScale. |
| ParentHierarchy | The parent transform hierarchy changed. Indicates that a direct or indirect parent has been added, removed or re-parented. |
| WorldPosition | The World-space position of the transform changed. Changing a parent results in an event in children transform too. See _position. |
| WorldRotation | The World-space rotation of the transform changed. Changing a parent results in an event in children transform too. See _rotation. |
| WorldScale | The World-space scale of the transform changed. Changing a parent results in an event in children transform too. See _lossyScale. |