Jump to content

How to make a camera follow the character smoothly?


Borislav
 Share

Recommended Posts

@Borislav

To make the camera follow the character use camera.target

camera.target = character.position.

I am in the process of writing a character controller. Does gravity, animation etc.

You can see the code here

https://github.com/ssatguru/Vishva.ts/tree/master/src/ts/component

and you can see it in action here

https://ssatguru.github.io/Vishva.ts/public_html/

About a week more to finish it off

 

Link to comment
Share on other sites

10 hours ago, satguru said:

@Borislav

To make the camera follow the character use camera.target

camera.target = character.position.

I am in the process of writing a character controller. Does gravity, animation etc.

You can see the code here

https://github.com/ssatguru/Vishva.ts/tree/master/src/ts/component

and you can see it in action here

https://ssatguru.github.io/Vishva.ts/public_html/

About a week more to finish it off

 

Yes, this is the best way I found.

I had:

camera.target = character;

I didn't know I need to add .position.

Thank you.

Now I would like to learn about camera rotation and e.t.c....

 

 

 

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...