文档

Unity Engine

Download Unity

Unity Engine

SetLocalPositionAndRotation(float3, quaternion)

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

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
public void SetLocalPositionAndRotation(float3 position, quaternion rotation)

Parameters

position

The new parent-relative position

rotation

The new parent-relative rotation

Remarks

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