Hey, I was looking into raycasts on the api when I ran into this:
function init(self)
self.my_interesting_groups = {hash("my_group1"), hash("my_group2")}
end
function update(self, dt)
-- request ray cast
physics.ray_cast(interesting_start, interesting_end, self.my_interesting_groups)
end
I think that’s supposed to say “interesting” as in “these are the groups we’re interested in colliding with” but I agree it’s a bit weird. I’ll make a note of it. Thanks for the report!
I think I’m to blame for it and that it’s like @sicher says. It’s not a part of the API but an example of usage. I agree it’s bad since it causes confusion. It could be:
function init(self)
self.my_groups = {hash("my_group1"), hash("my_group2")}
end
function update(self, dt)
-- request ray cast
physics.ray_cast(my_start, my_end, self.my_groups)
end