Ferris Wheel

dknelldknell Member Posts: 48
edited November -1 in Working with GS (Mac)
Hi everyone,
I have been trying to figure out how this would work and I'm not getting very far. I want to put a moving ferris wheel in a game. The main wheel would rotate at a constant rate while about 10 boxes around the wheel would MOVE (not rotate) at the same rate the wheel is moving. I don't know why I'm explaining how a ferris wheel works - you've seen it before. :D

Anyone have any tips on how to make the boxes move around at the same rate the wheel is rotating?

If any of you GameSalad gurus want to show off your skills, the stage is yours! :)

Thanks!

Dave

Comments

  • design219design219 Member Posts: 2,273
    Wow, sounds like you would have to have some complex constraints. Would it negatively affect you game play to do this as an animation?

    _________________________________

    HOLY NOSE JOB!: Nesen Probe: Is this the single most unappealing game in the history of GameSalad? I can't seem to give it away! Anywhere. But if anyone want's to try it out, codes are still available! http://gamesalad.com/forums/topic.php?id=8097
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Could you constrain your buckets to x,y points on the wheel actor?

    I'll edit with more detail shortly..
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    http://gamesalad.com/game/play/72253

    Enjoy!

    Edit: Sorry for the brevity...I can't get my MacBook online while at work, so I had to run out to "Lunch" and find a hotspot...

    Anyway, I took this: http://gamesalad.com/wiki/how_tos:gsc_circular_movement

    ...and added support for a moving base object and a bucket position offset.

    Post here or email me if you have any questions, GSusername@gmail.com
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Back on my work PC, but here are the working bits in the "Bucket" actor:

    Constrain self.position.x to:
    `45*cos((self.time*game.RotateSpeed)-(self.BucketID*36))%360)+game.WheelX`

    Constrain self.position.y to:
    `45*sin((self.time*game.RotateSpeed)-(self.BucketID*36))%360)+game.WheelY`

    45 = Radius
    game.RotateSpeed = Global value also used in the wheel actor to control speed of rotation
    self.BucketID = Unique integer added to each bucket (0-9), multiplied by 36 (360/bucket count) to control angle offset.
  • dknelldknell Member Posts: 48
    Brilliant! Nice work BBC! I was thinking about it all wrong. Sounds like I owe you a lunch. I like the dragging bonus you added!

    Thanks for the example!

    I'll add some graphics and hopefully will have a demo uploaded in the next week or so.

    Dave
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    I'm just glad I could assist with a questions posed to the "GameSalad gurus"...

    BTW, If the wheel's center is fixed in the scene, you can replace the references to the wheel's X and Y with static values for the center point.
  • dknelldknell Member Posts: 48
    I noticed that. It looks like you just added that to account for moving the wheel around. That's a good point to note. Thanks!
Sign In or Register to comment.