mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 12:34:05 +09:00
the world is being unflipped wip
This commit is contained in:
@@ -1650,11 +1650,11 @@ open class ActorWithBody : Actor {
|
||||
protected fun drawSpriteInGoodPosition(sprite: SpriteAnimation, batch: SpriteBatch) {
|
||||
if (world == null) return
|
||||
|
||||
val offsetX = (hitboxTranslateX * scale).toFloat()
|
||||
val offsetY = (sprite.cellHeight * scale - hitbox.height - hitboxTranslateY * scale - 1).toFloat()
|
||||
val offsetX = 0f
|
||||
val offsetY = 1f // plant to the ground
|
||||
|
||||
drawBodyInGoodPosition(hitbox.startX.toFloat(), hitbox.startY.toFloat()) { x, y ->
|
||||
sprite.render(batch, x - offsetX, y - offsetY, scale.toFloat())
|
||||
sprite.render(batch, x + offsetX, y + offsetY, scale.toFloat())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user