Ship Angle Looks Weird

Hi all,

Am trying to tweak this lecture project and I noticed that my player ship looks weird.

Please see attached two screenshot.


This first one is the look I’m aiming for, and I am able to get that when I comment out ProcessRotation. Notice how I can still see part of the ship, pointing towards the center.


The second screenshot is when I turn on ProcessRotation. All I can see of the ship now is just the backburner, which feels a little weird and is not what I’m aiming for.

Am I doing something wrong here? I am using the exact same code and have followed the lecture as close as possible.

Another question I wanted to ask is – the way the lecture sets up the PlayerControl script is that it is attached to the PlayerShip. If I want to access the CameraPosition, can I do that? How? I wanted it such that the camera also moves around together with the ship, but to a lesser extent.

Cheers and thanks,

-Nik

Hi Nikolas,

Did you already implement pitch/yaw/roll? If so, try to use values closer to 0 for it. If that did not fix the issue, comment the pitch/yaw/roll code out and move your ship without it. Maybe you will like that behaviour better. The pitch/yaw/roll code is not crucial in this project, it just makes the movement look a bit nicer. (And “nice” depends on personal preference.)

Does your camera have got the “Main Camera” tag? If so, you could access that camera with Camera.main in your code. Cache the reference in a variable because Camera.main is fairly slow.

By the way, your last idea sounds as if Unity’s cinemachine could be helpful. :slight_smile:

Did this help?


See also:

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms