Moving Camera Independently From Where It's Pointing

Hi,

I’m trying to write a bicycle simulator using Unity3D. However, all the scripts I’ve seen so far act like FPS controls - i.e. when you move forward you move in the direction you’re looking at. Instead, I’d like to be able to use the mouse the move the player’s head around to view the environment, and use WASD to move the bicycle’s handle bar right and left (D and A) and the bike itself forward and backward (W and S). When W is pressed, the player (or bike) should move in the direction the HANDLE BARS are pointing to, regardless of where the player’s head (controlled by the mouse) is looking.

Does anyone have any tips on how to separate these to independent mechanisms?

Thanks!

I don’t have any specific scripts, but I have something conceptual in mind.

There is a parent object which can be the bike. A child of this object would be the camera.

In the parent object, there is a script that controls the movement of the bike based on input. The camera’s position will move with the bike.

Place a script to have the mouse look around into the camera object. There maybe already one somewhere for this, but no idea.

This should allow for the bike to move in it’s own direction, and the camera follow it.

Potential problem: updating the rotation of the bike could cause issues with the rotation of the camera, but there’s probably workarounds for this.

I think that’s exactly what I’m looking for. I’ve been meddling with the Island demo project for hours now and I actually managed to get a behavior that is similar to what I’m trying to do. Your explanation caused me to look at the sample project from a different perspective and the camera does indeed seem to be a child of a different object with its own movement scripts. I will try replicating this hierarchy in my own project.

Thank you!