I have a Rigidbody2D object with a box colider that has a child sprite object attched to it, but unity engine doesn’t detect collisions with this object anymore. Is there any specific code I need to implement or was there something I did wrong?
My project can be found here: https://drive.google.com/file/d/0B4RdkwinGvTfcU1DUVB2bjdVLXc/view?usp=sharing
1- On your Player
GameObject, do the following in the inspector to the Rigidbody2D component:
-
Set IsKinematic to false (untick the checkbox).
-
Freeze Rotation on Z axis (tick the checkbox).
2- In the scene:
- Create a Down Border as in the screen-shot below, and add a Box Collider 2D component to it just like the Left Border and Right Border. This Down Border acts as a floor to your player.
BTW the character is really cute, merely going left and right was fun Keep up the good work even though if this wasn’t entirely your work and never give up on solving problems and creating your own work
Your imagination is your limit.