Player is attached too high #4

Closed
opened 2021-08-20 20:20:41 +02:00 by erlehmann · 2 comments
Owner

The player is floating above the meshnode controller when attached.

The player is floating above the meshnode controller when attached.
Author
Owner

Fix:

diff --git a/init.lua b/init.lua
index d20dcec..199319e 100644
--- a/init.lua
+++ b/init.lua
@@ -474,7 +489,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
                        meshnode.restore_all(entity)
                        entity.nodes = {}
                elseif fields.attach and entity.player == nil then
-                       player:set_attach(entity.object, "", {x=0, y=15, z=0}, {x=0, y=0, z=0})
+                       player:set_attach(entity.object, "", {x=0, y=5, z=0}, {x=0, y=0, z=0})  -- stand on top of node
                        entity.player = player
                        entity.object:set_animation({x=0, y=0}, 15)
                        default.player_attached[name] = true
Fix: ``` diff --git a/init.lua b/init.lua index d20dcec..199319e 100644 --- a/init.lua +++ b/init.lua @@ -474,7 +489,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) meshnode.restore_all(entity) entity.nodes = {} elseif fields.attach and entity.player == nil then - player:set_attach(entity.object, "", {x=0, y=15, z=0}, {x=0, y=0, z=0}) + player:set_attach(entity.object, "", {x=0, y=5, z=0}, {x=0, y=0, z=0}) -- stand on top of node entity.player = player entity.object:set_animation({x=0, y=0}, 15) default.player_attached[name] = true ```
Author
Owner

Closing because PR #5 was merged.

Closing because PR https://git.minetest.land/Mineclonia/mcl_meshnode/pulls/5 was merged.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Mineclonia/mcl_meshnode#4
No description provided.