Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: lucaderiu on September 19, 2013, 11:27:33 AM

Title: Controller Simple Move [SOLVED]
Post by: lucaderiu on September 19, 2013, 11:27:33 AM
Hi,
i need to use the controller move relatively to an object or camera instead of world or self.
The Action Controller Simple Move has the options World or Self and I need a way to manage the movement vector in camera axis.
In simple words: I want my Vertical or Horizontal inputs to be view dependant so when I move the JoystikBridge "up", the player goes "up".
Any help (or different solutions) are very appreciated.
Thanks!
Luca
Title: Re: Controller Simple Move
Post by: Alex Chouls on September 19, 2013, 04:51:32 PM
The action Get Axis Vector lets you specify a camera that movement should be relative to.

There's an example in the samples:
PlaymakerSamples\TestLab\Character\ControllerSimpleMove

Title: Re: Controller Simple Move
Post by: lucaderiu on September 19, 2013, 06:25:13 PM
Hello Alex,
thanks for the reply, i am using Get Axis Vector for the keyboard and usb controller input, but for my iOS i am obtaining 2 floats using the JoistikBridge.js and then i construct a vec3 using x and z.
Is there a way to send the JoystickBridge X value to Horizontal Input?
Title: Re: Controller Simple Move
Post by: Alex Chouls on September 19, 2013, 06:38:56 PM
You should be able to use the Transform Direction action to do the same thing the Get Axis Vector action is doing internally.

EDIT: Added a screenshot to show how to set it up. Feed the worldVector to Controller Simple Move.
Title: Re: Controller Simple Move
Post by: lucaderiu on September 20, 2013, 09:02:08 AM
Thank you very much Alex! sorry for the noob question but I completely missed that Transform actions.