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

Example: Don't accumulate tiny translations in games_fps.html #28662

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

ycw
Copy link
Contributor

@ycw ycw commented Jun 15, 2024

fix: #28660

Description

The cause is that the example blindly pushes playerCollider away from the intersection normal by depth amount in every frame, so say when player is idling on ramp, the tiny offset will eventually add up >octree_threshold, then octree considers that the playerCollider is not intersecting with the ramp.

This PR fixed that by translating the playerCollider only if intersection's depth >= octree_threshold

@Mugen87 Mugen87 added this to the r166 milestone Jun 15, 2024
@Mugen87 Mugen87 merged commit 9bc8414 into mrdoob:dev Jun 15, 2024
11 checks passed
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.

games_fps Example: Collision detection anomaly
2 participants