Shaking camera on an extended version of HelloCollision Demo

Hi. I’m using the HelloCollision demo as a foudation for my program. It uses bulletStates and physics.When using the provided scene there is no problem, but when I’m trying to use my own, the camera shakes? It’s basically a very small amount of bouncing, most noticeable when stationary. Help?

Video: [video]3D Swansea Campus v0.7 Demo - YouTube

A note, a lot of the methods can be ignore in the code, as they reference extra project specific features that I have implemented. Many thanks!

The “bouncing” is generally due to gravity and some floating point errors. Every tick, gravity gets applied, which moves you down and then Bullet tries to compensate for it. Bullet generally escapes this with normal physics bodies by deactivating them when they don’t move (also saves on computations). You could do something similar when static, or try messing with gravity/linear damping/step heights etc, also make sure your mesh has enough triangles.

I don’t really know how to make the mesh have more triangles; the plane just an repeated image (in blender)? Any ideas how I would go about deactivating the physics bodies temporarily when stood still instead? Tried messing around with gravity values but doesn’t really seem to change much (changed all the way from 1-1000).

Update: Been playing around with the stepHeight setting. When I put it to 0f it stops the shaking which is great. However when the program is first launched, the ‘character’ seems to be slightly raised, and bounces loads. Moving a little bit ‘off the step’ puts you back on the ground with 0 shaking. Ideas?