Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Level Editor - Pausing Enemies #37

Open
TheYellowArchitect opened this issue Aug 11, 2022 · 0 comments
Open

Level Editor - Pausing Enemies #37

TheYellowArchitect opened this issue Aug 11, 2022 · 0 comments
Labels
bug Something isn't working enemy ai Anything related to the logic and behaviour of monsters level editor Anything related to the level editor unity engine Anything related to Unity Engine itself

Comments

@TheYellowArchitect
Copy link
Owner

TheYellowArchitect commented Aug 11, 2022

Each ground tile has 1 BoxCollider2D
In the below images, the hollow running to the right (runs towards the player), stops as if it hit a wall to the right.
Sure, if the right ground tile was higher in elevation, even by a pixel, the box collider would instantly stop.
But this is not the case, as you can see in the images below.

pauseenemyBug4
pauseenemyBug1
pauseenemyBug2
pauseenemyBug3

Since the colliders are at the exact same height/elevation, I think it is a Unity Engine bug.
For now, I did a disgusting hack, which is:
if (level editor && not satyr) sidewalled = false;

Optimally, I would merge the ground tiles in the level editor, which would result in great performance too.
But dont collision meshes merge by default, when they are marked/tagged as static? -_-

P.S. GroundCollision attached to every enemy, has nothing to do with sidewall, because it exists exclusively to check if grounded. Child's trigger collider certainly doesn't trigger parent's normal collider. tl;dr: The bug is located in EnemyBehaviour and that same gameobject's collider.

@TheYellowArchitect TheYellowArchitect added bug Something isn't working level editor Anything related to the level editor enemy ai Anything related to the logic and behaviour of monsters unity engine Anything related to Unity Engine itself labels Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enemy ai Anything related to the logic and behaviour of monsters level editor Anything related to the level editor unity engine Anything related to Unity Engine itself
Projects
None yet
Development

No branches or pull requests

1 participant