API confusion/typo (SOLVED)

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

Isn’t “interesting” supposed to be “intersecting”? It didn’t bother me too much, but I figured I would let you guys know. http://www.defold.com/ref/collision-object/#physics.ray_cast:from-to-groups--request_id- , under examples. Also, for future reference, who should I pm or where should I drop a post if I find other typos?

@sicher is the one responsible for our documentation, and I think it is fine to post your feedback on the documentation here.

1 Like

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!

1 Like

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
3 Likes

Ah, that makes sense. Thanks for clarifying!

1 Like