playMaker

Author Topic: Controller Simple Move [SOLVED]  (Read 1616 times)

lucaderiu

  • Playmaker Newbie
  • *
  • Posts: 29
    • View Profile
    • PlaySys
Controller Simple Move [SOLVED]
« on: September 19, 2013, 08: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
« Last Edit: September 20, 2013, 06:02:33 AM by lucaderiu »
-----------------------------------------------------
https://madewith.unity.com/profiles/playsys
-----------------------------------------------------

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3517
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Controller Simple Move
« Reply #1 on: September 19, 2013, 01: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


lucaderiu

  • Playmaker Newbie
  • *
  • Posts: 29
    • View Profile
    • PlaySys
Re: Controller Simple Move
« Reply #2 on: September 19, 2013, 03: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?
« Last Edit: September 19, 2013, 03:29:59 PM by lucaderiu »
-----------------------------------------------------
https://madewith.unity.com/profiles/playsys
-----------------------------------------------------

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3517
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Controller Simple Move
« Reply #3 on: September 19, 2013, 03: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.
« Last Edit: September 19, 2013, 03:56:04 PM by Alex Chouls »

lucaderiu

  • Playmaker Newbie
  • *
  • Posts: 29
    • View Profile
    • PlaySys
Re: Controller Simple Move
« Reply #4 on: September 20, 2013, 06:02:08 AM »
Thank you very much Alex! sorry for the noob question but I completely missed that Transform actions.
-----------------------------------------------------
https://madewith.unity.com/profiles/playsys
-----------------------------------------------------