Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use LivecatchBounceMultiplier to reduce angular momentum instead of nulling it. #439

Open
Cupiii opened this issue Aug 29, 2022 · 0 comments
Assignees

Comments

@Cupiii
Copy link
Collaborator

Cupiii commented Aug 29, 2022

Currently, if a livecatch happens, angular momentum (only for x and y) is nulled, while livecatchbounceMultiplier is only used on velocity.

It could be tested, if the livecatches feel better, when the liveCatchBounceMultiplier (which is for example 0.2 for a slightly inaccurate livecatch) is not only applied to velocity, but also to the angular momentum.

	ball.Velocity -= collEvent.HitNormal * normalSpeed * liveCatchBounceMultiplier;
	ball.AngularMomentum.x = 0;
	ball.AngularMomentum.y = 0;

-->

	ball.Velocity -= collEvent.HitNormal * normalSpeed * liveCatchBounceMultiplier;
	ball.AngularMomentum.x *= liveCatchBounceMultiplier;
	ball.AngularMomentum.y *= liveCatchBounceMultiplier;

possibly only angular momentum in the direction of the collision-normal could be reduced. (like for velocity, or the same amount of the overall velocity reduction, otherwise calculation would be quite hard.)

@Cupiii Cupiii self-assigned this Aug 29, 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

No branches or pull requests

1 participant