Sign in to follow this  
Rehkitz

3rd Person Camera with offset [Solved]

Recommended Posts

Hello,

I wanted to create a 3rd person camera that is similar to the game Fortnite. I created already one example where the player is always in the center, but many games have a little offset to the camera and is more pointing to the shoulder of the character.

I have no idea what math I have to use and all my attemps just changed the pivot point.

 

Here is my example:

https://www.babylonjs-playground.com/#JHB4AG#1

 

It would be cool if someone can explain me what I have to do so that the camera is pointing to the upper right corner of the cube, but the rotation is around the character.

Share this post


Link to post
Share on other sites

Thanks for the help, but I need a camera position offset, not a rotation offset. In this example the cemera is right behin the object, but I want the camera behind but slighty to the right. The pivot point should still be the charachter.

I want a camera like this (This is not my video, just an example for the camera I want): 

 

Share this post


Link to post
Share on other sites

Hiya R!  Sorry that I misunderstood.  Umm... I don't think the camera in the video... has its target/pivot set to character position.

From what I can tell, the camera target is an invisible mesh, parented to character, positioned up and right of character.

Let's have some fun, using that idea...

https://www.babylonjs-playground.com/#1CC7UC#19

Thoughts?

Essentially, this is simulating an arcFollowCamera.  Let's try one of those... without any camera .alpha spins.

https://www.babylonjs-playground.com/#1CC7UC#20

Wingnut not doing so well.  :) I will keep thinking/testing.  Others might have more ideas.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.