How to make the characters always facing the front, no matter how the camera rotates?

DEMO: Physics V3 Simple scene with Aggregate | Babylon.js Playground (babylonjs.com)

No matter how the camera rotates, when holds W, the character walks forward, the orientation is always forward

This is the effect I want.
Uploading: 1693468035062.mp4…
video:https://pan.baidu.com/s/1hnLni-wMWApcEE0FXLG0Zw?pwd=9j7t
metaverse-third-three

Hello!

Instead of using the camera target, parent the camera to your character root and position it accordingly: Physics V3 Simple scene with Aggregate | Babylon.js Playground (babylonjs.com)

I detached the camera controls, since what we want of the mouse movement is to rotate the character, not the camera, you just have to add that part :slight_smile:

1 Like

In this case, the camera’s rotation zoom and so on is gone.
I want to keep these functions


I added this code, and the characters can always face the front.

But why is-1.6, I don’t understand, this value is experimented by me, is there any more correct way of writing?

And after adding this code, when holding w, i can’t move forward

You can implement the zoom manually