Page 1 of 1

Request for 1.5 physics

PostPosted: Sat Mar 10, 2012 7:51 am
by SuperSonic
So, I was using the pre-release of GE 1.5 and was expirementing (spelled that wrong I think xD) with the new physics. A problem that I noticed was that when messing with dynamic and static actors is that I couldn't specify which actors were supposed to collide and which weren't. Like, I wanted two different actors to collide with the ground but not with eachother. Is this possible to change? If not, could it be implemented in the final release? :)

Thanks, SuperSonic

Re: Request for 1.5 physics

PostPosted: Sat Mar 10, 2012 8:46 am
by skydereign
The physics actors are a class of actor. They all must interact with other physics actors. So currently I don't think there is a way of setting them up to collide with only some of the other physics actors. This in general is more convenient because you don't have to specify all actors to collide with every other actor. I'm assuming you mean that you should be able to add collision events with other physics actors, which causes the actors to interact, yes? Otherwise I don't really see how it would be implemented.

Re: Request for 1.5 physics

PostPosted: Sat Mar 10, 2012 3:05 pm
by SuperSonic
skydereign wrote:I'm assuming you mean that you should be able to add collision events with other physics actors, which causes the actors to interact, yes? Otherwise I don't really see how it would be implemented.

Yeah, isn't their any way we can have the new physics implemented through PhysicalResponse()?

Re: Request for 1.5 physics

PostPosted: Sat Mar 10, 2012 9:23 pm
by skydereign
The thing is the physics actors are constantly under the influence of the physics engine. It isn't just the collisions themselves. So you couldn't just isolate it to the PhysicalResponse, though that would have been nice.

Re: Request for 1.5 physics

PostPosted: Sat Mar 10, 2012 10:09 pm
by SuperSonic
Aw darn =/

Is there any chance that we could fix this problem in the future? :D

Re: Request for 1.5 physics

PostPosted: Sun Mar 11, 2012 12:42 pm
by akr
Thats a very good point. Is already implemented and should work. You can test this e.g. with the machine example.

As long as we dont have a documentation see here:

http://www.box2d.org/manual.html

and search for "Groupindex":
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Collision groups let you specify an integral group index. You can have all fixtures with the same group index always collide (positive index) or never collide (negative index). Group indices are usually used for things that are somehow related, like the parts of a bicycle. In the following example, fixture1 and fixture2 always collide, but fixture3 and fixture4 never collide.

fixture1Def.filter.groupIndex = 2;

fixture2Def.filter.groupIndex = 2;

fixture3Def.filter.groupIndex = -8;

fixture4Def.filter.groupIndex = -8;
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Re: Request for 1.5 physics

PostPosted: Sun Mar 11, 2012 8:17 pm
by SuperSonic
Oh wow akr. Thank you and +1 :D