Better Item Collision

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

Better Item Collision

by jordan4ibanez » Sat Dec 15, 2012 19:57

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.
If you can think it, you can make it.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sat Dec 15, 2012 20:19

Will test this to possibly bring this upstream.
 

User avatar
jmf
Member
 
Posts: 164
Joined: Mon Nov 05, 2012 18:13

by jmf » Sat Dec 15, 2012 20:47

+over 9000!
That'just what I need!
Thanks jordan4ibanez!
My ingame name is "john", my IRC name is "john_minetest".
I am chef mod on this server: minetest.org : 30015(see here)
"I am immune to signature virus." <-- Add this to your signature to gain immunity!!!
 

User avatar
Zeg9
Member
 
Posts: 608
Joined: Fri Sep 21, 2012 11:02

by Zeg9 » Sun Dec 16, 2012 09:00

+1, or more, because I always wanted this.
Thanks!
I made a few (a lot of?) mods for minetest: here is a list.
See also the MT-Faithful texture pack (work in progress).
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Dec 16, 2012 10:33

I pushed this upstream.
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Sun Dec 16, 2012 11:21

+1000 Great!
I just hate when items are froating in the air when dropped on pressure plates, stairs, etc.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 4 guests

cron