-- In Defold, one-way platforms use
-- a Kinematic collision object with
-- "Group" set to "platform"
-- and the player checks velocity.y
-- to determine if landing is allowed

-- Player script addition:
function on_message(self, message_id, message, sender)
    if message_id == hash("contact_point_response") then
        if message.group == hash("platform") then
            -- Only land if falling down
            local vel = go.get(go.get_id(), "velocity")
            if vel.y 0 then
                self.grounded = true
            end
        end
    end
end