Playmaker Forum

PlayMaker Help & Tips => PlayMaker Tutorials => Topic started by: jeanfabre on April 14, 2011, 01:56:41 AM

Title: Moving a cube with user input
Post by: jeanfabre on April 14, 2011, 01:56:41 AM
Hello Everyone.

 First screencast tutorial. Being able to move a cube when the user press the arrow keys or "w"/"s" ( more accuratly the actual "Vertical" Input define in Unity Input settings.

the screencast is here: http://www.screencast.com/t/0N6nZQsRcjt (http://www.screencast.com/t/0N6nZQsRcjt)

The related original question in UA is : http://answers.unity3d.com/questions/51827/playmaker-basic-tutorial/51863#51863 (http://answers.unity3d.com/questions/51827/playmaker-basic-tutorial/51863#51863)

The target audience for this are beginners and curious people willing to know more, or be convinced somehow before purchasing. This is of course not intended to be the ultimate/best way to go about it, but shows how easy and to the point PlayMaker is

 Several ways to improve this fsm if you want to take it further:

1 - When user input is 0, maybe we don't need to translate the cube of a null amount. That can/should be improved based on how you intend to use this (if the cube is meant to be moved around all the time during the game play, then this is fine as is).
2 - Moving speed setting and fine tuning is missing. A speed variable should be created and multiplied by the user input before translating the cube.
3 - If you plan on adding yet more flexibility, we would need to be able to choose the axis and direction of the move.

Bye,

 Jean
Title: Re: Moving a cube with user input
Post by: azmilarash96 on April 15, 2011, 06:40:56 AM
great thanks!  ;D