what's regarded "static"?

Post Reply
genesys
Posts: 8
Joined: Sat Jan 30, 2010 3:03 pm

what's regarded "static"?

Post by genesys »

Hello!

I have a few beginner questions. I work on a Sci-Fi game with spaceships and use bullet for the collision detection (no dynamics). So far, simple sphere collision were enough, but now I added lensflare effects and since the hardware (iPhone) does not provide other means of determining the lightsource visibility, i have to use raycasting to determine lightsource visibility.

Now I try to figure out what will be the most performant way to do this. in the bullet documentation I read:
btBvhTriangleMeshShape A static mesh that is comprised of arbitrary triangles. These can have many triangles and still be fast because of the internal hierarchal implementation. Don't be afraid to batch static scenery geometry together to reduce the work in the Broadphase. Building the initial tree can take some time. If this becomes a problem the tree can be serialised to disk in advance and loaded quickly with btOptimizedBvh::deSerializeInPlace, see Demos/ConcaveDemo/ConcavePhysicsDemo.cpp

now - what's considered "static"? can it be a (concave) spaceship that moves arround (but doesn't 'morph') or is only geometry that doesn't move at all considered 'static'?



if not, what's the most performant way to aproximate the ship geometry for ray intersection tests with the world?


thanks!
Ripiz
Posts: 47
Joined: Mon Aug 16, 2010 10:43 am

Re: what's regarded "static"?

Post by Ripiz »

You set flag if object is static or not. When it's static, it won't be affected by gravity, nor force generated from other objects.

Naturally you can move it by changing world transform, but it won't detect collision with other Triangle Mesh shape.
genesys
Posts: 8
Joined: Sat Jan 30, 2010 3:03 pm

Re: what's regarded "static"?

Post by genesys »

I use only a CollisionWorld - no dynamics. thus - no gravity or forces.

so what's the most performant way to buildup a concave, movable collision shape for raycast intersection?

currently i created a CompoundShape consisting of many simple ConvexHullShapes (arround 50 convexHullShapes each consisting of 4-20 vertices) - is there a more performant alternative
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York
Contact:

Re: what's regarded "static"?

Post by sparkprime »

If you only want ray tests, you can use that shape for everything.

What you cannot do is test whether two objects are intersecting when their shapes are btBvhTriangleMeshShape.
Post Reply