Box2D Forums

It is currently Tue May 21, 2013 9:53 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Jun 02, 2011 1:24 pm 
Offline

Joined: Sun Dec 12, 2010 9:56 am
Posts: 49
Hi,

I have a square shaped object thats viewed from a 3D perspective like in the graphic below, and it's using Box.as, but i dont want the whole shape to have a collision area.

I just want the red area to be used for collision, so that the grey area will go through other objects (like walls or whatever), while the red area does not ... How can i do this? Would i have to change code or is there some way i could do this with the Component Parameters? Or any other way like somehow attaching a graphic to a box shape?

Image


Top
 Profile  
 
PostPosted: Thu Jun 02, 2011 5:34 pm 
Offline

Joined: Mon Jul 12, 2010 2:15 am
Posts: 47
You could make the object a BodyShape and add an invisible box inside of it.


Top
 Profile  
 
PostPosted: Fri Jun 03, 2011 2:48 am 
Offline

Joined: Sun Dec 12, 2010 9:56 am
Posts: 49
That works perfectly, thanks for that :)


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

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users 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:
Powered by phpBB® Forum Software © phpBB Group