Reputation: 21
I am working on unity2d .I have a game object called "gameobject1" on screen . It holds an image (named "state"). when i drag a tree on a "gameobject1" collision is not detecting in the same layer. anybody know the issue?
Upvotes: 0
Views: 428
Reputation: 553
Please check the following.
Go to Physics settings in Edit/Project Settings/Physics2D (because you are in 2D mode). Check whether everything is perfect in the collision matrix/triangle.
From script you must use OnCollisionEnter2D / OnTriggerEnter2D methods to receive collision notifications.
If the above two steps are correct then check how you created the Unity Project. Tat is 2D Mode or 3D Mode. Because for 2D games 2D Mode is recommended while creating new project.
Upvotes: 1