Now I've been trying to fix this bat detection problem for a while now but I decided to revisit it over Easter Holidays, where the bat is supposed to go after you when it see's you.
Using the same the same piece of code from before... I have also tried using other pieces of code before posting this one from before... all came to the same result of the enemy not detecting the player and not moving towards them
I have tested it a few times in many ways such as making a new project and testing it through 2 cubes.
Most of the time it was hitting the floor even though the raycast shown is isn't really even neat the floor that I have put down. The left cube wouldn't even move towards the right cube.
I then started moving the right cube around which is meant to be the player but didn't get much of a result out of that as it was either saying it was hitting the floor again or it was hitting nothing.
After moving it up there was some success as it said it was hitting the player cube which was weird because it only detected the player with the top right area. I even moved it to the left side of the other cube but got the same result from before saying it was hitting the floor or nothing.
Later in the Easter Holiday I then tried again in another new project but using the sprites but also just similar results from the last test.
Although this time it seemed to be following the player... but still ignores the ray cast hitting or detecting the wall right in front of it. It also ignores and doesn't detect the player like usual.
Well if I can't actually show you what was meant to happen I am hoping to explain it to you.
So at this point the bad isn't meant to be able to see you so it would just stay in that one place flapping it's wings like it has no care for the world.
Now it's meant to be able to see you and start flying towards you like a furious predator hunting it's prey maybe... It's a bat... but lets just pretend it some big flying monster for now.
So then the giant flying monsters goes full speed at you with the intention to kill but we got a bat so I guess it can't do much if we can just shoot it to death.
I then talked to my Gameplay and Interactivity teacher Ewan ( Our Lord and Saviour ) after the Easter Holiday's
So I basically explained to him that I have done a few tests and they don't work and he responded with " Your game is fine, just leave it as it is" So essentially... I guess I can leave it.
No comments:
Post a Comment