Playmaker Forum

Playmaker Help & Tips => Playmaker Tutorials => Topic started by: holyfingers on October 20, 2016, 03:05:19 AM

Title: Simple Object Rotation from Mouse Position...
Post by: holyfingers on October 20, 2016, 03:05:19 AM
Hi there,

I've written up a short, simple tutorial for rotating an object in two, separate axes via mouse input: http://www.holyfingers.co.uk/main/blog/2016/10/19/on-the-turn/ (http://www.holyfingers.co.uk/main/blog/2016/10/19/on-the-turn/)

(http://i.imgur.com/t4Auvd8.gif)

You'll need the GetMouseDeltaPosition action from here: https://github.com/jeanfabre/PlayMakerCustomActions_U4/blob/master/Assets/PlayMaker%20Custom%20Actions/Input/GetMouseDeltaPosition.cs

I've attached the scene as well.

Cheers,

Nick
Title: Re: Simple Object Rotation from Mouse Position...
Post by: djaydino on October 20, 2016, 08:49:57 AM
Hi,
Great!
I have added it to the User Tutorials wiki (https://hutonggames.fogbugz.com/default.asp?W548)

One thing tho.
You should avoid using Itween, it is outdated, very laggy and will be removed from playmaker in a future version.

You can look into DOTween (https://www.assetstore.unity3d.com/en/#!/content/27676) and you can find the actions for it here (http://hutonggames.com/playmakerforum/index.php?topic=10303.0)
Title: Re: Simple Object Rotation from Mouse Position...
Post by: holyfingers on October 20, 2016, 10:09:07 AM
Thanks for the heads up! I'll give DOTween a look over and update the tutorial when I get a moment!

Cheers,

Nick
Title: Re: Simple Object Rotation from Mouse Position...
Post by: holyfingers on October 24, 2016, 03:14:47 AM
Updated the tutorial to include an alternative using DOTween:

(http://i.imgur.com/D4wEsnO.png)

Cheers,

Nick