2D Toolkit Forum

2D Toolkit => Support => Topic started by: TDippingSauce on September 03, 2015, 09:34:20 am

Title: Can I use box collider with advanced collider?
Post by: TDippingSauce on September 03, 2015, 09:34:20 am
Hi, I'm making 2d sidescroll action game now and I'm using advanced collider for my game because I need multiple boxes for hitbox & hurtbox.

But Also I'm using Raycast method for checking collisions, which means I also need Unity's integrated box colliders for my collision map.

So, If It's all about my tilemap & character collision, everybody will be happy but I want to integrate character & character collision so here's the problem - to use Physics.Raycast method I need box colliders also for my characters.

I can manually add and define box colliders to my character objects(*tested this already and character - character collision works well), but Every characters' hurtbox changes very dynamically per their action and it seems like 2dToolKit automatically changes box colliders for me when I use 'Box Custom' option for my Collider Type option. I need that function.

So, It will be very convenient to use advanced colliders with box colliders...How can I do this?

(*Sry if my english was bad, If there were some part you can't understand please tell me!)


Title: Re: Can I use box collider with advanced collider?
Post by: unikronsoftware on September 09, 2015, 03:44:50 pm
You will need to write a behaviour that listens to sprite changed events and updates your own box colliders. tk2d doesn't manage that for you.