fix(Extentions): GetLocalPositionAndRotation and SetLocalPositionAndRotation

This commit is contained in:
MrGadget 2024-10-29 17:43:44 -04:00
parent f61524863e
commit e7b3aa77df

View File

@ -114,6 +114,18 @@ public static void SetPositionAndRotation(this Transform transform, Vector3 posi
transform.position = position; transform.position = position;
transform.rotation = rotation; transform.rotation = rotation;
} }
public static void GetLocalPositionAndRotation(this Transform transform, out Vector3 position, out Quaternion rotation)
{
position = transform.localPosition;
rotation = transform.localRotation;
}
public static void SetLocalPositionAndRotation(this Transform transform, Vector3 position, Quaternion rotation)
{
transform.localPosition = position;
transform.localRotation = rotation;
}
#endif #endif
// IPEndPoint address only to pretty string. // IPEndPoint address only to pretty string.