Correct way to access the CogitoPlayer #202
-
Hi there, first off, Cogito has been fantastic and I'm looking forward to using it more and contributing where I can. (Backstory, feel free to skip to the tl;dr below) That said, when working on the raycasts, I started with using (tl;dr) I've always been taught that accessing "private" variables like |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey, welcome and so glad to hear Cogito has been useful for you. I'd recommend taking a look at the Security Camera script, but basically it works like what you seem to have already going for your enemy:
You can probably attach this whole system to your enemies and it should work. Hope that helps! |
Beta Was this translation helpful? Give feedback.
Hey, welcome and so glad to hear Cogito has been useful for you.
In general, the CogitoSceneManager autoload saves a reference to the player node, which can be used in a pinch.
I'd recommend taking a look at the Security Camera script, but basically it works like what you seem to have already going for your enemy: