Playmaker Forum

Playmaker News => General Discussion => Topic started by: Kevron on November 05, 2013, 08:44:58 AM

Title: [SOLVED] Rotate a object around Y-axis with input.touches
Post by: Kevron on November 05, 2013, 08:44:58 AM
Hi,
I have followed the steps on how to set up for input.touches, and that works well. Global events fires off on "drag start - dragging - drag end".

I store position, delta and magnitude in the custom action that Playmaker has available.

But how can I take this further into something good :)
I would also like that after the drag, the rotated object "speeds down" from the initial rotation.

Input.touch comes with a script called OrbitCam that contains the behavior I am looking for. But instead of rotating the camera, I would like the object to rotate.

I reckon I can't show the "orbitCam" script here, but for those who have input.touches, you will understand what I am looking for. Here is a web demo (press orb camera):
http://dl.dropboxusercontent.com/u/23073684/Blog/InputTouches/WebPlayer/WebPlayer.html

Regards,
Tor M
Title: Re: Rotate a object around Y-axis with input.touches
Post by: Kevron on November 06, 2013, 06:43:38 AM
I feel I am so close to getting it to work, but I struggle with making it a stable rotation and slow down nicely after drag is finished.

Please take a look at the attached package, I will be grateful for any advice.
(You need Input.Touches and some custom Vector 2 Playmaker actions)

Cheers,
Tor M
Title: Re: Rotate a object around Y-axis with input.touches
Post by: jeanfabre on November 07, 2013, 11:57:07 PM
Hi,

 Allow me few days to get back to you ok?

bye,

 Jean
Title: Re: Rotate a object around Y-axis with input.touches
Post by: Kevron on November 08, 2013, 01:05:55 AM
It would be perfect if you could sort out my FSM.

Thanks,
Tor M
Title: Re: Rotate a object around Y-axis with input.touches
Post by: Kevron on November 17, 2013, 04:18:05 PM
Bump  ;)
Title: Re: Rotate a object around Y-axis with input.touches
Post by: jeanfabre on November 17, 2013, 11:45:22 PM
Hi,

 Arghh! :)  I won't have time during the next 10 days as I am preparing materials to assist this game Jam in Viborg ( Denmark), can you bump end of november? I would really appreciate!

bye,

 Jean
Title: Re: Rotate a object around Y-axis with input.touches
Post by: Kevron on November 18, 2013, 12:48:51 AM
No problem Jean, I'll bump it again in the end of November. Good luck with the game jam in Denmark!

Cheers,
Tor M
Title: Re: Rotate a object around Y-axis with input.touches
Post by: Kevron on December 03, 2013, 01:55:00 AM
Hi Jean, just a little bump here ;)

Cheers,
Tor M
Title: Re: Rotate a object around Y-axis with input.touches
Post by: jeanfabre on December 04, 2013, 04:45:35 AM
Hi,

 ok, sorry about that, just never seem to be on top pf all the pending threads :) so thanks for bumping.

try this package. It will rotate a cube based on the verticl drag and as you release it will smooth out the rotation to finish nicely.

bye,

 Jean
Title: Re: Rotate a object around Y-axis with input.touches
Post by: Kevron on December 04, 2013, 06:42:31 AM
Thank you Jean, I´ll test it out tonight and report back.

Cheers,
Tor M
Title: Re: [SOLVED]Rotate a object around Y-axis with input.touches
Post by: Kevron on December 30, 2013, 09:09:03 AM
Thanks Jean, your package worked perfect!

Have a nice New Year's Eve!

Regards,
Tor Martin
Title: Re: [SOLVED] Rotate a object around Y-axis with input.touches
Post by: jeanfabre on December 30, 2013, 11:44:53 AM
you too :)