Transform with methods for moving entities. More...
Public Member Functions | |
void | Move (ksVector3 delta) |
Adds a delta to the transform position. More... | |
void | MoveTo (ksVector3 position) |
Moves the entity to a new position. More... | |
void | MoveTowards (ksVector3 position, float delta) |
Moves the transform towards a position. More... | |
void | Teleport (ksVector3 position) |
Teleports the entity to a location. More... | |
void | RotateTo (ksQuaternion rotation) |
Sets the rotation. More... | |
void | ScaleTo (ksVector3 scale) |
Sets the scale. More... | |
void | Rotate (ksQuaternion rotation) |
Rotates the transform. More... | |
void | RotateLocal (ksQuaternion rotation) |
Rotates the transform in local space. More... | |
void | Rotate (ksVector3 euler) |
Rotates the transform using euler angles. More... | |
void | RotateRadians (ksVector3 euler) |
Rotates the transform using euler angles. More... | |
void | RotateLocal (ksVector3 euler) |
Rotates the transform locally using euler angles. More... | |
void | RotateLocalRadians (ksVector3 euler) |
Rotates the transform locally user euler angles. More... | |
void | Rotate (ksVector3 axis, float angle) |
Rotates the transform. More... | |
void | RotateRadians (ksVector3 axis, float angle) |
Rotates the transform. More... | |
void | LookAt (ksVector3 position) |
Rotates the transform to look at a position. More... | |
void | LookAt (ksVector3 position, ksVector3 up) |
Rotates the transform to look at a position. More... | |
void | RotateTowards (ksQuaternion target, float deltaAngle) |
Rotates the transform towards a rotation. More... | |
void | RotateTowards (ksVector3 position, float deltaAngle) |
Rotates the transform towards a position. More... | |
void | RotateTowards (ksVector3 position, ksVector3 up, float deltaAngle) |
Rotates the transform towards a position. More... | |
void | RotateTowardsRadians (ksQuaternion target, float deltaAngle) |
Rotates the transform towards a rotation. More... | |
void | RotateTowardsRadians (ksVector3 position, float deltaAngle) |
Rotates the transform towards a position. More... | |
void | RotateTowardsRadians (ksVector3 position, ksVector3 up, float deltaAngle) |
Rotates the transform towards a position. More... | |
void | AddAngularDisplacement (ksVector3 angularDisplacement) |
Rotates the transform using angular displacement. More... | |
void | AddAngularDisplacementRadians (ksVector3 angularDisplacement) |
Rotates the transform using angular displacement. More... | |
void | Pitch (float angle) |
Rotates the transform through the world right axis. More... | |
void | PitchRadians (float angle) |
Rotates the transform through the world right axis. More... | |
void | PitchLocal (float angle) |
Rotates the transform through the local right axis. More... | |
void | PitchLocalRadians (float angle) |
Rotates the transform through the local right axis. More... | |
void | Yaw (float angle) |
Rotates the transform through the world up axis. More... | |
void | YawRadians (float angle) |
Rotates the transform through the world up axis. More... | |
void | YawLocal (float angle) |
Rotates the transform through the local up axis. More... | |
void | YawLocalRadians (float angle) |
Rotates the transform through the local up axis. More... | |
void | Roll (float angle) |
Rotates the transform through the world forward axis. More... | |
void | RollRadians (float angle) |
Rotates the transform through the world forward axis. More... | |
void | RollLocal (float angle) |
Rotates the transform through the local forward axis. More... | |
void | RollLocalRadians (float angle) |
Rotates the transform through the local forward axis. More... | |
Static Public Attributes | |
static float | PositionTolerance = 0f |
Position tolerance defines the minimum position delta necessary for the translation to be applied. More... | |
static float | RotationTolerance = 0f |
Rotation tolerance defines the minimum delta on any one of the x,y,z,w parts of a quaternion rotation necessary for the rotation to be applied. More... | |
static float | ScaleTolerance = 0f |
Scale tolerance defines the minimum position delta necessary for the scale to be applied. More... | |
Properties | |
ksVector3 | Position [get, set] |
Position. More... | |
ksQuaternion | Rotation [get, set] |
Rotation. More... | |
ksVector3 | Scale [get, set] |
Scale. More... | |
bool? | IsPermanent [get, set] |
Is this a permanent entity? Permanent entities are static entities that cannot be moved or deleted. More... | |
![]() | |
ksVector3 | Position [get] |
Position More... | |
ksQuaternion | Rotation [get] |
Rotation More... | |
ksVector3 | Scale [get] |
Scale More... | |
Transform with methods for moving entities.
Their are two kinds of movement: teleportation and moving. Moving will test for collisions along the way and teleportation will not. If you make more than one move call in a frame, the collision check will be along a straight path from the position at the start of the frame to the end position. You cannot do a move and a teleport in the same frame. If you make both calls the entity will teleport.
void KS.Reactor.ksTransform.AddAngularDisplacement | ( | ksVector3 | angularDisplacement | ) |
Rotates the transform using angular displacement.
angularDisplacement | Angular displacement in degrees. |
void KS.Reactor.ksTransform.AddAngularDisplacementRadians | ( | ksVector3 | angularDisplacement | ) |
Rotates the transform using angular displacement.
angularDisplacement | Angular displacement in radians. |
void KS.Reactor.ksTransform.LookAt | ( | ksVector3 | position | ) |
Rotates the transform to look at a position.
It will try to orient local up to be ksVector3.Up.
position | Position in world space to look at. |
Rotates the transform to look at a position.
position | Position in world space to look at. |
up | Up vector to try and orient local up to. |
void KS.Reactor.ksTransform.Move | ( | ksVector3 | delta | ) |
Adds a delta to the transform position.
delta | Delta to add to position. |
void KS.Reactor.ksTransform.MoveTo | ( | ksVector3 | position | ) |
Moves the entity to a new position.
position | Position to move to. |
void KS.Reactor.ksTransform.MoveTowards | ( | ksVector3 | position, |
float | delta | ||
) |
Moves the transform towards a position.
position | Target to move towards. |
delta | Delta to move by. It will not overshoot the target. Negative values will move away from the target. |
void KS.Reactor.ksTransform.Pitch | ( | float | angle | ) |
Rotates the transform through the world right axis.
angle | Angle to rotate in degrees. |
void KS.Reactor.ksTransform.PitchLocal | ( | float | angle | ) |
Rotates the transform through the local right axis.
angle | Angle to rotate in degrees. |
void KS.Reactor.ksTransform.PitchLocalRadians | ( | float | angle | ) |
Rotates the transform through the local right axis.
angle | Angle to rotate in radians. |
void KS.Reactor.ksTransform.PitchRadians | ( | float | angle | ) |
Rotates the transform through the world right axis.
angle | Angle to rotate in radians. |
void KS.Reactor.ksTransform.Roll | ( | float | angle | ) |
Rotates the transform through the world forward axis.
angle | Angle to rotate in degrees. |
void KS.Reactor.ksTransform.RollLocal | ( | float | angle | ) |
Rotates the transform through the local forward axis.
angle | Angle to rotate in degrees. |
void KS.Reactor.ksTransform.RollLocalRadians | ( | float | angle | ) |
Rotates the transform through the local forward axis.
angle | Angle to rotate in radians. |
void KS.Reactor.ksTransform.RollRadians | ( | float | angle | ) |
Rotates the transform through the world forward axis.
angle | Angle to rotate in radians. |
void KS.Reactor.ksTransform.Rotate | ( | ksQuaternion | rotation | ) |
Rotates the transform.
rotation | Rotation to rotate by. |
void KS.Reactor.ksTransform.Rotate | ( | ksVector3 | axis, |
float | angle | ||
) |
Rotates the transform.
axis | Axis of rotation. |
angle | Angle to rotate in degrees. |
void KS.Reactor.ksTransform.Rotate | ( | ksVector3 | euler | ) |
Rotates the transform using euler angles.
euler | Euler angles in degrees. |
void KS.Reactor.ksTransform.RotateLocal | ( | ksQuaternion | rotation | ) |
Rotates the transform in local space.
rotation | Rotation to rotate by. |
void KS.Reactor.ksTransform.RotateLocal | ( | ksVector3 | euler | ) |
Rotates the transform locally using euler angles.
euler | Euler angles in degrees. |
void KS.Reactor.ksTransform.RotateLocalRadians | ( | ksVector3 | euler | ) |
Rotates the transform locally user euler angles.
euler | Euler angles in radians. |
void KS.Reactor.ksTransform.RotateRadians | ( | ksVector3 | axis, |
float | angle | ||
) |
Rotates the transform.
axis | Axis of rotation. |
angle | Angle to rotate in radians. |
void KS.Reactor.ksTransform.RotateRadians | ( | ksVector3 | euler | ) |
Rotates the transform using euler angles.
euler | Euler angles in radians. |
void KS.Reactor.ksTransform.RotateTo | ( | ksQuaternion | rotation | ) |
Sets the rotation.
rotation | Rotation to rotate to. |
void KS.Reactor.ksTransform.RotateTowards | ( | ksQuaternion | target, |
float | deltaAngle | ||
) |
Rotates the transform towards a rotation.
target | Target to rotate towards. |
deltaAngle | Delta angle in degrees to rotate. It will not overshoot the target. Negative values will rotate away from the target. |
void KS.Reactor.ksTransform.RotateTowards | ( | ksVector3 | position, |
float | deltaAngle | ||
) |
Rotates the transform towards a position.
It will try to orient local up to be ksVector3.Up.
position | Position in world space to rotate towards. |
deltaAngle | Delta angle in degrees to rotate. It will not overshoot the target. Negative values will rotate away from the target. |
Rotates the transform towards a position.
position | Position in world space to rotate towards. |
up | Up vector to try and orient local up to. |
deltaAngle | Delta angle in degrees to rotate. It will not overshoot the target. Negative values will rotate away from the target. |
void KS.Reactor.ksTransform.RotateTowardsRadians | ( | ksQuaternion | target, |
float | deltaAngle | ||
) |
Rotates the transform towards a rotation.
target | Target to rotate towards. |
deltaAngle | Delta angle in radians to rotate. It will not overshoot the target. Negative values will rotate away from the target. |
void KS.Reactor.ksTransform.RotateTowardsRadians | ( | ksVector3 | position, |
float | deltaAngle | ||
) |
Rotates the transform towards a position.
It will try to orient local up to be ksVector3.Up.
position | Position in world space to rotate towards. |
deltaAngle | Delta angle in radians to rotate. It will not overshoot the target. Negative values will rotate away from the target. |
void KS.Reactor.ksTransform.RotateTowardsRadians | ( | ksVector3 | position, |
ksVector3 | up, | ||
float | deltaAngle | ||
) |
Rotates the transform towards a position.
position | Position in world space to rotate towards. |
up | Up vector to try and orient local up to. |
deltaAngle | Delta angle in radians to rotate. It will not overshoot the target. Negative values will rotate away from the target. |
void KS.Reactor.ksTransform.ScaleTo | ( | ksVector3 | scale | ) |
Sets the scale.
scale |
void KS.Reactor.ksTransform.Teleport | ( | ksVector3 | position | ) |
Teleports the entity to a location.
position | Position to teleport to. |
void KS.Reactor.ksTransform.Yaw | ( | float | angle | ) |
Rotates the transform through the world up axis.
angle | Angle to rotate in degrees. |
void KS.Reactor.ksTransform.YawLocal | ( | float | angle | ) |
Rotates the transform through the local up axis.
angle | Angle to rotate in degrees. |
void KS.Reactor.ksTransform.YawLocalRadians | ( | float | angle | ) |
Rotates the transform through the local up axis.
angle | Angle to rotate in radians. |
void KS.Reactor.ksTransform.YawRadians | ( | float | angle | ) |
Rotates the transform through the world up axis.
angle | Angle to rotate in radians. |
|
static |
Position tolerance defines the minimum position delta necessary for the translation to be applied.
A higher value will have the effect of stabilizing objects at the cost of positional accuracy.
|
static |
Rotation tolerance defines the minimum delta on any one of the x,y,z,w parts of a quaternion rotation necessary for the rotation to be applied.
A higher value will have the effect of stabilizing objects at the cost of rotational accuracy.
|
static |
Scale tolerance defines the minimum position delta necessary for the scale to be applied.
A higher value will have the effect of stabilizing objects at the cost of positional accuracy.
|
getset |
Is this a permanent entity? Permanent entities are static entities that cannot be moved or deleted.
They are not sent to clients since clients will already know where they are.
|
getset |
Position.
|
getset |
Rotation.
|
getset |
Scale.