playMaker

Author Topic: [SOLVED] Rotate a object around Y-axis with input.touches  (Read 5947 times)

Kevron

  • Junior Playmaker
  • **
  • Posts: 51
[SOLVED] Rotate a object around Y-axis with input.touches
« on: November 05, 2013, 10: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
« Last Edit: December 30, 2013, 11:09:21 AM by Kevron »

Kevron

  • Junior Playmaker
  • **
  • Posts: 51
Re: Rotate a object around Y-axis with input.touches
« Reply #1 on: November 06, 2013, 08: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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Rotate a object around Y-axis with input.touches
« Reply #2 on: November 08, 2013, 01:57:07 AM »
Hi,

 Allow me few days to get back to you ok?

bye,

 Jean

Kevron

  • Junior Playmaker
  • **
  • Posts: 51
Re: Rotate a object around Y-axis with input.touches
« Reply #3 on: November 08, 2013, 03:05:55 AM »
It would be perfect if you could sort out my FSM.

Thanks,
Tor M

Kevron

  • Junior Playmaker
  • **
  • Posts: 51
Re: Rotate a object around Y-axis with input.touches
« Reply #4 on: November 17, 2013, 06:18:05 PM »
Bump  ;)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Rotate a object around Y-axis with input.touches
« Reply #5 on: November 18, 2013, 01:45:22 AM »
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

Kevron

  • Junior Playmaker
  • **
  • Posts: 51
Re: Rotate a object around Y-axis with input.touches
« Reply #6 on: November 18, 2013, 02: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

Kevron

  • Junior Playmaker
  • **
  • Posts: 51
Re: Rotate a object around Y-axis with input.touches
« Reply #7 on: December 03, 2013, 03:55:00 AM »
Hi Jean, just a little bump here ;)

Cheers,
Tor M

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Rotate a object around Y-axis with input.touches
« Reply #8 on: December 04, 2013, 06: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

Kevron

  • Junior Playmaker
  • **
  • Posts: 51
Re: Rotate a object around Y-axis with input.touches
« Reply #9 on: December 04, 2013, 08:42:31 AM »
Thank you Jean, I´ll test it out tonight and report back.

Cheers,
Tor M

Kevron

  • Junior Playmaker
  • **
  • Posts: 51
Re: [SOLVED]Rotate a object around Y-axis with input.touches
« Reply #10 on: December 30, 2013, 11:09:03 AM »
Thanks Jean, your package worked perfect!

Have a nice New Year's Eve!

Regards,
Tor Martin

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: [SOLVED] Rotate a object around Y-axis with input.touches
« Reply #11 on: December 30, 2013, 01:44:53 PM »
you too :)