Game Dev |
I couldnt find anything online other than an article that says you need to make child objects to have multiple colliders in the same object and be able to manipulate them however when I do this and try to use oncollisionenter function then type collision.gameobject.comparelayer function it only applies for the parent collider not the child or both colliders and I only want this function to apply for 1 of the colliders (child object to be specific) not both. I guess I could make a totally different script for the child but I was wondering if there is a more effiecient way to do it without having to create a seperate other script because I dont want my game or coding to be a pile of spaghetti.
Edit: also im doing this for groundcheck, feel free to tell me a better method if this one is bad for performance
submitted by /u/ultimateteamofwinter
[link] [comments]
Unity 3D, 2D, VR/AR & Video Engine | News, Chats, Questions, Projects & Info