Hello everybody,
Is there a way to get the height and width of the collided object?
Something like:
local height = go.get("#collisionobject", "height")
or
function on_message(self, message_id, message, sender)
-- check for the message
if message_id == hash("contact_point_response") then
-- get the other object's height
local other_height = go.get(message.other_id, "height")
end
end
I am working with the getting started tutorial (the frog infinite/endless runner) and I think that it would be nice to add the feature of “Ledge Grab”:
It looks fun, doesn’t it?
But I haven’t found how to retrieve the exact size and position of the collided platform to determine if the hero is grabbing the ledge.
I am thinking that I have to “play” with a work around, like using different collision objects in my game object, like:
or in the platform object
to think out of the box…
Any suggestions?