www.jpct.net
jPCT-AE - a 3d engine for Android => Support => Topic started by: clown611 on February 09, 2017, 12:21:44 am
-
Hi again. Im making a game with a spaceship that moves around in space. I controll my spaceship with translate, but when I rotate my ship towards another direction ofc the translate movement doesnt apply on my spaceship. How do you handle this? Is there a way to detect directions or should I make my own method depending on how much I have rotated?
-
ok I kinda solved it using ship.translate(camera.getdirection().x,camera.getdirection.y,0.04f). no idea if that is a good solution
-
It depends. It should be fine as long as the camera and the ship are in sync. If not, it might be better to simply use getZAxis() on the ship for the translation.
-
Ye it worked fine but i will try the getzaxis. Thanks