Jump to content

FollowCamera Fixed Angle/Rotation


Wemperer2
 Share

Recommended Posts

I have an issue where I am using the followCamera in a top down view (think original grand theft auto). It works fine except when I apply impulse to my character/mesh/imposter to where the character moves backwards, the camera rotates a full 180 degrees. I want the camera to stay in the position so that it never rotates. Meaning, the north portion of the map will always be north, regardless of the direction of the character/mesh/imposter the camera is following in the top down view.

Link to comment
Share on other sites

Ok. Couldn't figure out how to delete this post so anyone who happens to fall upon it in the future... You're using the wrong type of camera. Use the arcRotate camera, position it, and set the target to your character.

 

var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 100, character, scene);

 

The cam will stay locked on, you just need to get the rotation right.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...