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

Allow to ignore multiple objects when checking for collisions #3197

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tobbi
Copy link
Member

@tobbi tobbi commented Feb 2, 2025

Basically, it's in the title.

Currently, only one object can be set as ignore object for the collision system. This is alright when we want to prevent self-collisions. However, sometimes multiple objects need to be ignored. For example in case of ledge behaviour where we want to prevent badguys from assuming players can be walked on.

Therefore, I changed GameObject* ignore_object to const std::vector<GameObject*>&.

Furthermore, I've changed the code to ignore players when checking whether the badguy may fall because we don't want badguys to consider players as suitable target for continuing to walk when their ledge behaviour is set to stay on the platform.

Fixes #3194

MatusGuy

This comment was marked as off-topic.

@MatusGuy
Copy link
Member

MatusGuy commented Feb 2, 2025

Oops, accidentally reviewed sorry

@tobbi
Copy link
Member Author

tobbi commented Feb 2, 2025

Why does this ignore only players now? Does this fix a bug?

Fixes #3194 (see title)

@tobbi
Copy link
Member Author

tobbi commented Feb 2, 2025

Maybe RayCastIgnore::IGNORE_OBJECTS would yield the same result? IDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Haywire player ledge collision error
2 participants