0 votes

I keep getting this " error Invalid call. Nonexistent function 'get_collider' in base 'Dictionary', which is weird because I followed the docs and they used it the same say way. my code is blow.

func _input(event):
        rayFrom = self.project_ray_origin(event.pos);
        rayTo = rayFrom + self.project_ray_normal(event.pos) * 100

func _fixed_process(delta):

    if(rayFrom != Vector3() && rayTo != Vector3()):
        var space_state = get_world().get_direct_space_state()
        var ray = space_state.intersect_ray(rayFrom, rayTo, [self]);

in Engine by (271 points)

Never used it but space_state.intersect_ray returns a dictionary, not a RayCast node

I think all the collider data is in that dictionary.

My goodness. I think I was just having one of those brain fat moments because I forgot for a sec how dictionaries work :P

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.