Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Aug 31, 2017 10:13 pm 
Offline

Joined: Thu Aug 31, 2017 10:08 pm
Posts: 2
So in my game/engine I plan to load models up from triangulated wavefront .obj files. I have recently replaced my implementation of a loader with tinyobj loader. Anyway, any shape in the model that contains "COL" in its name is not rendered, but is instead turned into the object's collision mesh. This only really needs to be a cube, but the .obj file has all shapes as triangles that could possibly be other shapes.

Anyway, I thought using btBvhTriangleMeshShape would work well, since I used it for my heightmap. Well, I (the player object) can collide with them more or less (though even that's a bit off) but when I give them mass they fall right through my heightmap terrain! I also tried btConvexTriangleMeshShape but then collision stopped working entirely. What's the best way to have a bunch of triangles (that you know usually describe cubes) turned into a collision shape?


Top
 Profile  
 
PostPosted: Fri Sep 01, 2017 7:40 am 
Offline

Joined: Thu Mar 24, 2016 10:22 am
Posts: 38
Location: France
Hi,

As described here in Meshes section : http://bulletphysics.org/mediawiki-1.5. ... ion_Shapes
Best way for static mesh object is to use btBvhTriangleMeshShape (this is only for static object)
For dynamic object, btConvexHullShap.
And optionally btHeightfieldTerrainShape for your heightmap.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group