Permalink
Browse files

Put energy in it's own collision group so that it doesn't collide wit…

…h itself.
  • Loading branch information...
1 parent 0d5e397 commit 32e18446d9e07bee61ba6e4abd16162d3148810a namaste committed Oct 9, 2008
Showing with 2 additions and 1 deletion.
  1. +2 −1 soylent/GoD/main.cpp
View
@@ -154,6 +154,7 @@ void logic ()
cpSpaceAddBody(space, body);
shape = cpCircleShapeNew(body, radius, cpvzero);
shape->e = 0.0f; shape->u = 1.0f;
+ shape->group = 1;
cpSpaceAddShape(space, shape);
}
@@ -210,7 +211,7 @@ void drawCircle(cpFloat x, cpFloat y, cpFloat r, cpFloat a)
void drawCircleShape(cpShape *shape)
{
- glColor3f(0.0, 1.0, 0.0);
+ glColor4f(0.0, 1.0, 0.0, 0.5);
cpBody *body = shape->body;
cpCircleShape *circle = (cpCircleShape *)shape;
cpVect c = cpvadd(body->p, cpvrotate(circle->c, body->rot));

0 comments on commit 32e1844

Please sign in to comment.