0
votes

I am making a game using AndEngine and Box2D. I am making a pong style football game and I want keeper to act like a static body when ball collides with it. When they collide keper moves too and it makes my game unplayable. I have tried to do something using contactListener but it doesnt work.

2
is the keper body type Kinematic?LordRaydenMK
Its body type is DynamicArda Kara

2 Answers

1
votes

Set the body type of the keeper as Kinematic.

A kinematic body is an hybrid body which is not affected by forces and collisions like a static body but can moved with a linear velocity like a dynamic body.

You can move it, but if it gets hit by a ball it wont move.

0
votes

Why don't you do the keper body type static? That way it will have infine mass and not move, read more here.