How to follow character movement and make him go straight after turn

Hi there,

I had a look at a lot of playgrounds and tutorials but couldn’t find what I needed. What I’m trying to implement is a user that can move and that is viewed like in this online Babylon game : Threedium - Interactive 3D websites and apps

Could you tell me the philosophy behind it and/or if there are some playgrounds that would help as I’m struggling. I can make the camera follow with camera.parent but then it doesn’t react quite as in the game up there.

Also how could I tell my user to always go straight even after a turn. At the moment I managed to implement interactions with the keyboard and when the up arrow is pushed it goes one direction (always the same) only and when the, say right arrow is pushed, it goes right. But I’d like to turn the character right instead (like in the game) and then when the up arrow is pushed it keeps going straight (which is now the right direction). Could you guide me with that or refer to some playgrounds?

Many thanks,
Quentin

There is the tutorial about Threedium demo and full source code - Tutorial on creating Babylon.js multiplayer games and live demo

Thanks. I had checked that already but the playground doesn’t work and the view is not exactly like in the game and the tutorial is about multiplayers which I’m not interested in…

Maybe this PG will help - https://playground.babylonjs.com/#G703DZ#94