What do you think of: (example)
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_on_collisionode(on_collision_fridge) --like register_on_punchnode
And the function will be:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
local register_on_collisionode = function(pos, node, collider) --position of node, node and the collider
--collision to a specific bloc
if node.name ~= "default:tree" then return end
--And here we could get "how" the collider collide the node. exemple:
howCollide = collider:getCollision() --0 = enter on the block 1 = jumping
--And we could also get the collidername
isPlayer = collider.name
end
I don't know if my code is good, but I think that you see what I want to explain.
Sorry for my bad english and I hope that I posted in the good section.