final case class PlayerStateMessage(guid: PlanetSideGUID, pos: Vector3, vel: Option[Vector3], facingYaw: Float, facingPitch: Float, facingYawUpper: Float, timestamp: Int, is_crouching: Boolean = false, is_jumping: Boolean = false, jump_thrust: Boolean = false, is_cloaked: Boolean = false) extends PlanetSideGamePacket with Product with Serializable
The server instructs some clients to render a player (usually not that client's avatar) to move in a certain way.
This packet instructs the basic aspects of how the player character is positioned and how the player character moves.
Each client keeps track of where a character "currently" is according to that client.
pos
reflects an update in regards to where the character should be moved.
Data between this "currently" and "new" are interpolated over a fixed time interval.
Position and velocity data is standard to normal PlanetSide ranges.
All angles follow the convention that every 0x1
is about 2.8125 degrees; so, 0x10
is 45.0 degrees.
The avatar model normally moves from where it "currently" is to pos
.
When vel
is defined, pos
is treated as where the avatar model starts its animation.
In that case, it appears to teleport to pos
to carry out the interpolated movement according to vel
.
After the move, it remains at essentially pos + vel * t
.
The repositioning always takes the same amount of time.
The player model is left in a walking/running animation (in place) until directed otherwise.
If the model must interact with the environment during a velocity-driven move, it copes with local physics.
A demonstration of this is what happens when one player "runs past"/"into" another player running up stairs.
The climbing player is frequently reported by the other to appear to bounce over that player's head.
If the other player is off the ground, passing too near to the observer can cause a rubber band effect on trajectory.
This effect is entirely client-side to the observer and affects the moving player in no way.
- guid
the avatar's guid
- pos
the position of the avatar in the world environment (in three coordinates)
- vel
an optional velocity
- facingYaw
a "yaw" angle
- facingPitch
a "pitch" angle
- facingYawUpper
a "yaw" angle that represents the angle of the avatar's upper body with respect to its forward-facing direction; this number is normally 0 for forward facing; the range is limited between approximately 61 degrees of center turned to left or right
- timestamp
A sequential counter
- is_crouching
avatar is crouching
- is_jumping
avatar is jumping; must remain flagged for jump to maintain animation
- jump_thrust
provide a measure of vertical stability when really close to the avatar character
- is_cloaked
avatar is cloaked by virtue of an Infiltration Suit
- Source
- PlayerStateMessage.scala
- Alphabetic
- By Inheritance
- PlayerStateMessage
- Product
- Equals
- PlanetSideGamePacket
- PlanetSidePacket
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new PlayerStateMessage(guid: PlanetSideGUID, pos: Vector3, vel: Option[Vector3], facingYaw: Float, facingPitch: Float, facingYawUpper: Float, timestamp: Int, is_crouching: Boolean = false, is_jumping: Boolean = false, jump_thrust: Boolean = false, is_cloaked: Boolean = false)
- guid
the avatar's guid
- pos
the position of the avatar in the world environment (in three coordinates)
- vel
an optional velocity
- facingYaw
a "yaw" angle
- facingPitch
a "pitch" angle
- facingYawUpper
a "yaw" angle that represents the angle of the avatar's upper body with respect to its forward-facing direction; this number is normally 0 for forward facing; the range is limited between approximately 61 degrees of center turned to left or right
- timestamp
A sequential counter
- is_crouching
avatar is crouching
- is_jumping
avatar is jumping; must remain flagged for jump to maintain animation
- jump_thrust
provide a measure of vertical stability when really close to the avatar character
- is_cloaked
avatar is cloaked by virtue of an Infiltration Suit
Type Members
- type Packet = PlayerStateMessage
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def encode: Attempt[BitVector]
- Definition Classes
- PlayerStateMessage → PlanetSidePacket
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val facingPitch: Float
- val facingYaw: Float
- val facingYawUpper: Float
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val guid: PlanetSideGUID
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val is_cloaked: Boolean
- val is_crouching: Boolean
- val is_jumping: Boolean
- val jump_thrust: Boolean
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def opcode: GamePacketOpcode.Value
- Definition Classes
- PlayerStateMessage → PlanetSideGamePacket → PlanetSidePacket
- val pos: Vector3
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val timestamp: Int
- val vel: Option[Vector3]
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()