Author Topic: Moving a cube with user input  (Read 10918 times)


  • Administrator
  • Hero Member
  • *****
  • Posts: 15501
  • Official Playmaker Support
Moving a cube with user input
« 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:

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 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.


« Last Edit: April 15, 2011, 06:47:05 AM by jeanfabre »


  • Guest
Re: Moving a cube with user input
« Reply #1 on: April 15, 2011, 06:40:56 AM »
great thanks!  ;D