GLide KS
Sometimes I sprite "things"
I don't want the sprite interpolating when changing sprite size. I want to make it instant. Is there a way to do it? someone said that P_SetOrigin probably solves it but it didn't work for me.
Print lines tells me it changed to the desired scale instantly but visually there's interpolation.
I used tails sprites as a place holder for my character's rolling sprites.
View attachment srb20061.gifView attachment srb20060.gif
Print lines tells me it changed to the desired scale instantly but visually there's interpolation.
LUA Code:
addHook("PlayerThink", function(player)
if player.mo and player.mo.skin == "nick" then
if not player.isrolling
player.isrolling = false
end
if player.mo.state == S_PLAY_ROLL or player.mo.state == S_PLAY_CROUCH_ZE2 then
print("rolling")
player.isrolling = true
else
print("not rolling")
player.isrolling = false
end
if player.isrolling then
print(player.mo.spritexscale)
P_SetOrigin(player.mo, player.mo.x, player.mo.y, player.mo.z)
player.mo.spritexscale = abs(FU+(FU/4))
player.mo.spriteyscale = abs(FU+(FU/4))
else
print(player.mo.spritexscale)
P_SetOrigin(player.mo, player.mo.x, player.mo.y, player.mo.z)
player.mo.spritexscale = abs(FRACUNIT)
player.mo.spriteyscale = abs(FRACUNIT)
end
end
end)
I used tails sprites as a place holder for my character's rolling sprites.
View attachment srb20061.gifView attachment srb20060.gif