Collision Only with Triggers questions

angrybaker
Posts: 10
Joined: Mon Nov 17, 2008 10:40 pm

Collision Only with Triggers questions

Post by angrybaker »

Hi - as I've said before, I'm using Bullet in a collision only manner, using swept bound tests for movement.

I was just experiencing a huge slowdown. I was getting 5fps with 500 spheres flying around (with some static geometry).

When I comment out my m_World->performDiscreteCollisionDetection() call, the FPS shoots back up to over 200 fps. But obviously, this prevents it updating the boradphase (I think), and stops triggers from working.

Is this kind of performance drop expected with this volume?

Here's now my world is defined..

Code: Select all

	m_collisionConfiguration = new btDefaultCollisionConfiguration();
	m_dispatcher = new btCollisionDispatcher(m_collisionConfiguration);
	m_broadphase = new btDbvtBroadphase();
	m_solver = new btSequentialImpulseConstraintSolver();

	m_World = new btDiscreteDynamicsWorld( m_dispatcher, m_broadphase, m_solver, m_collisionConfiguration );
Does that look OK?

Thanks
angrybaker
Posts: 10
Joined: Mon Nov 17, 2008 10:40 pm

Re: Collision Only with Triggers questions

Post by angrybaker »

Ok, I think I got around this.

Instead of updating every object every tick (1/60), I'm now moving them every 0.25 seconds and lerping their positions.

This is working a LOT faster. I guess I was confused because I thought that the actual swept bound traces would be the performance problem, not updating the Broadphase AABB (or whatever it's using ;)

Hope this helps someone in the future.