Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: sascham on December 10, 2011, 07:34:03 AM

Title: Roate Object with Mouse [SOLVED]
Post by: sascham 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
Title: Re: Roate Object with Mouse
Post by: Alex Chouls 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
Title: [SOLVED] Re: Roate Object with Mouse
Post by: sascham on December 11, 2011, 01:05:24 AM
Thanks
worked great