Need to get the box moving where it’s facing. [New Problem D:]

Hello! I, have the movement done and all, i’m using the chase camera and making the box face where the camera is facing. But, then I realized that I don’t know how to convert the rotation it’s facing, to X/Z values. Help is very much appreciated. Thank you for spending your time reading.



EDIT: When I took the second’s person code(Ty very much) it works, but… The problem now is that the speed of the block changes as the camera looks in different directions. For 2 hours I thought of a solution but couldn’t come up with anything. Help is appriciated. I would probably solve it by now but I have no idea how Matrix4f or Quaternions work ):

[java]cam.getDirection()[/java]

Use .toAngles()



It returns the float[] (x, y, z) values as angles.



I hope I am remembering this correctly.

@sbook said:
[java]cam.getDirection()[/java]


Well, that was stupid of me because I already have used it!

Anyway, thank you very much!

New problemo occurs ):