How to get the rotation ArcRotate Camera

How to get the rotation ArcRotate Camera, i mean i need to get the ARC camera wat it is looking at direction.

Hello :slight_smile: You can use getDirection Camera | Babylon.js Documentation ( with the (0,0,1) direction.


i want to rotate the avatar yaw base on camera rotation

If you want to apply transformations on an imported glb file, I recommend creating a new TransformNode, parent your glb to that node, and then apply the transformations in the node.

1 Like

Got it but the get direction from arc rotate camera is not giving correct value to rotate,

In the example just want to rotate the avatar based on the arc rotate camera

Can you please guide me to that

Can you be more specific on what you need? What is the effect you want to achieve? Can you show me any examples?

Well, it can’t. You would need to get absolute values. The values from the arcRotateCamera are on the alpha, beta and radius with radians from the target.

I guess the easiest if you don’t want to mess with converting values is to parent an abstractMesh to the camera and use lookAt (absolute position). Something like this (just roughly done, sry):

Want to impletemtnt second person camera with arc rotate camera

That is nearly not enough information to go on. “Second person camera” isn’t even a well defined concept like first or third person camera.