Get_collider() isn't a function anymore?

Godot Version

4.2.2

Question

Hello everyone.

I’m doing the tutorial for Godot’s 3D Squash the Creeps game, and I’m trying to get over a bump.

How can I get around these errors ?

here are the errors I get.

I’m in a learning process. If the solution is easy don’t shout please haha.

pastebin

Huge thanks to anyone replying.

You’re calling get_collider() on an integer.

1 Like

I gathered that but how can I solve this ? The tutorial on Godot Docs seems out of date, and I’m just learning the engine (and scripting too) ? Can I input a parameter into the get_collider() for this to work ? or I need another function ?

Yes, you can pass an integer index to get_collider() to get an object. I never use this form, so I’m not familiar with what you get in return. It seems like it returns the actual object being collided with rather than returning a KinematicCollision3D.

1 Like

I solved it ! Indeed I forgot the index int in the “get_slide_collision(index)” func. My reading capabilities were the problem. Sorry for the inconvinience and thanks for the help !

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.