Smooth rotations and an issue solved.


Hi there! This week I fixed a pretty glaring control issue.
In Project Coastal, the camera can be rotated 360 degrees orbiting around the player. This introduces some complexity to your standard XYZ setup because the user's cardinal direction needs to be thought about very carefully before implementation. Previously, the player had a dynamic North - that is, if the camera is changed, the player's North changes. This introduced this error when you move North, stop, swing the camera around to the South and then try to keep moving:
At this point, the player is pointed North, but when swinging the camera around to face the player and then moving, North is now behind the player. So the player dutifully flicks around to fulfil the Coroutine that runs to calculate the rotation back to face South.
Now in the new version, the player's North is static. If the player is running across the screen with the camera to the East, it looks like the player is running East now, but to the game, they're still moving to the North.
Thanks for reading! Hopefully this wasn't too dry, and can help you in your endeavours too. See you next time.
- Ryan
Project Coastal
A classic PS1 inspired JRPG
Status | In development |
Author | ryanbargholz |
Genre | Role Playing |
Tags | 3D, JRPG, Pixel Art |
Languages | English |
Accessibility | Color-blind friendly, Subtitles, Configurable controls |
More posts
- The first proper screen shot and the first scene!Dec 14, 2018
- The calendar system update.Nov 29, 2018
- Cameras! Layout! Calendar! A book?Nov 17, 2018
- First inklings of progress.Oct 30, 2018
- Hello World: Welcome to Project Coastal.Oct 07, 2018
Leave a comment
Log in with itch.io to leave a comment.