Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Col. Phil Bilko on February 08, 2013, 05:42:12 AM

Title: Flipper Control
Post by: Col. Phil Bilko on February 08, 2013, 05:42:12 AM
Hey All;

I am looking into iTween to take control of a pinball flipper, to help simplify it, other than using a full complex physics driven solution. However I do not know where to start.

Can anyone please help with an example on how I can get this to work with iTween. Press left shift button it triggers the left flipper, you hold the button the flipper is in the up position, you release it resets back to its resting position.

Any and all help is gratefully appreciated.

Title: Re: Flipper Control
Post by: Col. Phil Bilko on February 08, 2013, 01:57:24 PM
Anyone that helps me do this I will make it worth your time. MSG me for more information....

Thanks
Title: Re: Flipper Control
Post by: Brighton on February 09, 2013, 05:25:40 AM
Well either through iTween or a basic transform action.

I'd imagine it would be as simple as two states, one for each position.
In each state there would be a iTween rotate to, and you'd set the rotations as well as the speed or time it takes to perform that action. Be sure to tick off the looping option at the end.

In each state you would be listening for the change in input on every frame (Get Mouse/Key Down/Up).

That said, I have not had much luck with animating colliders correctly applying with rigid bodies, but that's just me.
Title: Re: Flipper Control // example FSM _ sketch flipper machine v1
Post by: Andrew.Lukasik on February 09, 2013, 05:42:44 AM
how about making it without itween?

example FSM _ sketch flipper machine v1 @andrewlukasik.unitypackage (http://hutonggames.com/playmakerforum/index.php?action=dlattach;topic=3104.0;attach=1784)

(https://dl.dropbox.com/u/14425101/public%20builds/temp%20builds/playmaker%20_%20sketch%20flipper%20machine%20v1%20%40andrewlukasik.unitypackage/thumb.gif)
RUN IN WEB PLAYER (https://dl.dropbox.com/u/14425101/public%20builds/temp%20builds/playmaker%20_%20sketch%20flipper%20machine%20v1%20%40andrewlukasik.unitypackage/playmaker%20_%20sketch%20flipper%20machine%20v1%20%40andrewlukasik.html)
(go full-screen to disable RMB popup)

Title: Re: Flipper Control
Post by: Col. Phil Bilko on February 09, 2013, 12:16:18 PM
Thanks for the reply guys.

Andrew your example is great thanks, it is a much simpler approach than what I had before in Uscript, this was what was causing my issues. I wonder though, in your sample the flippers move very slowly, is there a way to have them move faster to simulate more realistic flipper movement?

Thanks ever so much again.
Title: Re: Flipper Control
Post by: Andrew.Lukasik on February 10, 2013, 05:16:56 AM
Solution wasn't hard to google. Happy to help.
Quote
flippers move very slowly, is there a way to have them move faster to simulate more realistic flipper movement?
Iincreasing (negative here) values of torque forces applied is making them move faster.
Since this game is build on physics be open to tweak many parameters and experiment a lot.

Best Regards,
A.