Quantcast
Channel: Latest Questions by esitoinatteso
Viewing all articles
Browse latest Browse all 92

Pixel Perfect Collision 2d

$
0
0
Hi there! I used to program in flash with as3 and I remember there was this awesome script originally made by Troy Gilbert, I think, that improved drastically flash's collisions. Ofcourse I'm not smart enough to understand every single line of that code, because I'm still a newbie to program in general... still, I'd really like to introduce those behaviours in my current unity's project. I've done some researches to acquire the right terminology, at least I hope so, and I'm here to ask for your help. Ofcourse I'm not expecting you to provide me the code, that would be ridiculous on my behalf. What I'd like to hear from you are suggestions on what would be the best way to deal with this topic. Right now I've got a Plane to which I attached the 2d texture of my player, setting the object's material to Transparent->Diffuse. Obviously my player's appearance is a little bit different from the one of a Plane, and what I believe would happen now, if I were to script OnTriggerEnter collisions based upon the current object's collider, is that my player would collide even though you couldn't see it because of the Mesh Collider -> Plane. What should I do to make collisions true only when something "visible" overlaps another "visible" thing? I was thinking about alpha channel and I've read someone was happy with the result of something similar, sadly I couldn't understand the whole process. I'd really appreciate every suggestion and explanation on the subject, thanks!

Viewing all articles
Browse latest Browse all 92

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>