mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-16 13:34:06 +09:00
collision detection and CCD: Not exactly fixed but it works good enough
Former-commit-id: 3feb9b1156fc941390b4efe4c1540ed4c5dbd109 Former-commit-id: 8c97b0ade765731800ef09b722e0742e44443338
This commit is contained in:
@@ -75,7 +75,7 @@ class Player : ActorWithBody(), Controllable, Pocketed, Factionable, Luminous, L
|
||||
get() = Hitbox(0.0, 0.0, hitbox.width, hitbox.height) // use getter; dimension of the player may change by time.
|
||||
|
||||
companion object {
|
||||
@Transient internal const val ACCEL_MULT_IN_FLIGHT: Double = 0.21 // TODO air control still too 'slippery' with 0.31, lower the value!
|
||||
@Transient internal const val ACCEL_MULT_IN_FLIGHT: Double = 0.21
|
||||
@Transient internal const val WALK_ACCEL_BASE: Double = 0.67
|
||||
|
||||
@Transient const val PLAYER_REF_ID: Int = 0x51621D
|
||||
@@ -93,6 +93,7 @@ class Player : ActorWithBody(), Controllable, Pocketed, Factionable, Luminous, L
|
||||
isVisible = true
|
||||
referenceID = PLAYER_REF_ID // forcibly set ID
|
||||
super.setDensity(BASE_DENSITY)
|
||||
collisionType = KINEMATIC
|
||||
}
|
||||
|
||||
override fun update(gc: GameContainer, delta: Int) {
|
||||
|
||||
Reference in New Issue
Block a user