I can not seem to get a handle on coordinates

Coords

When trying to figure something out in my mind, I usually think in pictures or images.

I am having trouble getting a proper picture in my mind on the coordinate system that was just discussed.

If Vector3 is using the parameters as (X, Y, Z) then Vector3.up for one unit would be like (0, 1, 0) +1 on the Y.

Vector3.Forward would be like (0, 0, 1) +1 on the Z.

Looking at the Gizmo in my Unity Scene it looks to me like positive y is going up, therefore the Vector3.up +1 on Y makes sense in the picture in my mind.

The Gizmo gives the impression that Negative Y is down, Positive X is moving to your Right, and Negative X is moving to your Left. Based on the number lines I remember learning in School in the United States.

In the Gizmo Icon I get the impression that Positive Z is moving away from the screen, and Negative Z is moving toward the screen. Therefore I would picture that Positive increments on the Z (Vector3.forward) would move the Rocket away from the screen and not turn to the left.

The only way I can make it work in my brain is to walk around to the Starboard (right) side of the Rocket and face the Rocket. Doing that the Y would still be Up and Down, but now the Positive X is moving toward the screen and Negative X away. This would make the Positive Z move to the Left and Negative Z move to the right. Then increasing the Z would turn the Rocket to the Left as the A key does using Vector3.forward.

I assume this has something to do with the Pivot Point, but I’m can not picture in my mind how this works.

Looking at the Scene of the Rocket and the Gizmo, it would seem to me that Positive increments of the Z would cause the nose of the rocket to move away from the screen, giving the impression that the Rocket is tipping over and falling away from you.

I do not want to continue with the course until I can get a good handle on what we are doing. Could someone please help me picture how the coordinates work.

Thanks.

Hi,

you are thinking in moving the rocket along an axis of the coordinate system. But what we are doing is rotating the rocket about an axis, like in this sketch:

hth

Thanks Maria Simlinger,

I do not know why I am struggling with this so much.

I see looking at the code that we are MOVING along the Y axis, and ROTATING on the Z axis.

When we rotate, are we rotating using the center of the Pivot Point, or are we using the bottom left corner of it?

The rotation is still hard to totally picture for me, if we are rotating from the center of the Pivot Point, then the Negative and Positive seem to be the reverse of what I would expect in my mind. It seems to match the way I see it right now, we would have to be rotating on the bottom left corner for it to work out as I’m seeing it.

First, the sketch in my previous answer was not fully accurate, sorry. I try to be exact in this post.

In Project Boost we are working on the local coordinate system of the GameObject (the rocket). An accurate sketch would have placed the coordinate system origin at the pivot point of the rocket:


The question

When we rotate, are we rotating using the center of the Pivot Point, or are we using the bottom left corner of it?

doesnt make sense :slight_smile: - since the pivot point is a point, it does not have a “center” or “bottom left corner” or whatsoever. In particular, the geometric points do not have any length, area, volume or any other dimensional attribute and the pivot point is the point where the coordinates of the local coordinate system of the game object intersect. The local coordinate system changes its position and rotation inside the world coordinate system. The position and rotation (and the scale) of the game object are stored in the transform property of the game object.

The pivot point can be equivalent to the center of the game object, but it does not need to. The center of a game object on the other hand is - in my humble understanding - calculated by using its bounds (or the total bounds of its child objects) and used to place and align meshes or colliders exactly.

Rotation

We are rotating our rocket around the x-axis of the local coordinate system of our rocket game object and the coordinate system has its origin in the pivot point.

Movement

We are using the transform property to apply rotation but the rigid body component to apply force. That means that we apply movement under the control of the physics engine, and I don’t know how the origin of the rigid bodies coordinate system is calculated. It could be the center of mass of the rigidbody, or the pivot point of the transform? Anyway, applying force to the rigid body affects the transform, although some calculation of the physics engine precede.

Thanks again,

Ok, I fully picture and understand the MOVEMENT part, but I am still thick headed on the ROTATION part.

Here is what I was trying to say by the Center and Bottom Left points.

If I had say a rocket model, and I was to place my thumb on the side facing me in the middle of the body, and place my forefinger on the back side so I was holding it in the middle. Then if Positive Z is to the Right and Negative Z is to the Left, and I rotate the rocket toward the Right - Positive Z then the top of the rocket would rotate to the right as in this picture. In other words I would be rotating using the top of the body to choose my direction.

But, If I change where I am holding the Rocket to where my thumb is placed on the rocket near the bottom Left corner of the body and the forefinger on the back side in the same location. As in this picture.

If I rotate that bottom corner to the Right or Positive Z, then the top would tilt to the Left. That seems backward from what is in the picture where +Z is on the Right and -Z is on the Left. In this case I would be using the bottom of the rocket body to rotate it, in order to get this effect.

As a matter of fact in Paint.Net when drawing these pictures, I had to +Z my rocket to tilt the top to the Left, and that did not seem correct either.

So, If I was using the TOP of the body to rotate, which seems more natural to me, this is working backwards, but if I was using the BOTTOM of the body to rotate, then this makes sense, but that seems unnatural to me.

Apparently, there is something very SIMPLE I am missing in my mind here, to grasp this.

Sorry, for being so stubborn on this, but I really want to understand it correctly, so I can apply it to my games without having to keep trying different ways to get it to react the way I need.

Wait, I think it just CLICKED.

Is the Rotation relative to the World, where Location(0.0) is the bottom Left corner of the World.

That would make sense to me then, but if Location(0,0) was the Top Left corner this would be backwards, which is how I am picturing it now, because being American, we are taught to read things Left to Right then Top Down.

If the Location(0,0) is in the Bottom Left then we would read it Left to Right Bottom Up. As Maria Simlinger showed in the last picture posted.

Is the start origin of the World in the Bottom Left? That may be the point I missed?

Privacy & Terms