Post

Replies

Boosts

Views

Activity

Reply to Bouncy ball in RealityKit - game
Unfortunately it didn't help much. I've made sample project: https://github.com/michaello/BouncyBall-visionOS/ No matter what I do, i'll get 6 bounces at most. This is not how table tennis ball would behave, on 6th bounce it would keep to, let's say, 10 or 11 bounces. Here's yt video of me running it in simulator with different parameters. https://www.youtube.com/watch?v=rqWXI8_qTME I can add pulses artificially but it's getting unmaintainable when i introduce side walls for bouncing.
Topic: Spatial Computing SubTopic: General Tags:
Jul ’25
Reply to Bouncy ball in RealityKit - game
Thank you! The scale workaround sounds interesting, but I'm having difficulty determining the exact implementation approach within my repository structure. I would greatly appreciate your guidance on implementing this solution in code I shared (https://github.com/michaello/BouncyBall-visionOS/). Specifically I'm uncertain about Where in my current entity hierarchy I should introduce the container entity for scaling Whether all physics entities (ball, ground, walls) need to be scaled equally, or if only the ball requires this treatment The recommended scale factor to use (10x, 100x?) to prevent premature sleeping How to properly adjust the initial velocity and gravity values to maintain the same visual behavior at the larger simulation scale If you could point me toward specific code changes or provide a small example of the container/scaling setup, it would help a lot! I can't find any sample code on internet for it so it's difficult for me to test your suggestion.
Topic: Spatial Computing SubTopic: General Tags:
Jul ’25
Reply to Bouncy ball in RealityKit - game
Hello sir, thank you for the detailed answer. I've applied your suggested changes here: https://github.com/michaello/BouncyBall-visionOS/commit/13dbf8ade99de3f93da6812eccc1f77db5f24221 However, I'm still experiencing two physics issues: Ball isn't bouncy enough - Even with restitution = 1.0 and the scaled simulation, the ball loses energy quickly and doesn't maintain realistic bouncing behavior Infinite bouncing with low damping - When linearDamping < 0.7, the ball bounces indefinitely without losing height, suggesting the scaling might be preventing the physics engine from properly detecting when motion should stop Have you encountered similar issues with the scaled physics approach? Should I be adjusting other parameters like mass or exploring different scale factors? The ball seems stuck between "not bouncy enough" and "too bouncy" depending on damping values. Example: https://youtube.com/shorts/sLlqGcA3cKc
Topic: Spatial Computing SubTopic: General Tags:
Jul ’25