What am I doing wrong?

Instead of a Cube, I am using a Capsule as I am going with a submarine as Player.
I have laying down with Y axis showing up as picture below:

When I use the Thrust code, instead of going up it just flies to the right (X axis).
What am I doing wrong?

1 Like

I don’t know, but it looks like you have issues between world- and local space.

A capsule’s Y-axis is normally along what you currently see as the X-axis. I believe you are showing the world-space gizmo, but the code is working in local-space. I don’t know what the ‘Thrust’ code looks like, so I cannot give you more info/help than this.

I think what you could do is to make the capsule a child of another empty, and put the code on the empty. Then rotate only the capsule to the rotation you want. This should keep the new empty’s local rotation as needed, while displaying your capsule like you want it

1 Like

I tried to add my Player into an Empty and move the code to it, but it didn’t change.
So I went the lazy way, created a new capsule and changed the shape whilst keeping the Y-Axis as it was by default.

Thank you for your help.

2 Likes

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

Privacy & Terms