Strange physics body behaviour at high velocities
Strange physics body behaviour at high velocities
When the balls in my project get around 3000-3400 a seemingly random amount of velocity is subtracted. This can range from less than 100 to almost half the velocity, which is very jarring. Is this intended? I doubt I will ever use velocities this high, but it does seem strange that it would do this. If it wanted to keep it below a certain number, clamping the value would make more sense but maybe there's something I'm not getting. If you guys know whats going on please let me know.
- Attachments
-
- physicsTest.love
- (2.94 KiB) Downloaded 135 times
gaeem defelpmint is maiy pashin
Itch: Freakman
Itch: Freakman
Re: Strange physics body behaviour at high velocities
I've made some simple experiments with dt, and the results suggest that what is clamped is the maximum displacement of the bodies per frame. Because dt is variable, the oscillations of dt are what produces varying velocities.
I've tried with world:update(1/60) and the velocities were clamped at exactly 3600.00. Then with 1/61 and the velocities were clamped at 3720.00. I got some weird results too, because trying with 1/62 also resulted in 3720.00. Visually, the separation was the same in all cases. I haven't tried to measure the exact maximum displacement per frame.
I've tried with world:update(1/60) and the velocities were clamped at exactly 3600.00. Then with 1/61 and the velocities were clamped at 3720.00. I got some weird results too, because trying with 1/62 also resulted in 3720.00. Visually, the separation was the same in all cases. I haven't tried to measure the exact maximum displacement per frame.
Who is online
Users browsing this forum: No registered users and 3 guests