Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Jun 21, 2012 1:47 pm 
Offline

Joined: Sat Jan 22, 2011 11:24 am
Posts: 1
Hello,

Let me describe what I need to do: in a very *simplified* form!

Image

In a 2d software that I have I can divide the space in boxes and I can check the inter-visibility between the boxes. The boxes represent the open space and the "black/empty" are solid walls. "Red" means that this box can "see" more boxes, "blue" is less.

Now, I want to do a similar thing in 3d and I wanted to use a collision world with raycasts to test visibility.

Image

Do you think this is possible? I need to be able to mark objects as transparent and solid. (the marked big box in the middle should be the solid one)

Any example to read? or something else?

Thanks a lot!
If something is not clear, let me know!

Tasos


Top
 Profile  
 
PostPosted: Fri Jun 22, 2012 4:29 pm 
Offline

Joined: Wed Jan 07, 2009 11:43 am
Posts: 94
Location: London
First thought is that you should be able to do something like :

Create a number of CollisionObjects with a box collision shape.
put a marker on each object via UserPointer to say if it's a solid or transparent.
go through each CollObject and do a collision world ray test with an all hits callback from each face, check the user pointer on the returned objects and see if it's a solid or transparent.
update your grid accordingly.

I'm sure there are much better ways , but the above 'should' work.


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: Mysticronos, yamasaki and 1 guest


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