I have a simple game where I require a certain amount of collision detection from my models. However, I do not need physics in this so the checks are actually mostly just box checks or shape checks which need to trigger an event.
I got it to work using RigidBody2D + BoxCollider2D on the colliding object and BoxCollider2D (With isTrigger set to true) on the other one.
I do my translations currently using translate rather than physics (Time will tell whether I will do it like this in the end as well).
So my question is that is there a way to clip the Rigid Body out of the whole equation. I feel like the current model is a bit silly given that I have a Fixed Angle rigid body (All game characters will be like this and there might be many so this creates overhead?) objects with all the variables set to 0.
Hi, Maybe this is not the best approach and probably you are not expecting this answer anymore, but someone like me could reach this thread and this could be useful for him:
If you add a rigidbody with “Is Kinematic” = true and set the box collider with “Is Trigger” = true
you can detect collision using the following code:
The solution I found was adding a rigid body and freezing x, y and rotation,the solution I found was to just add a rigid body and freeze rotation, x and y
Yeah, you can drop the rigidbody and just do everything with colliders. Then you can respond to events OnTriggerEnter2D, OnTriggerStay2D, and OnTriggerexit2D.
Hey man, I tried those mothods using only colliders, but it just wont work. The only way I managed to make it work is using a rigidbody as Muhwu said. Can you elaborate a bit more on how you have done?
Yes I'm using the new classes for 2D content. Right now the game is behaving as I want, but like I said, it's weird being forced to attach a rigid body. Before I found this post I already felt like I should be able to do it with colliders and those methods you pointed out, basically after you post I just retested everything I had already done hehehe.
This worked, Remember not to turn "simulated" off.
– gugelscriber