Triangle Collision
Hello Guys,
in my game i have blocks. One of my block types should be a triangle (like a rectangle but sliced in the diagonal middle). How can i make my ball collide with the triangle (theres only rectengle and circuar shapes for collision)
Thanks
DavidsChannel
in my game i have blocks. One of my block types should be a triangle (like a rectangle but sliced in the diagonal middle). How can i make my ball collide with the triangle (theres only rectengle and circuar shapes for collision)
Thanks
DavidsChannel
Best Answer
-
gyroscope I am here.Posts: 6,598
Yes, that'd be great, wouldn't it. It's been promised; don't know when that feature will appear tho' ...""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Answers
I believe they only have box and circle for the colission box, but this does not mean you cannot control the reaction of said colission. You could check the object of the colission, and if it's a triangle, you can have it "bounce" off at a 45 degree angle.
If you are talking about the visual of the colission, I'm not there yet myself.
@DavidsChannel
Hi, as you and @InLaNoche rightly say, there's only square and circle shapes collision detection at the moment.
So for something like a triangle, you'll need to put three transparent actors on the triangle's sides to detect collision. If the triangle image is moving, the three transparent "collision detectors" will need to move with it using Constrain Behaviours. Hope that helps out.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
I will hope gamesalad will make an collision box around the alpha channel, so you can almost collide with every shape.