Box2D Forums

It is currently Sun May 19, 2013 7:54 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri Jun 15, 2012 4:10 pm 
Offline

Joined: Fri Jun 15, 2012 3:59 pm
Posts: 2
I have Box2D bodies attached to objects that can scale, rotate, and translate in local space.

Besides the obvious, which would be causing a collision, is there any reason that I shouldn't call Set() on a shape in a fixture of a body that is currently active in the world?

Would altering a shape after the body containing it has been added to the world create an inconsistent state in any way?

Thanks


Top
 Profile  
 
PostPosted: Fri Jun 15, 2012 11:59 pm 
Offline

Joined: Tue Jun 24, 2008 8:25 pm
Posts: 1515
Location: Tokyo
Although you may be able to get away with altering the shape in most cases, it's not the intended usage.
Replacing the fixture itself rather than just the shape would give you more reliable results and is not that much more work.


Top
 Profile  
 
PostPosted: Tue Jun 19, 2012 2:46 pm 
Offline

Joined: Fri Jun 15, 2012 3:59 pm
Posts: 2
ok, thanks for the help.

After taking a look at the source though, that looks to be a bit of an expensive process considering my intended usage.. So I think I'll just set the scale at the time the body is added and leave it at that.

Thanks again


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 4 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:
Powered by phpBB® Forum Software © phpBB Group