Rotated Jump Vector

I’m a little confused on what is going on inside here. I get what it’s doing, but how?

var rotatedJumpVector = Vector3.RotateTowards(projectedJumpVector, Vector3.up, radiansToRotate, 0);

projectedJumpVector is current, as in current position? I thought the projectedJumpVector was just so that we can tell how high on the Y axis or how far on the X or Z axis it is traveling? Then Vector3.up is the target, as in where we want to go? Cause isn’t that what projectedJumpVector is doing for us?

Hi @mdm5382, sorry for the late response but we typically ask students to do Q&A over on the Udemy website. There it’s much easier to follow which questions have been answered.

The projectedJumpVector is the jump vector flattened onto the horizontal plane. We then want that vector to be raise from that plane by a given angle. We want it to be rotated upward which is why the target is up. Have a go at showing the debug vectors as this should make it much clearer.

Hey thanks for getting back to me. I think I understand better now. I thought I saw somewhere that gamedev is where it would be best to ask questions. I’ll use the Udemy page from here on.

We do eventually see question here but mainly we use the forum for discussions and sharing our work. The Q&A allows you to put questions better against lectures and we can check what has been answered.

1 Like

Privacy & Terms