PDA

View Full Version : collision


Iceman
2002.08.17, 08:56 PM
Hi,

Here's the dowload code:
http://www.geocities.com/jonwhitejamos/laser2.sit

What I'm having trouble with is that when I run laser[j].y -45; It rotates and doesn't work properly with the distance collision:
distance = sqrt(((laser[j].x - xRock) * (laser[j].x - xRock)) + (((laser[j].y - 45) - yRock) *
((laser[j].y - 45) - yRock)));

try the GL_POINTS that I added in the "laserStruct" code to see what I'm talking about.

Thanks,
Iceman

Iceman
2002.08.18, 07:36 PM
If the link doesn't work copy and paste it into your browser. Can someone please help I've already tried posting this on the apple OpenGL mainling list, but I'm still totally confused about how to fix the problem. What I'm trying to do is get the collision to be 45 units behind the laser at all times instead of rotating around point 0.

Thanks,
Iceman