Need help making a lever work the right way? Thanks!
![SAMman](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
Hi all,
I am new to gamesalad and decided to make a game, go figure. Anyway, I am having trouble getting my physics right. I want to drop a ball on a lever and send another ball flying. Ball A is dropped and Ball B is already sitting on the lever on the side opposite to the ball A is dropped. I want to use acceleration of ball A falling plus the distance from the center of the lever that it is dropped to calculate power. That is problem 1. Problem 2 is starting out ball B on the lever and having it stay on the lever until the lever hits a certain angle, 30 degrees for example, and then Ball B launches with power based on the height of Ball A and it's distance from the center of the lever.
So far I have gotten the power based on the acceleration to work using a timer. And I spawn an actor when the lever hits 30 degrees. But it's certainly not looking good. Anyway, any help would be very much appreciated. Thanks everyone!
I am new to gamesalad and decided to make a game, go figure. Anyway, I am having trouble getting my physics right. I want to drop a ball on a lever and send another ball flying. Ball A is dropped and Ball B is already sitting on the lever on the side opposite to the ball A is dropped. I want to use acceleration of ball A falling plus the distance from the center of the lever that it is dropped to calculate power. That is problem 1. Problem 2 is starting out ball B on the lever and having it stay on the lever until the lever hits a certain angle, 30 degrees for example, and then Ball B launches with power based on the height of Ball A and it's distance from the center of the lever.
So far I have gotten the power based on the acceleration to work using a timer. And I spawn an actor when the lever hits 30 degrees. But it's certainly not looking good. Anyway, any help would be very much appreciated. Thanks everyone!
Comments
This approach may be floored. And there are issues of the speed of intersection between colliding objects so if you flip with the lever too fast it don't work... This can be partially sorted with adjustments to mass, and other physics. If it doesn't, cheat it with a direct injection of change velocity in ball 2 based on the above... And of that don't work... Ask somebody else with a more youthful brain.
Hope that helps
Kipper
kipper
search "lever demo" in the new section of GS creator.