Playmaker Forum

PlayMaker News => General Discussion => Topic started by: mrminico on January 21, 2019, 01:26:31 PM

Title: How do you re create get axis vector action?
Post by: mrminico on January 21, 2019, 01:26:31 PM
Hi everyone,

So im trying to re create get axis vector since im using rewired for my controller inputs. Now rewired has something get axis 2d which gives you a vector 2 once stored. What advice can you give me on making the vector translate the player in 3d space on the xz plane relative to the camera?


Title: Re: How do you re create get axis vector action?
Post by: jeanfabre on January 22, 2019, 03:15:45 AM
Hi,

 you are going to need to map the speed or translation vector you are going to apply to your object from your axis2d.

so let's say, you get from rewire: Input: vector2(Horyzontal,Vertical)

you are going to create a vector3 like this: Velocity: Vector3(Input.x,0f,Input.y)


then you can set the velocity of your objecct using this "Velocity" vector3.

 does that make sense?

given the above, it makes more sense to use simple one axis actions from rewire, since you anyway need to map them in your vector3

Bye,

 Jean