public void render() { // Draw a triangle rotated in the direction of velocity float theta = vel.heading2D() + PApplet.radians(90); fill(100); stroke(0); pushMatrix(); translate(loc.x, loc.y); rotate(theta); beginShape(PConstants.TRIANGLES); vertex(0, -r * 2); vertex(-r, r * 2); vertex(r, r * 2); endShape(); if (debug) { stroke(50); line(0, 0, 0, -sight); } popMatrix(); }