Moving shadows

Place to get help with not working mods / modding interface.
Post Reply
E-37
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Mon Jan 22, 2018 12:37 am
Contact:

Moving shadows

Post by E-37 »

I am trying to move the players shadow to make it appear as if they are in midair. Jetpack simulates it by copying the character, removing their shadow and swapping the character for the one with no shadow when the player is flying. The problem with that when you hover over a crafting recipe, it shows that character and character-flying can craft it which doesn't look nice.

I have tried using rendering.get_all_ids("base") to get the animations from the base mod and modify their offset from there, but it seems I can't access them that way. I assume it is possible to turn all player shadows off and draw all the shadows for the character at all times but I really don't want to go through all that work. Is there a way to read what shadow the game would have normally displayed? I looked at demo-character-animation.lua but couldn't figure out a way to use it.

Just using a generic shadow at all times might be good enough. Most players probably won't notice it, (or at least I wouldn't) but there must be a better way.
Good things come in bags marked "SWAG"

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Moving shadows

Post by Rseding91 »

Just a note: LuaRendering is stuff mods can use. The engine handles all of the base game rendering directly in a *far* more efficient way and it not exposed for mods to change runtime.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Modding help”