# Rotate PhysicsBody around scene's axis

**URL:** <https://forum.babylonjs.com/t/rotate-physicsbody-around-scenes-axis/50839>\
**Category:** Questions\
**Tags:** physics, rotation\
**Created:** [May 26, 2024, 2:16am UTC](https://forum.babylonjs.com/t/rotate-physicsbody-around-scenes-axis/50839 "2024-05-26T02:16:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![whale](https://avatars.discourse-cdn.com/v4/letter/w/85f322/32.png) [@whale](https://forum.babylonjs.com/u/whale)\
**Post date:** [May 26, 2024, 2:16am UTC](https://forum.babylonjs.com/t/rotate-physicsbody-around-scenes-axis/50839/1 "2024-05-26T02:16:50Z")

</div>

I’m working on my version of a labyrinth.

> **[Babylon.js Playground](https://playground.babylonjs.com/#JGP1I7)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

According to this playground example, I can manage the rotation of meshes to decide whether they should rotate around their own axis or the scene’s axis.

> **[Babylon.js Playground](https://www.babylonjs-playground.com/#2JKA91)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

However, I’m having issues applying the same behavior with a PhysicsBody. In other words, are there any ways to rotate my PhysicsBody around the Z-axis of the scene instead of its own axis when I press KeyJ or KeyL?

---

<div class="post-metadata">

**Author:** ![HiGreg](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@HiGreg](https://forum.babylonjs.com/u/HiGreg)\
**Post date:** [May 26, 2024, 8:39am UTC](https://forum.babylonjs.com/t/rotate-physicsbody-around-scenes-axis/50839/2 "2024-05-26T08:39:57Z")

</div>

I think your issue is related to physicsBody.disablePreStep, which for performance reasons is normally true. If you want to modify the physicsBody position or rotation outside the control of the physics engine, set disablePreStep = false until the next scene.onAfterPhysicsObservable.

You can [read about disablePreStep here](https://doc.babylonjs.com/features/featuresDeepDive/physics/perfTips).
