"upright_ sprite" players appear off the ground

Post Reply
Orby
Member
Posts: 85
Joined: Sat Aug 18, 2012 03:59
GitHub: orbitaldecay
IRC: orbitaldecay
In-game: Orby
Location: Baltimore, MD

"upright_ sprite" players appear off the ground

by Orby » Post

I am attempting to implement a player texture of visual style "upright_sprite", but the player appears exactly one cube off of the ground:

Image

I'm setting the following properties on the player when they join:

Code: Select all

    player:set_properties({
        textures = { "player.png^[colorize:" .. color:lower() .. ":120", "player_back.png^[colorize:" .. color:lower() .. ":120", },
        visual = "upright_sprite",
        visual_size = { x = 1, y = 2 },
        collisionbox = {-0.5, 0, -0.5, 0.5, 2, 0.5 },
        initial_sprite_basepos = {x = 0, y = 0},
    }) 
Does anyone know how to fix this or what is causing it?
Attachments
screenshot_20180720_142828.png
screenshot_20180720_142828.png (78.9 KiB) Viewed 372 times

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: "upright_ sprite" players appear off the ground

by Krock » Post

Oops. Looks like a 5.0.0-only fix was backported into 0.4.17.1 - here it is.
I doubt that fixing it in Lua is easy or even possible. The simplest solution is probably to create a mesh with two sides, which then replaces the builtin C++ code.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

Orby
Member
Posts: 85
Joined: Sat Aug 18, 2012 03:59
GitHub: orbitaldecay
IRC: orbitaldecay
In-game: Orby
Location: Baltimore, MD

Re: "upright_ sprite" players appear off the ground

by Orby » Post

Krock wrote:Oops. Looks like a 5.0.0-only fix was backported into 0.4.17.1 - here it is.
I doubt that fixing it in Lua is easy or even possible. The simplest solution is probably to create a mesh with two sides, which then replaces the builtin C++ code.
Thanks for looking it up!

nrz
Developer
Posts: 131
Joined: Sat Feb 07, 2015 17:16
GitHub: nerzhul
IRC: nrzkt
In-game: nrz
Location: France
Contact:

Re: "upright_ sprite" players appear off the ground

by nrz » Post

The revert has been done on the stable-0.4 branch

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 5 guests