"upright_ sprite" players appear off the ground

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

"upright_ sprite" players appear off the ground

by Orby » Fri Jul 20, 2018 18:30

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
(78.9 KiB) Not downloaded yet
 

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

Re: "upright_ sprite" players appear off the ground

by Krock » Fri Jul 20, 2018 20:36

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.
>> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here> BROKEN
 

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

Re: "upright_ sprite" players appear off the ground

by Orby » Fri Jul 20, 2018 21:47

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: 127
Joined: Sat Feb 07, 2015 17:16
Location: France
GitHub: nerzhul
IRC: nrzkt
In-game: nrz
 


Return to Modding Discussion



Who is online

Users browsing this forum: No registered users and 3 guests