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

Modified security camera to use player light level for detection #306

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

niefia
Copy link
Collaborator

@niefia niefia commented Oct 3, 2024

Modified camera to use player light level for detection

Renamed spot_time to detection_threshold to reflect this change

Modified camera to use player light level for detection

Renamed spot_time to detection_threshold to reflect this change
@niefia niefia changed the title Modified camera to use player light level for detection Modified security camera to use player light level for detection Oct 3, 2024
@Phazorknight
Copy link
Owner

Hey, thanks for this. I've had a family emergency, so for the next couple weeks, I won't be able to work on Cogito as much as I used to. I'll trust all Cogito collaborators to review and approve any PRs and merges.

Copy link
Owner

@Phazorknight Phazorknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few thoughts on this:

  • This now seems very dependent on the Cogito Player having a lightmeter component. I personally don't use that component at all, so I'd want this to be integrated as purely optional.
  • Also worth keeping in mind if we'd want the camera to be able to detect other entities (like other NPCs or enemies)

Detection method added to allow for easy removal and use of only Time for detection

Dynamic Lightmeter find on body enter means that lightmeter is not just set to use player lightmeter,
meaning NPC could also have attached lightmeter and this is used for detection

Also added a non_player_detection_list  array for non-player objects that should be detected to avoid detecting irrelevant objects
Copy link
Owner

@Phazorknight Phazorknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for these updates.
I think that'll do nicely.

Let me know if you still wanna add to it or if it's good to merge.

@niefia
Copy link
Collaborator Author

niefia commented Oct 11, 2024

In future I'd probably want to revisit the non_player_detection_list, and make it use the custom class names instead of just names.
But there's not a good way of doing that in the current version of Godot.
Once we've updated to 4.3 might revisit since there is a way of doing that in 4.3: godotengine/godot#21789

Other than that I'm happy to merge

@Phazorknight Phazorknight merged commit ea31b26 into Phazorknight:main Oct 11, 2024
1 check passed
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.

2 participants