Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Mornar on November 03, 2014, 04:18:45 AM
-
Hi
Does anybody knows a good way to follow an object only on one axis.
Its a top down spaceshooter in a mobile portrait view but i want a bigger world.
I am moving my ship without physics and everything's fine but how can I make my camera follow the ship.
I tried it like this.
Get Ship Postion, store it in a float variable and the translate the camera with this float. But this is not giving me the result i expect.
How would you do it? Is there a way i have simply forgotten?
Greez
-
You can use Get Position and return a float on one of the Axi (like X, for instance). Then you can just use Set Position for the camera and inject that float into the X field.
Basically it just gets the position on the X, then makes the other object the same. Make sure they're both set to World, and not Self.
-
Thank you. Oh man its embarrassing^^ Its really that easy.
I tried it in so many diffrent ways and they were much more complicated. :)
Thanx Alot