Page 1 of 1

Better Item Collision

PostPosted: Sat Dec 15, 2012 19:57
by jordan4ibanez
If you replace Line 88 of item_entity.lua
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
if not minetest.registered_nodes[nn] or minetest.registered_nodes[nn].walkable then


With this:
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 v = self.object:getvelocity()
if not minetest.registered_nodes[nn] or minetest.registered_nodes[nn].walkable and v.y == 0 then


It makes it so you can throw items onto nodes with nodeboxes without awkward floating items

This is helpful, say in adventure maps, you could have a section where you throw an item onto a mesecons pressure plate, it would work with this small modification.

Or you could have items drop down pipes or into nodebox baskets or something.

PostPosted: Sat Dec 15, 2012 20:19
by PilzAdam
Will test this to possibly bring this upstream.

PostPosted: Sat Dec 15, 2012 20:47
by jmf
+over 9000!
That'just what I need!
Thanks jordan4ibanez!

PostPosted: Sun Dec 16, 2012 09:00
by Zeg9
+1, or more, because I always wanted this.
Thanks!

PostPosted: Sun Dec 16, 2012 10:33
by PilzAdam
I pushed this upstream.

PostPosted: Sun Dec 16, 2012 11:21
by kaeza
+1000 Great!
I just hate when items are froating in the air when dropped on pressure plates, stairs, etc.