Box2D Forums

It is currently Thu May 23, 2013 2:31 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Jun 06, 2011 2:55 pm 
Offline

Joined: Fri Apr 29, 2011 11:46 am
Posts: 5
I have a basic movieclip with a base class of shapes.Box. How can I add graphics to the shape that are larger than the actual shape itself without affecting its mass?

i.e. say I have a box that is 100x100 and I've tuned my game so that the object behaves how I want it to at that size. I want to add something to the box that is say 150x150 around the box, so that its easier to for the user "grab." When I do this however, it obviously changes the box's behavior to gravity, density, etc.


Top
 Profile  
 
PostPosted: Mon Jun 06, 2011 4:24 pm 
Offline

Joined: Fri Dec 14, 2007 8:07 pm
Posts: 913
Instead of extending shapes.Box extend BodyShape directly. Then place another shapes.Box symbol inside it.


Top
 Profile  
 
PostPosted: Mon Jun 06, 2011 9:02 pm 
Offline

Joined: Fri Apr 29, 2011 11:46 am
Posts: 5
mayobutter wrote:
Instead of extending shapes.Box extend BodyShape directly. Then place another shapes.Box symbol inside it.


How can I make one of those shapes.Box's not affect the physics of the body though?


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