playMaker

Author Topic: Need Help Making 3rd Person Control Without Using 'Get Axis Vector' [SOLVED]  (Read 3065 times)

Scottyboombotz

  • Playmaker Newbie
  • *
  • Posts: 9
I'm trying to build a 3rd Person Camera Relative control system and I can't use 'Get Axis Vector' because I'm not using the Input system to do my controller.  I"m using a Gui object to create an analogue thumb stick.  It outputs X and Y variables which I plug into my characters 'Controller Move' action to drive him in World Space.  But obviously this won't work if the camera's moving around and rotating.  

What can I do to get my character to move relative to the camera?  

-Scott
« Last Edit: April 09, 2012, 08:27:24 PM by Scottyboombotz »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Need Help Making 3rd Person Control Without Using 'Get Axis Vector'
« Reply #1 on: April 09, 2012, 05:28:56 AM »
Hi,
 
I don't understand the relation between your thumb stick gui object and the fact that camera can move, the gui will return values in screenspace.

 Could you elaborate what you are after? maybe screenshot or disagram showing the chracter behavior and the role the camera is playing in that movement ( if it does).

 Bye,

 Jean

Groo Gadgets

  • Beta Group
  • Full Member
  • *
  • Posts: 175
Re: Need Help Making 3rd Person Control Without Using 'Get Axis Vector'
« Reply #2 on: April 09, 2012, 02:50:11 PM »
Hey Scott,

I had exactly the same issue with my current project. There doesn't seem to be any official actions that let you use float variables instead of the input axes.

So I decided to dive into the "Get Axis Vector" script and replace the string variables with floats. I'm happy to say that it worked perfectly so now I can use the accelerometer to control my character relative to the camera   :D

I've called it "Get Device Vector" but you can easily use it with any float variable in your FSM. Let me know if it works for you!

Scottyboombotz

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Need Help Making 3rd Person Control Without Using 'Get Axis Vector'
« Reply #3 on: April 09, 2012, 08:25:52 PM »
That worked great.  Thanks man your a life saver!

-Scott

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Excellent!

  I was currently rolling my own system to get the acceleration as a way to control like the input axis, this is a greta start to take in account device orientation as well ( so that it's agnostic to the device orientation). Will use your script, thanks for that.


 Bye,

 Jean