Possible to change the player hitbox ?

User avatar
Sirvoid
Member
 
Posts: 47
Joined: Thu Feb 04, 2016 22:12
Location: Canada
GitHub: Sirvoid
IRC: Sirvoid
In-game: Sirvoid

Possible to change the player hitbox ?

by Sirvoid » Fri Feb 05, 2016 00:10

I want to make a mod that need to change the hitbox of the player.

But is it possible ? :|
 

Byakuren
Member
 
Posts: 816
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: Possible to change the player hitbox ?

by Byakuren » Sat Feb 06, 2016 06:46

Yes, use the set_properties method of ObjectRef to change the collisionbox property of a player.

This will change the box that people are able to click to target a player, not sure how much it affects other things though.
Every time a mod API is left undocumented, a koala dies.
 

User avatar
stu
Member
 
Posts: 923
Joined: Sat Feb 02, 2013 02:51
Location: United Kingdom
GitHub: stujones11

Re: Possible to change the player hitbox ?

by stu » Sat Feb 06, 2016 18:10

Byakuren wrote:Yes, use the set_properties method of ObjectRef to change the collisionbox property of a player.

This will change the box that people are able to click to target a player, not sure how much it affects other things though.

set_properties only allows you to change the player's 'selection box' but does not change the actual 'collision box' though I see how this can cause some confusion as the property is called collisionbox

Being able to set the collision box could be very useful for custom player models, for example being able to move through single node high tunnels. There has, of course, been a PR for this since May last year ;-)

https://github.com/minetest/minetest/pull/2738
 


Return to Modding Discussion



Who is online

Users browsing this forum: No registered users and 1 guest