Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: jasperPT on August 15, 2015, 05:59:25 AM

Title: [SOLVED] How to make a spinning wheel?
Post by: jasperPT 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
Title: Re: How to make a spinning wheel?
Post by: jasperPT 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
Title: Re: How to make a spinning wheel?
Post by: 600 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.
Title: Re: How to make a spinning wheel?
Post by: DarkSoul 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.
Title: Re: How to make a spinning wheel?
Post by: jasperPT on August 19, 2015, 04:06:43 AM
Awesome thanks for the help guys!