Touching objects immediately "ping" offscreen

Oaf
Posts: 7
Joined: Sun Jun 10, 2007 7:40 pm

Touching objects immediately "ping" offscreen

Post by Oaf »

I've been tackling this for a while now.

I have a vertical stack of boxes, each placed on top of each other.

When I start the simulation, they immediately zoom off the screen, as if they'd been in a high-speed collision.

I've even tried placing them slightly apart, but unless I place them a significant distance apart (about half their height), the same happens.

I've tried setting the inital linear and angular velocities to zero before starting, to no avail.

I must be doing something silly, or left something out, but what?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

Are you using Bullet C# XNA or the C++ version?

If using XNA, see if this helps:
http://continuousphysics.com/Bullet/php ... php?t=1260

Otherwise, please check the Bullet C++ samples and compare your setup.

Thanks,
Erwin
Oaf
Posts: 7
Joined: Sun Jun 10, 2007 7:40 pm

Post by Oaf »

Yes I'm using XNA :(

I'll look through that sample and see if there's anything different he's doing.

Thanks!
Zimbarbo
Posts: 14
Joined: Thu Jun 28, 2007 2:26 pm

My problem

Post by Zimbarbo »

I've had trouble like that when rigid bodies are initially set overlapping. make sure they are not touching when setting them up initially. There is always some margin of error too. You may have a cube with halfextents of 2, set at the origin, but the hit box may stretch out to 3. This shouldn't happen at the origin, but I've seen this happen too.