Borislav Posted June 17, 2017 Share Posted June 17, 2017 To make the camera follow the character, I need to change it's angle each time. Try to walk, it only follows the character when I change the rotation: www.cityworld.16mb.com/levels/1/play Quote Link to comment Share on other sites More sharing options...
satguru Posted June 17, 2017 Share Posted June 17, 2017 @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 Wingnut 1 Quote Link to comment Share on other sites More sharing options...
JohnK Posted June 18, 2017 Share Posted June 18, 2017 Have you tried the followCamera ? Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Borislav Posted June 18, 2017 Author Share Posted June 18, 2017 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.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.