playMaker

Author Topic: Flipper Control  (Read 3732 times)

Col. Phil Bilko

  • Playmaker Newbie
  • *
  • Posts: 45
Flipper Control
« 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.


Col. Phil Bilko

  • Playmaker Newbie
  • *
  • Posts: 45
Re: Flipper Control
« Reply #1 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

Brighton

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Flipper Control
« Reply #2 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.

Andrew.Lukasik

  • Full Member
  • ***
  • Posts: 134
    • my twitter @andrewlukasik
Re: Flipper Control // example FSM _ sketch flipper machine v1
« Reply #3 on: February 09, 2013, 05:42:44 AM »
how about making it without itween?

example FSM _ sketch flipper machine v1 @andrewlukasik.unitypackage


RUN IN WEB PLAYER
(go full-screen to disable RMB popup)

« Last Edit: February 10, 2013, 05:17:40 AM by Andrew_Raphael_Lukasik »

Col. Phil Bilko

  • Playmaker Newbie
  • *
  • Posts: 45
Re: Flipper Control
« Reply #4 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.

Andrew.Lukasik

  • Full Member
  • ***
  • Posts: 134
    • my twitter @andrewlukasik
Re: Flipper Control
« Reply #5 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.
« Last Edit: February 10, 2013, 05:20:12 AM by Andrew_Raphael_Lukasik »