xcode - iOS Triangular Image view -


so i'm making game , pretty when player (which triangular shaped rocket) hits object flying @ (a rock) game ends. have working problem rocket triangle yet image view in rectangle. if edge of image view touches rock game end though actual rocket didn't touch object. how can make rock image view not recognize parts of rocket image view empty? triangular shaped image view.

thank help. let me know if need more info or want see code have them collide.

you analytically present triangle 3 points , rock center , radius find , implement algorithm checking hit test between 2 shapes. or draw 2 shapes onto graphics context using appropriate blending , check overlapping pixels (for instance draw 1 red , green , if pixel both red , green exists) 2 image views having colors , .5f alpha added on 3rd invisible view need image view , iterate through pixels. in of cases check after corresponding view frames overlap.


Comments

Popular posts from this blog

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -