-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Attachments lag behind bones under some circumstances #14818
Comments
I've also observed this on the CitySim server, where weapons are attached to player bodies. When players drive cars, this happens: The weapon lags behind. I had not made the connection to bones however and could not reproduce it without bones in devtest. I can confirm this on Minetest 5.8.0 and 5.9-dev using the following code: local nt = "no_texture.png"
minetest.register_entity("dev:car", {
initial_properties = {
visual = "cube",
textures = {nt, nt, nt, nt, nt, nt},
static_save = false
},
_timer = 0,
_d = 1,
on_step = function(self, dt)
self._timer = self._timer + dt
if self._timer > 1 then
self._d = -self._d
self._timer = 0
self.object:set_velocity(vector.new(5 * self._d, 0, 0))
end
end
})
minetest.register_entity("dev:helmet", {
initial_properties = {
visual = "cube",
textures = {nt, nt, nt, nt, nt, nt},
static_save = false
},
})
minetest.register_on_joinplayer(function(player)
minetest.after(0, function()
local car = minetest.add_entity(player:get_pos(), "dev:car")
player:set_attach(car)
local helmet = minetest.add_entity(player:get_pos(), "dev:helmet")
helmet:set_attach(player, "Head")
end)
end) The "helmet" attached to the head clearly lags one (?) client (?) step behind: Screencast.from.05-07-24.22.53.22.webm |
Yes, it's one client frame behind. You can force low FPS to make it more apparent. |
Edit: no. 5.5 -> 5.6 would put this into this range minetest/irrlicht@1.9.0mt4...1.9.0mt7 but I see nothing remotely related. |
I actually managed to force 5.5 to bug out so that range might be a red herring. I think there's two different bugs in here and one of them has been gradually getting worse. It would probably help to explain what the game does here: Here are the results of a re-test: I wouldn't rule out that the lowest "layer" of this is something I missed in the last fix. The 5.8 breakage is definitely new. 5.9 adds two new bugs. At this point it might be more economical to just carefully trace what happens during a client frame instead of trying to pinpoint a specific commit. |
ok so jiggle physics aside, I've run into this issue, and it's posing a problem already for adding gun attachments, would be great to see this fixed in 5.10 alongside animation fixes 👍 |
Minetest version
Summary
Possible regression or edge-case loose end of #2813 aka "hat lag"
Under some circumstances, an attachment will lag behind its parent bone. This is best observed when the framerate is limited.
The circumstances are very chaotic, to the point that rotating the camera around a little can reshuffle things and make the bug disappear. The presence of entities could be affecting it, it may be related to the drawing order. The bug seems to only happen when I attach the player to an empty entity.
5.6.0 very likely introduced this regression. I cannot reproduce this in 5.5.0 in any way.It does happen in 5.5 only very rarely
Steps to reproduce
Extra information:
The text was updated successfully, but these errors were encountered: