Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / How physics is programmed Flippers pinball

Years of Service
User Offline
Joined: 15th Oct 2018
Location: Barcelona
Posted: 17th Dec 2018 01:59
Quick question, how can you program the physics of a pinball flippers?
I tried to try, but I do not give with the formula or technique, using 2D physics.
I attach the code.

User Banned
Posted: 18th Dec 2018 22:38
Looks good to me - why built in physics
Years of Service
User Offline
Joined: 3rd Sep 2017
Location: Ghetto of NJ
Posted: 19th Dec 2018 04:02
Question is how accurate do you want it? There are a couple routes for physics to go here, Personally I would prob perform OBB(flipper) vs Sphere(ball) collision detection, Find the normal for the OBB surface at the time of collision and use that to calculate the new angle of the ball but you will need to have force, mass, and velocity for your flipper and your ball. This is not terribly hard once you understand the formulas although for accurate responses you would need angular momentum and even though I have quite a bit of experience with this sort of stuff I can not 100% say what I can pull off the top of my head in that is good.
Sphere sphere = new Sphere(0.5f);
InsanelyRedundantJava insanelyredundantjava = new InsanelyRedundantJava(Redundancy1, Redundancy2);
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 19th Dec 2018 07:07 Edited at: 19th Dec 2018 07:07
This works. Not sure if it's the "correct way" but i think it will be ok
Press SPACEBAR to flip the flipper
Years of Service
User Offline
Joined: 15th Oct 2018
Location: Barcelona
Posted: 19th Dec 2018 19:57
Searching I found these codes, 2D and 3D.
They are very successful, especially the 3D I was surprised enough to see how beautiful it looks, and the physical seems real, like pinball simulators.

I look, something that simulates (no real need) and does not break the game, that the ball does not pass through the flipper speed.

What dou you recommend? The integrated physics of AKG are very good, it is necessary to find a solution for the flipers.

In these examples of these users there are very good!

Conjured Entertainment -

3D Physics Pinball Flippe

Login to post a reply

Server time is: 2020-08-05 15:03:17
Your offset time is: 2020-08-05 15:03:17