playMaker

Author Topic: Roate Object with Mouse [SOLVED]  (Read 2575 times)

sascham

  • Playmaker Newbie
  • *
  • Posts: 9
Roate Object with Mouse [SOLVED]
« on: December 10, 2011, 07:34:03 AM »
Hi,
I wonder if it possible to setup an rotation of on object.
For example i want to rotate an cube based on my mouse, if i press mouse button and drag to the left, cube turns left etc.

Thanks
Sascha
« Last Edit: December 11, 2011, 01:51:52 AM by alexchouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3999
  • Official Playmaker Support
    • LinkedIn
Re: Roate Object with Mouse
« Reply #1 on: December 11, 2011, 12:09:10 AM »
You can use Get Axis to get mouse and joystick input then Rotate to rotate the object.

The attached screenshot shows a simple FSM that lets you click on an object and rotate it with the mouse. The Idle state has no actions.

Also checkout the Unity Input Manager docs:
http://unity3d.com/support/documentation/Components/class-InputManager.html

sascham

  • Playmaker Newbie
  • *
  • Posts: 9
[SOLVED] Re: Roate Object with Mouse
« Reply #2 on: December 11, 2011, 01:05:24 AM »
Thanks
worked great