hello all,
i am new to unity as well as game development in general so this may sound like a pretty studied problem but none the less i am facing it my player is continuously detecting background as ground as a result of which the double jump is triggered infinitely and i don’t fall down as long as i keep jumping i have created an infinite runner game based of the live tutorial given by mike giag on 20th jan for 2D game making
Remove any colliders and rigidbody components attached to your background object(s) and you should be fine.
i need the collider in the background as there is an empty game object attached to the camera which destroys the background and adds it ahead of the screen as its kind of an infinite runner game i know whats causing the problem is the collider but i need a way to solve this and i have already got the background camera and the character on different layers yet that didn’t help
By default, different Layers collide with each other. You need to go to Edit->Project Settings…->Physics 2D and unselect the collision checkbox at the intersection of those two different Layers.