How Physics.autoSyncTransforms Works in Unity

Using Rigidbody.MovePosition vs transform.position in Unity
Using Rigidbody.MovePosition vs transform.position in Unity
February 23, 2026
Command Buffers Explained in Unity
Command Buffers Explained in Unity
February 23, 2026
Using Rigidbody.MovePosition vs transform.position in Unity
Using Rigidbody.MovePosition vs transform.position in Unity
February 23, 2026
Command Buffers Explained in Unity
Command Buffers Explained in Unity
February 23, 2026

If you’ve ever moved an object using transform.position and noticed strange collision behavior, delayed raycasts, or inconsistent physics results, Physics.autoSyncTransforms might be involved.

This setting controls whether Unity automatically synchronizes Transform changes with the physics engine. Understanding how it works can prevent subtle bugs and improve performance.

What Is Physics.autoSyncTransforms?

Unity separates the Transform system from the Physics engine. When you move an object using Transform, the physics engine does not immediately know about that change.

Physics.autoSyncTransforms determines whether Unity automatically updates the physics engine whenever a Transform changes.

It is a global setting that affects the entire project.

Where to Find It

You can find it in:

Edit → Project Settings → Physics → Auto Sync Transforms

It can also be controlled via code.

Physics.autoSyncTransforms = true;

What Happens When It Is Enabled?

If enabled, Unity immediately synchronizes Transform changes with the physics system.

That means:

  • Raycasts see the updated position immediately
  • Collisions use the new Transform values instantly
  • Physics queries are always accurate after Transform changes

However, this comes with a performance cost.

What Happens When It Is Disabled?

If disabled, Transform changes are not synchronized immediately. Instead, Unity updates physics during the next physics step.

This improves performance but may cause temporary inconsistencies.

Example problem scenario:

transform.position = new Vector3(0, 5, 0);

RaycastHit hit;
if (Physics.Raycast(transform.position, Vector3.down, out hit))
{
    Debug.Log("Hit detected");
}

If autoSyncTransforms is disabled, the raycast might still use the old physics position.

Manual Synchronization

If autoSyncTransforms is disabled, you can manually sync transforms when needed.

transform.position = new Vector3(0, 5, 0);
Physics.SyncTransforms();

This forces Unity to update the physics engine immediately.

Use this carefully, as calling it frequently can hurt performance.

Why Unity Disabled It by Default

In older Unity versions, autoSyncTransforms was enabled by default. But automatic syncing caused unnecessary performance overhead, especially in large scenes.

Now, Unity disables it by default to encourage proper physics-based movement.

The recommended approach is:

  • Move physics objects using Rigidbody methods
  • Avoid mixing Transform movement with physics
  • Use manual sync only when absolutely required

When Should You Enable It?

Consider enabling it if:

  • You rely heavily on Transform-based movement
  • You perform frequent physics queries after Transform changes
  • You are prototyping and want simplicity over optimization

For production games, it is usually better to leave it disabled and follow physics best practices.

Common Mistake: Moving Rigidbody with Transform

This is a major source of confusion:

transform.position += Vector3.forward * Time.deltaTime;

If the object has a Rigidbody, this bypasses the physics engine. With autoSyncTransforms disabled, collisions and raycasts may behave incorrectly.

Instead, use:

void FixedUpdate()
{
    rb.MovePosition(rb.position + Vector3.forward * Time.fixedDeltaTime);
}

Performance Considerations

  • Automatic syncing adds overhead each time a Transform changes
  • Large scenes with many moving objects amplify the cost
  • Manual control gives better performance in complex games

Quick Comparison

SettingBehaviorPerformance
EnabledTransforms sync immediatelyLower
DisabledSync during physics stepHigher

Best Practice Summary

  • Do not move Rigidbody objects using Transform
  • Keep autoSyncTransforms disabled for performance
  • Use Rigidbody movement methods inside FixedUpdate
  • Call Physics.SyncTransforms only when necessary

Final Thoughts

Physics.autoSyncTransforms is one of those hidden settings that can quietly cause confusing behavior if misunderstood. It bridges the gap between Unity’s Transform system and its physics engine.

For stable and predictable physics, let the physics engine control movement whenever possible. Use manual synchronization only when you truly need it.

Leave a Reply

Your email address will not be published. Required fields are marked *


Skip to toolbar