Case Status
Log In


Home ยป User Tutorials»How to move a Cube using User'…
Community Wiki

How to move a Cube using User's Input



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

The screencast is here:

The related original question in UA is :

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 the be ultimate/best way to go about it, but shows how easy and to the point PlayMaker is.

Going further:

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.



Last modified on 4/15/2011 5:29 AM by User.

  • RSS Feed