When removing block under player using Platypus, player is launched upwards

#1

As can be seen in this video:

When a block is removed underneath the player, they hop up just a little bit. I know this is related to platypus.lua:473-481

-- was the ground we're standing on removed?
if platypus.parent_id then
    local ok, _ = pcall(go.get_position, platypus.parent_id)
    if not ok then
        platypus.parent_id = nil
    	state.current.ground_contact = false
    	go.set_position(go.get_position() + state.current.world_position - state.current.position)
    end
end

I am wondering if anyone else has found a safe way of mitigating or completely removing this effect. I especially direct this towards @Bjorn_Ritzl, for he wrote Platypus. Any help would be greatly appreciated! I can modify the code myself, but I want a more permanent and safe solution than just…adding a negative y vector to minimize the size of the hop.

0 Likes

#2

I’m on vacation. Please create a ticket in the GitHub repo and I’ll take a look when I’m back.

3 Likes

#3

Sure thing. It’s not a huge deal so don’t feel rushed at all.

2 Likes

#4

Thanks. I’ve looked into it and have followed up in the GitHub Issue (https://github.com/britzl/platypus/issues/12)

3 Likes

#5

Thanks! I will try to give the example when I get some free time.

2 Likes

#6

Alright @britzl , I have added an example and also left a comment on the issue itself.

0 Likes

#7

Thank you so much @britzl! It works great now.

1 Like

#8

Ah, yes, I found a problem last night and released a new version but forgot to post back here.

3 Likes

#9

I hope you are getting paid in millions for your work :smiley:

1 Like

#10

3 Likes