New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Player_api: Give laying players a low selection/collisionbox #2184
Conversation
Updated. |
Attends to issues caused by dead players having upright boxes. Add a new model field 'collisionbox_lay'. Reset boxes to normal on player respawn.
Added documentation @SmallJoker |
Regarding different collision boxes. There could be more appearing, depending on the "mode" of the player. For that reason I think it would make more sense to change the format of the |
Good point, making it expandable for more box types, will try that. |
Updated to improve 'reset_box' API. Now i need to consider your other suggestion. |
Looks quite good already, although a structure like this would allow to assign a collisionbox to all available player:set_properties({
collisionbox = model.collisionbox[player_anim[name]] or model_collisionbox_default
})
-- Using a model definition like this:
{
-- ... animations ...
collisionbox = {
lay = {-0.6, 0.0, -0.6, 0.6, 0.3, 0.6},
sit = { ?? },
-- whatever; custom animations?
}
} This would allow integrating it dynamically into |
It's quite a good idea but needs consideration. |
I've ground to a halt on this due to the consideration the suggested improvements need, which i don't feel like attending to. |
My approach here was entirely wrong, and SmallJoker's suggestion is going in the right direction. |
^ Killing player
^ Dead
^ Boxes are sized to diagonally laying player to not be excessively large, quite a nice fit
^ Dead player respawns, boxes reset
Attends to https://github.com/minetest/minetest/issues/7510