Skip to content

Feature/live catch#436

Merged
freezy merged 13 commits into
freezy:masterfrom
Cupiii:feature/live-catch
Sep 17, 2022
Merged

Feature/live catch#436
freezy merged 13 commits into
freezy:masterfrom
Cupiii:feature/live-catch

Conversation

@Cupiii
Copy link
Copy Markdown
Collaborator

@Cupiii Cupiii commented Aug 27, 2022

Adds live catch to flippers.

There are some differences to nFozzy:

  1. Max and min distance is not calculated on x axis, but on tangent to the flipperface from the flippers base. (so that live catches could probably also be done with vertical flippers)
  2. The minimal ball speed for a live catch is a variable and not a constant in the code
  3. Not only the time for live catches (from flipped flipper to collision) can be set, but also the minimal time for a "perfect" live catch. (was always 0.5*liveCatchTime)
  4. perfect live catches were always zero velocity at nFozzy's, now you can set a multiplicator (default = 0.1), so even a perfect catch has some little bounce - this adds some realism, but can be turned off, when setting is set to 0.0.
  5. imperfect live catches added some constant velocities at nFozzy's (depending on the time). Now a multiplicator can be set. maximum inaccurate bounce multiplicator to original speed is applied at full time. Linear regessed to perfect bounce multiplicator, when getting to perfect time. (like at nFozzy).
  6. Rubber and the collision to it is still calculated for imperfect (or perfect bounces).
  7. Z-Rotation is not nulled. A rotating ball can rotate from the flipper, as seen in live-catch videos.
  8. Every change to the speed of the ball is calculated with the normal direction of the flipper face in mind. So there is no live catch for balls that come from wrong diagonal (for left flipper: fast balls coming from top right had very strange bounces at nFozzy's).

The default vales differ from nFozzy's script, because of 1 and 5.

@Cupiii Cupiii requested a review from freezy August 27, 2022 18:50
@Cupiii
Copy link
Copy Markdown
Collaborator Author

Cupiii commented Aug 27, 2022

Argh. Forgot to check if the checkbox is checked... Will add that tomorrow.

@freezy
Copy link
Copy Markdown
Owner

freezy commented Aug 30, 2022

Amazing! This is on my to-review list today :)

@Cupiii
Copy link
Copy Markdown
Collaborator Author

Cupiii commented Aug 30, 2022

Amazing! This is on my to-review list today :)

You can test it quite well, if you set the perfect time to 0.5 secs and full time to 1s. It is "just a tad" easier then :-)

Copy link
Copy Markdown
Owner

@freezy freezy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic stuff! I've pushed a few minor changes, such as variable naming, added units to the inspector, and made one method static.

@Cupiii
Copy link
Copy Markdown
Collaborator Author

Cupiii commented Sep 6, 2022

"Bump on release" has to be greyed out or commented out, since not yet implemented (comes with flipper-bounce in some weeks). Will add a commit for this next day(s).
According to discussion on discord, will eventually refactor this into presets.

@freezy freezy merged commit feb2cc6 into freezy:master Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants