Make that only interact with gravity and does not collide

Post about the Flash World Construction Kit and the Alchemy port of Box2D.
Farjuan
Posts: 17
Joined: Thu Mar 07, 2013 4:00 pm

Make that only interact with gravity and does not collide

Postby Farjuan » Wed May 01, 2013 4:04 pm

Im wondering if it was possible to make an object that only reacts with gravity but nothing else so I can make an effect that works with gravity, specificaly a fire effect

IstvanOrosi
Posts: 172
Joined: Thu Mar 01, 2012 9:31 am

Re: Make that only interact with gravity and does not collid

Postby IstvanOrosi » Thu May 02, 2013 2:15 pm

For graphical objects, you could use Flash display objects (i.e. movie clips) and extend those to simulate gravity.

Farjuan
Posts: 17
Joined: Thu Mar 07, 2013 4:00 pm

Re: Make that only interact with gravity and does not collid

Postby Farjuan » Thu May 02, 2013 2:51 pm

IstvanOrosi wrote:For graphical objects, you could use Flash display objects (i.e. movie clips) and extend those to simulate gravity.


Thanks for the reply! But sorry to ask but how would I go about doing that? Do you mean just making an animation? Because I need something like a fire that would react to gravity in case when gravity is reversed

IstvanOrosi
Posts: 172
Joined: Thu Mar 01, 2012 9:31 am

Re: Make that only interact with gravity and does not collid

Postby IstvanOrosi » Thu May 02, 2013 3:21 pm

By fire, do you mean something that would release smoke puffs and those smoke puffs would move based on gravity? Or are you thinking of something different?

In that case it's still possible to use Flash display objects but might be trickier to update the gravity for each smoke puff to use.

In general, for box2d objects, there's collision filtering.
Another way that is simpler to implement: set the isSensor property to true for the smoke puffs. This way all collision check is ignored.

Farjuan
Posts: 17
Joined: Thu Mar 07, 2013 4:00 pm

Re: Make that only interact with gravity and does not collid

Postby Farjuan » Wed May 08, 2013 2:20 pm

IstvanOrosi wrote:By fire, do you mean something that would release smoke puffs and those smoke puffs would move based on gravity? Or are you thinking of something different?

In that case it's still possible to use Flash display objects but might be trickier to update the gravity for each smoke puff to use.

In general, for box2d objects, there's collision filtering.
Another way that is simpler to implement: set the isSensor property to true for the smoke puffs. This way all collision check is ignored.


Yeah using maskbits gives me the effect I kind of desired, thanks


Return to “WCK”



Who is online

Users browsing this forum: No registered users and 1 guest