How to stop camera from jumping when player jumps

Hi guys,

I would like to stop ArcRotateCamera from moving upwards when my character jumps. Is there a way to disable the camera Y movement? I have = player; which follows the player in all directions. Please help!

Something like the following could work:

scene.registerBeforeRender(() => {

    const targetPosition = player.getAbsolutePosition();

    /* Set camera's Y position to anything you'd like */
    targetPosition.y = customPositionY;;


Worked like a charm! thank you!. :slight_smile:

1 Like