collision

Member
Posts: 196
Joined: 2002.04
Post: #1
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
Quote this message in a reply
Member
Posts: 196
Joined: 2002.04
Post: #2
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
Quote this message in a reply
Post Reply