mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-10 13:51:53 +09:00
fixed a bug where player position would offset to right on load
This commit is contained in:
@@ -390,11 +390,7 @@ open class ActorWithBody : Actor {
|
||||
* @param y
|
||||
*/
|
||||
fun setPosition(x: Double, y: Double) {
|
||||
hitbox.setFromWidthHeight(
|
||||
x - (baseHitboxW / 2 - hitboxTranslateX) * scale,
|
||||
y - (baseHitboxH - hitboxTranslateY) * scale,
|
||||
baseHitboxW * scale,
|
||||
baseHitboxH * scale)
|
||||
hitbox.setPositionFromPointed(x, y)
|
||||
}
|
||||
|
||||
// get() methods are moved to update(), too much stray object being created is definitely not good
|
||||
|
||||
Reference in New Issue
Block a user