I have tryed to figure this out but I found nothing, I have 2 sprites same x cordinate and when the y and z meet They Pass through each other. I have the 2D box colliders checked off. Thanks For Reading This! Hope U Know How To Help ![]()
Please Donāt Start Each Word From The Capital Letter - itās difficult to read ![]()
As for the problem, try to add RigidBody2D. I have colliding objects, both have Box Colliders 2D with āIs Triggerā turned on and Rigid Bodies 2D with āGravity Scaleā == 0 (so as not to let them fall).
Thanks for helping me with that Caps Thing (i edited it and fixed it). Sorry I am 10 and new to Unity so Iām still learning :).
I tried that and it isnāt working. My project can be found here(Link: Dropbox - Error - Simplify your life), could you look at it and tell me why the collision detection isnāt working? WASD to move (if needed TFGH for creeper move)
For starters you are using Vector2 so there is no Z-axis anyway.
I am assuming you are using the latest version of unity at this point in time and are using the 2D system so set the game up for 2D by using an orthographic camera and click the ā2Dā button in the scene tab.
You dont need to put ; at the end of the closing } in ācreeper following algorithm.jsā
You dont need any transform.position.z really as you are not using them.
This should never be true if you want to detect the collision as the colliders should stop this happening:
if (cx == sx cy == sy)
{
transform.Translate(Vector2(1, 0) * Time.deltaTime * speed);
}
There are some other things so I made a package of the changes I made.
Make sure the main camera is set to:
position x0 y0 z-10
projection orthographic
size 12
clipping planes near 0.3 far20