Smoothing collision callbacks for moving object w/gravity

Post Reply
rbgrn
Posts: 12
Joined: Wed Aug 24, 2011 6:16 am

Smoothing collision callbacks for moving object w/gravity

Post by rbgrn »

As I slide a shape around on a convex triangle mesh, the gravity applied makes the Z value jitter just enough (.001) to cause ticks where the shape and mesh are no longer touching and I'm not getting any collision points in the manifold (which triggers a "object left the ground" for me and immediately follows an "object is on the ground"). Is there something I can do to smooth this out, perhaps a small slop setting that assumes they are colliding if within that distance or something that makes the Z more stable in this situation?

Thanks!
MaxDZ8
Posts: 149
Joined: Fri Jun 24, 2011 8:53 am

Re: Smoothing collision callbacks for moving object w/gravit

Post by MaxDZ8 »

I have not observed this problem so far.
The documentation stated that everything below .04 in size might not behave correctly. As such I've set up my code to flush all contact point distances to zero when abs(dst) < .01. It seemed to do the trick for me and I cannot see any visible jitter to my own surprise.
Perhaps if I crank up the resolution really high it will become visible, but considering that a meter is about 40 pixels in my test I am not concerned about this for the time being.
User avatar
Pyritie
Posts: 25
Joined: Thu Aug 11, 2011 6:42 pm

Re: Smoothing collision callbacks for moving object w/gravit

Post by Pyritie »

What's your fixed timestep?
rbgrn
Posts: 12
Joined: Wed Aug 24, 2011 6:16 am

Re: Smoothing collision callbacks for moving object w/gravit

Post by rbgrn »

Pyritie wrote:What's your fixed timestep?
Standard, 1/60 w/max 4 sub-step updates per tick
Post Reply