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

Author
Message
AliceSim1
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.

puzzler2018
User Banned
Posted: 18th Dec 2018 22:38
Looks good to me - why built in physics
Sedit
1
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);
blink0k
AGK Developer
Gold Codemaster
6
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
AliceSim1
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 - pinball_flippers.zip
https://forum.thegamecreators.com/thread/213965#msg2555419

3D Physics Pinball Flippe
https://forum.thegamecreators.com/thread/221499

Login to post a reply

Server time is: 2019-08-25 17:09:37
Your offset time is: 2019-08-25 17:09:37