Circular collision detection

I have a program with trees that require me to calculate for collision detection. I can get how to detect if I’m touching the tree, but my problem is to make it so if I try to move even at an angle I don’t get stuck. I am trying to make it so you would be able to run along a row of trees while looking at them like in games. Does anybody have any ideas?

You could treat the tree like a wall which is perpendicular to the tree’s vector relative to the camera. Then slide the camera against that wall like I’m doing in my example I posted.

http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=6;t=000475

That’s what I’m planning to do.

Ok, sounds great, but I don’t know how to implement that. I have something that seems it could work, but I can’t figure out how I could get it to work. Here is the code that I find might have some potential. Note: this code was meant for particles to face the cam at all time.

GLfloat matrix[16];
glGetFloatv( GL_MODELVIEW_MATRIX, matrix );
vector3_t right( matrix[0], matrix[4], matrix[8] );
vector3_t up( matrix[1], matrix[5], matrix[9] );

vector3_t p( x,y,z );

//Now create each particle:
glBegin( GL_QUADS );
glTexCoord2f( 0.0f, 0.0f );
glVertex3fv( (p + (right + up ) * -size ).v );
glTexCoord2f( 1.0f, 0.0f );
glVertex3fv( (p + (right - up ) * size ).v );
glTexCoord2f( 1.0f, 1.0f );
glVertex3fv( (p + (right + up ) * size ).v );
glTexCoord2f( 0.0f, 1.0f );
glVertex3fv( (p + ( up - right ) * size ).v );
glEnd();

I’m not that great with vertex pointers I just prefer to define the x, y, and z points of each vertex