文档

Unity Engine

Download Unity

Unity Engine

GetLocalPositionAndRotation(out float3, out quaternion)

Gets the local (parent-relative) position and rotation.
阅读时间1 分钟最后更新于 20 天前

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule

GetLocalPositionAndRotation(float3, quaternion)

public void GetLocalPositionAndRotation(out float3 position, out quaternion rotation)

Parameters

position

The parent-relative position will be stored here

rotation

The parent-relative rotation will be stored here

Remarks

This function gives identical results to the following operations, but is more efficient:
position = transformRef.LocalPosition; rotation = transformRef.LocalRotation;