So I have just began 3D game dev and I wanted to start off simple with the endless runner brackeys make around 5 years ago but to add a random generation of obstacles each time to challenge myself, the entire project works completely fine other than the fact that the "ObstacleSpawn" Gameobjects which i use the transforms of are allowing the player to collide with them so it currently looks like the player is hitting an invisible wall and you have to manually restart. Is there a way to fix this?
#GameObjects colliding with player
1 messages · Page 1 of 1 (latest)
are you using an OnCollisionEnter method in the player and testing for layers/tags?
And what is the invisible wall you're talking about?
the gameobject is the invisible wall
like i have a gameobject, have set them to three seperate positions so that I can randomly spawn obstacles from them, however those gameobjects seem to be acting like a real collider and are allowing the player to collide into them.
layer based collision
https://docs.unity3d.com/Manual/LayerBasedCollision.html
or emove the colliders from obstacle start if you dont need them
The only thing on the gameobjects is the transform
it could be that when you spawn your obstacles, they are initially at the wrong place which leads to a collision response. maybe you can post a video on the behaviour you get and the spawn code