Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sun Jul 29, 2012 12:16 pm 
Offline

Joined: Tue May 01, 2012 11:52 am
Posts: 11
Hi all
Map for my game consist of one heightmap and buildings that are placed on it. What is better for performance?
To create each building and map with separated rigid bodies and compound shapes, or to create entire map as one rigid body and one compound shape that will contain shapes of heightmap and all buildings.


Top
 Profile  
 
PostPosted: Thu Aug 02, 2012 9:28 am 
Offline

Joined: Tue May 01, 2012 11:52 am
Posts: 11
Or similar question:
When creating a map is it better to create entire map as one body with btCompoundShape OR to create different static objects with their own bodies and shapes?


Top
 Profile  
 
PostPosted: Thu Aug 02, 2012 11:55 am 
Offline

Joined: Wed Jan 07, 2009 11:43 am
Posts: 94
Location: London
I think the most truthful (and unhelpful answer) is that it depends on your world and what you might want to do with your objects. I'd generally say that breaking it up would be more useful though, if you have a heightfield or triangle mesh for your ground/terrain you can give it one particular type of collision mask, and possibly a different one for buildings and the like - another advantage is that you could add/remove building collision objects, or vary their complexity depending on where the player is on the map. Hard to know from a performance point of view without knowing some idea of scale of map, number/complexity of objects etc.


Top
 Profile  
 
PostPosted: Thu Aug 02, 2012 2:54 pm 
Offline

Joined: Tue May 01, 2012 11:52 am
Posts: 11
Ok thanks, i will try both and see what happens.


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

All times are UTC


Who is online

Users browsing this forum: roy-t and 8 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