mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-17 18:40:33 +00:00
fix(Extentions): GetLocalPositionAndRotation and SetLocalPositionAndRotation
This commit is contained in:
parent
f61524863e
commit
e7b3aa77df
@ -114,6 +114,18 @@ public static void SetPositionAndRotation(this Transform transform, Vector3 posi
|
||||
transform.position = position;
|
||||
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
|
||||
|
||||
// IPEndPoint address only to pretty string.
|
||||
|
Loading…
Reference in New Issue
Block a user