Skip to content

SecureCast

SecureCast is the top-level interface for interacting with the system. It is returned by require(SecureCast).

Members

Utility Snapshots

The snapshots utility used by the simulation, you can use this to retrieve player positions back in time for lag compensation.

Warning

Snapshots can only be used on the server, calling any of the methods within the utility will throw an error when called from the client!

Methods

void Initialize ( )

Initialize the simulation for the current context.

Warning

Initialize can only be called once per context, subsequent calls will result in an error.


void Cast (
Player Caster,
string Type,
Vector3 Origin
Vector3 Direction
number Timestamp
PVInstance? PVInstance
Modifier? Modifier
)

Casts a new projectile. A Modifier can be used to modify the behaviour of a projectile on a per cast basis. A PVInstance must exist on the client in order for the projectile to be rendered.

Danger

When using a Modifier make sure that all clients and the server use the same modifier, improper modifier usage can result in simulation desync.