This is my small tutorial project: https://playcanvas.com/editor/scene/612286
If I press ‘J’, I want to move this spacefighter in the direction it points to. How do I achieve that?
Depending on which local axis is ‘forward’, you can apply a force/move it along that axis. As it’s forward direction is +Z, you can use entity.getWorldTransform().getZ()
as the direction to move in/apply a force.
Great! Thanks for your pointer. Now I can move the fighter around in the direction it points to .