CamShake

class CamShake : OutgoingGameMessage

Cam shake packet is used to make the camera shake around. It is worth noting that multiple different types of shakes can be executed simultaneously, making the camera more and more volatile as a result.

The properties of this class are in the exact order as the client reads them, which is consistent across revisions!

Camera movements table:

| Id |   Type  |    Observed Movement   |
|----|:-------:|:----------------------:|
| 0 | X-axis | Left and right |
| 1 | Y-axis | Up and down |
| 2 | Z-axis | Forwards and backwards |
| 3 | Y-angle | Panning left and right |
| 4 | X-angle | Panning up and down |

Constructors

Link copied to clipboard
constructor(axis: Int, random: Int, amplitude: Int, rate: Int)

Properties

Link copied to clipboard

the amount of randomness generated by the sine. Unlike random, this is multiplied against the rate. This property is called 'movementIntensity' in the event inspector.

Link copied to clipboard
val axis: Int

the type of the shake (see table above)

Link copied to clipboard
open override val category: ServerProtCategory
Link copied to clipboard
val random: Int

the amount of randomness involved. The client will generate a random double from 0.0 to 1.0 and multiply it with the random as part of the shaking. This property is called 'shakeIntensity' in the event inspector.

Link copied to clipboard
val rate: Int

the sine frequency. This property is called 'speed' in the event inspector.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open fun estimateSize(): Int
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String