Hello there, i'm trying to detect collision between 2 KinematicBody2D in my scene, but whenever i try to use the move_and_collide().collider, it tells me the function does not exist... ?
Thank you in advance for your help !
collider is an Object, not a function. You can do this:
Also, welcome to the forum!
@cybereality , thank you, your answer helped me a lot. It's some rookie mistake, but i started using godot not so long ago. I guess i'll spend a lot of time on that forum trying to figure things out
Awesome! So glad to help.
I tried this tactic but it says collision isn't in the current scope
@Dev_start - Can you share the code you are using? If GDScript is saying a variable is not in the current scope, it generally means it is defined in the wrong location, like attempting to use a function-defined variable outside of the function it was defined in.
Also: This comment was caught in the moderation queue since you have not confirmed your account yet.
Upon creating your account you should have received an account verification email. The confirmation email may have been incorrectly flagged as spam, so please also check your spam filter. Without confirming your account, future posts may also be caught in the moderation queue. You can resend a confirmation email when you log into your account if you cannot find the first verification email.
If you need any help, please let us know! You can find ways to contact forum staff on the Contact page. Thanks!