Math help in creating an off center rotating flipper

MegaemmanMegaemman Member, PRO Posts: 72
edited September 2013 in Working with GS (Mac)
I been snooping around the forums of past and i found this discussion on creating a windshield actor , and i was wondering if you so the same for a flipper, paddle or bat .
http://forums.gamesalad.com/discussion/comment/360541#Comment_360541
Heres what i have done so far on my attempt to create a semi functioning paddle https://www.dropbox.com/s/ejztcnzs666gb8o/Pinball template practice 2.zip

when i press the z key it rotates and snaps back (which is ok but i can't control the speed of the self rotating)

Hopefully looking at the links well help than my explanation.

Comments

  • natzuurnatzuur Member Posts: 304
    I get a 404 when trying to dl the dropbox file. If A*sin(game.Time*B)+C is the euqation you are using I think A=amount of rotation, B=the speed, and C is the offset, could be wrong though.

    I have something similar set up in one my projects, if you don't get a more solid answer I might be able to upload a demo later.
  • MegaemmanMegaemman Member, PRO Posts: 72
    @natzuur

    https://www.dropbox.com/s/zoyexiz2pdz3zvv/Pinball template practice.zip

    Hopefully this works Re-uploaded a link hopefully it works or i could just email it
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    Here is a pinball template. I'm pretty sure it is one that GameSalad created for an example.
  • natzuurnatzuur Member Posts: 304
    It looks like you need a counter rotation on your flippers in the otherwise section, also turn off bounce on the flipper and give it a higher density, in your specific project probably around 1000.
  • MegaemmanMegaemman Member, PRO Posts: 72
    edited September 2013
    @RThurman this template is pretty awesome but i'm now curious is if you could do a hinge and paddle like the windshield template MarkOnTheIron Did in this http://forums.gamesalad.com/discussion/comment/360541#Comment_360541
    I made a windshield demo a while ago: https://dl.dropbox.com/u/8244920/Windshield.zip

    In that demo to define the windshield rotation you need to add or subtract a value from the long actor instance constrain rotation rule (MarkOnTheIron 2012).
    (MarkOnTheIron 2012).

    @natzuur yeah your right that will definitely stop the paddle from rotating when the ball collides and i'll work on that counter rotation.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    edited September 2013
    @Megaemman -- do you want to modify @MarkOnTheIron's windshield example to make it into a flipper?
    If the answer is yes, then all you need to do is set 'actor 1' to its resting position and rotation. Then when its time to flip, you would rotate 'actor 1' quickly back and forth. The 'windshield' actor will follow actor 1's rotation. (Actor 1 acts like the pivot point for the windshield actor.)
  • MegaemmanMegaemman Member, PRO Posts: 72
    @Thurman could you control the rotation of "actor 1" the back and forth by using a button for when it is up and down?
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    I think I get what you want. Here is @MarkOnTheIron's example. It has been modified so that you press a flip button and the winshield actor acts more like a flipper.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    @Megaemman While @Rthurman is probably the friendlies most helpful guy around here who would never really complain about anything in a million years. I have to ask…

    Are you even trying to accomplish any of these requests before you ask or are you just taking advantage of literally the nicest guy here?
  • MegaemmanMegaemman Member, PRO Posts: 72
    @tenrdrmer no I am not I'm am just curious about how it works and I'm just ill experienced I've bought books on gamesalad practice makings slidescrollers , shoot 'me ups and adventure click games .I was just curious about the use of rotations and the windshields effects in making flipper or paddle type games .... Sorry if I offended you I was trying to get a general idea of how this type of game works in side salad since there isnt alot of info out about it.
    @RThurman I appreciate your help sorry if I caused any trouble or abused this forum in anyway .

    Again sorry for causing trouble
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Nobody is offended. Its just a simple question reminding you to give it a shot before asking someone else to do it for you. Good luck on your game
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    Hey -- all's good here. We're all learning this together.

    I mostly post responses to things that I think others might be interested in learning. I try to think if others might be asking the same question (or might in the future search on the forums for a similar topic).

    GameSalad is a really great tool for exploring all sorts of game mechanics.

    Carry on!
  • MegaemmanMegaemman Member, PRO Posts: 72
    @tenrdrmer, @RThurman thanks for understanding !

Sign In or Register to comment.