Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: janet on August 04, 2018, 04:10:54 PM

Title: Controller Simple Move not working
Post by: janet on August 04, 2018, 04:10:54 PM
Hi,

I am new here and try to make my 2D character move in unity. In play mode, I am able to store the vector variable, but my character doesn't seem to move at all.

I attached my settings here. Can someone help me?

Thanks.
Title: Re: Controller Simple Move not working
Post by: janet on August 05, 2018, 11:54:37 AM
I got vector3 variable from Get Axis Vector and Set Velocity 2D needs vector2. How can I mix them together?

Thanks.
Title: Re: Controller Simple Move not working
Post by: janet on August 05, 2018, 12:26:18 PM
I also tried Get Axis Vector, store the vector3 and then apply it on translate. It didn't work too.

For all the method above, I can get the vector3 and the vector3 changes when I press WSAD button on my keyboard. However, the character is just not moving when the vector3 changes.
Title: Re: Controller Simple Move not working
Post by: Ateam on August 05, 2018, 12:38:13 PM
If is a plataform game you can use the get xyz action to get x and z from the axis vector variable and them add the x and z float to the 2D velocity, if you just want to move the obj in x y and z just use the velocity action.
Title: Re: Controller Simple Move not working
Post by: Ateam on August 05, 2018, 12:51:23 PM
like this
Title: Re: Controller Simple Move not working
Post by: Ateam on August 05, 2018, 12:53:11 PM
and for a platform game is like this
Title: Re: Controller Simple Move not working
Post by: janet on August 06, 2018, 02:10:13 AM
Thanks for your help Ateam. It still doesn't work for me.

I don't have Get VelocityXYZ in my action browser and I don't find it in ecosystem too.
Instead, I use Get Velocity and Set Velocity because Set Velocity requires Rigidbody and not Regidbody 2D.

It appears to have the same issue. I can get the vector3 variable and it changes when I press or release the button. It does not get X, Y or Z individually and the character is not moving when I press the buttons. 

I am confused now.
Title: Re: Controller Simple Move not working
Post by: Ateam on August 06, 2018, 02:32:05 AM
you don't need the get velocity action
Title: Re: Controller Simple Move not working
Post by: Ateam on August 06, 2018, 02:35:01 AM
In set velocity just put the Move variable
Title: Re: Controller Simple Move not working
Post by: Ateam on August 06, 2018, 02:36:57 AM
and you need deactivate the rigibody gravity.
Title: Re: Controller Simple Move not working
Post by: janet on August 06, 2018, 02:46:01 AM
Just made the changes.

I took a screenshot while pressing the button. The character is still not moving..
Title: Re: Controller Simple Move not working
Post by: Ateam on August 06, 2018, 03:30:57 AM
ohhh I see the problem, put the "set velocity" variables x and z in none, and them you need to deactivate the action Sequence, here

Title: Re: Controller Simple Move not working
Post by: Ateam on August 06, 2018, 03:33:27 AM
and all in none
Title: Re: Controller Simple Move not working
Post by: janet on August 06, 2018, 03:39:47 AM
Just did.

I can get the vector3 changing while press the key, but the character is not moving.
Title: Re: Controller Simple Move not working
Post by: Ateam on August 06, 2018, 03:49:51 AM
lol you have the rigibody in kinematic, deactivate that
Title: Re: Controller Simple Move not working
Post by: janet on August 06, 2018, 03:55:25 AM
It worked!

Thank you so much!!!

So why did the controller simple move not work?