Box2D Forums

It is currently Tue Jul 29, 2014 1:39 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Feb 21, 2012 9:47 am 
Offline

Joined: Thu Dec 17, 2009 9:53 am
Posts: 31
box2dweb 2.1a version: http://code.google.com/p/box2dweb/

Hey all, having a bit of trouble with the port. I am able to change the filter group of my objects dynamically (logs out fine) however, changing fixtures bodies at runtime seems to have no effect in the web vesrion.

I noticed for older box2d versions there was a world.refilter method that has been depreciated... any ideas to make my box2d bodies react to having their collision filter changed?

Background Info:
doing this for a game where there's 2 pirate ships that shoot at each other - when a cannonball hits a ship I change it's collision group so it should stop contacting the ship... but it does

I also tried adding my filter changes to an array and calling setfilterdata before the world timestep, but same issue.

TL;DR setting collision groups when creating fixtures works, but not dynamically during runtime with setfilterdata... pulling my hair out.


Top
 Profile  
 
PostPosted: Tue Feb 21, 2012 10:45 am 
Offline

Joined: Thu Dec 17, 2009 9:53 am
Posts: 31
Ah my bad, was unaware of contact.FlagForFiltering();


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 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