Code for collision of top of shape...
Hey..
Im trying to write my fishing program and im getting stuck on the coding for a collision which only occurs if the y2 part of the line pierces the top of a shape. The shape must be hit by the y2 part of the line not at the middle of the line or ne thing. The shape is 495 x 255 (a rectangle) and is hidden underneath a fish that scrolls across the screen. I need it so when the fisher casts his line and the line hits any part of the top of the shape then the collision even occurs. Any help?
Thanks,
edit: Ok I found out a way to work it, though it is limiting. The line before didnt completely become equal to the top of the shape :
If Line1.Y2 = Shape1.Top And Line1.X2 >= Shape1.Left Then fish4.Visible = False
so I adjusted the shape and fishes position so now it does become equal so it works...but that is limiting because now i have to make the fish in set positions if the line is to become equal. Any way around this?