#How to align 3D movement with camera?

2 messages · Page 1 of 1 (latest)

royal obsidian
#

Im making an isometric game and I would like the player movement align camera angle. So far, I just have the movement, not the aligning yet.

unkempt radish
#

In 3D, you can use your camera's 'global basis' property to figure out where
it's currently pointing at. Say you want to move an object towards the camera's
right, you can use 'camera.GlobalBasis.X' (or 'camera.global_basis.x', in
GDScript).

Most movement in 3D are typically ground-based, so you'll probably be mostly
using the X and Z axes.

Relevant Docs:

(Basis Info)
https://docs.godotengine.org/en/stable/classes/class_basis.html

(General 3D Transform Info)
https://docs.godotengine.org/en/stable/tutorials/3d/using_transforms.html