playMaker

Author Topic: [SOLVED] How to make a spinning wheel?  (Read 3355 times)

jasperPT

  • Full Member
  • ***
  • Posts: 115
  • I am a VFX Animator teaching myself to make games
[SOLVED] How to make a spinning wheel?
« on: August 15, 2015, 05:59:25 AM »
Hi

I am having a bit of trouble trying to make a spinning wheel.
What I want is a wheel that you can grab with your finger/mouse, drag it to follow your finger/mouse and then based on the velocity you are rotating it at the point of mouse/finger up it continues to spin around.

This seems like something that is kinda solved, I just can't seem to figure it out.

Cheers,
Jasper
« Last Edit: August 19, 2015, 04:07:01 AM by jasperPT »

jasperPT

  • Full Member
  • ***
  • Posts: 115
  • I am a VFX Animator teaching myself to make games
Re: How to make a spinning wheel?
« Reply #1 on: August 16, 2015, 04:55:36 PM »
Ok So I have figured most of it out, the one piece I am missing is trying to figure out which direction the object is rotating at any given moment.

I am not using physics to rotate it, I am using look at.
I am also using a loop that updates every 0.001 second to figure out the angle of difference between the last update so I can see how fast it is spinning, but the action "Get angle to target" returns a positive value no matter which direction it is.

How do I figure out if the angle to target is +30 degrees or -30 degrees?

Cheers,
Jasper

600

  • Moderator
  • Hero Member
  • *****
  • Posts: 727
    • 600
Re: How to make a spinning wheel?
« Reply #2 on: August 16, 2015, 05:12:51 PM »
Hi, there is an action "Get Signed Angle To Target" on the Ecosystem that gives negative and positive values.

DarkSoul

  • Playmaker Newbie
  • *
  • Posts: 37
Re: How to make a spinning wheel?
« Reply #3 on: August 18, 2015, 02:49:39 PM »
Hello,

I needed this for a project I am working on , so I made it work , here you go I attached the file bellow.

I hope this helps.

jasperPT

  • Full Member
  • ***
  • Posts: 115
  • I am a VFX Animator teaching myself to make games
Re: How to make a spinning wheel?
« Reply #4 on: August 19, 2015, 04:06:43 AM »
Awesome thanks for the help guys!