Documentation

Unity Engine

Unity Engine

SetLocalPositionAndRotation(float3, quaternion)

Sets the local (parent-relative) position and rotation to the provided values.
Read time 1 minuteLast updated 6 days ago

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;