Jumping Camera Movement

I have found recently that, now when moving the camera forward with controls, it stutters as if continually colliding with the floor. Has something changed in the api ?

The documents suggest that the gravity vector is calculated by dividing the frames per second by a value -9.81. The problem is that with a value this low, you can travel up in the air, and as the gravity is not applied to a stationary object, you hover.

1 Like

It also does it in the playground example
https://playground.babylonjs.com/#4HUQQ

Does seem smoother if you switch the PG to 4.2

Sorry, explain ‘PG to 4.2’ … I’m a newbie;-)

PG - playground
4.2 is Babylon.js version 4.2, the current stable version

PG works in latest development version which is 5.00

You can switch the playground to an earlier version by clicking on the number after WEBGL2 top right of PG image

So it does seem that something has changed between 4.2 and 5

It suddenly clicked PG = Playground.
I just realised that my live site is referencing the development version of the API not the stable.
Cheers

It may be the same problem than here:

Adding @PolygonalSun

Added @Cedric as this is in What’s New

Added collisionRetryCount to improved collision detection

It looks like it’s the same problem with post pointed by @Evgeni_Popov
I don’t think it’s caused by collisionRetryCount as it’s only making that variable to become public.
Let me check what happens in the code …

I get a jittering in this PG now : Create a Simple World Series | Babylon.js Playground
Which didn’t happen few weeks ago…investigating.

This commit is causing the issue Update collider.ts · BabylonJS/Babylon.js@5507351 · GitHub
I’m contacting the author.

Related PR : Optimize collider by ottoville · Pull Request #9873 · BabylonJS/Babylon.js · GitHub
Do you know if the author is known to the forum?

2 Likes

PR is live Fix collision squared distance computation by CedricGuillemet · Pull Request #9929 · BabylonJS/Babylon.js · GitHub

2 Likes