# SetLocalPositionAndRotation(float3, quaternion)

> Sets the local (parent-relative) position and rotation to the provided values.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

```csharp
public void SetLocalPositionAndRotation(float3 position, quaternion rotation)
```

### Parameters

**** (\[float3]\(/engine/7000.0/script-reference/unity/mathematics/float3)): The new parent-relative position**** (\[quaternion]\(/engine/7000.0/script-reference/unity/mathematics/quaternion)): 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;

Additional Resources: [TransformRef.SetLocalTransform](/engine/7000.0/script-reference/unity/entities/transformref/setlocaltransform.md), [TransformRef.SetLocalTransform](/engine/7000.0/script-reference/unity/entities/transformref/setlocaltransform.md)
