M MY Multiplayer: Wiki
Side
Kind

engineRequestCollisionAt

Client

Asks for the collision around a point to be loaded. The request stays until it has finished loading.

bool engineRequestCollisionAt(float x, y, z [, int interior = nil])

Parameters

NameTypeDescription
x, y, zfloatThe point in the world.
interiorintThe interior to load. Without it, the interior the local player is in.default nil

Returns

Always true.

Use it before moving someone far away, so the ground is already solid when they arrive. Check with engineHasCollisionLoadedAt.

Example

local x, y, z = 1544.0, -1353.0, 329.5
engineRequestCollisionAt(x, y, z)

local timer
timer = setTimer(function()
    if engineHasCollisionLoadedAt(x, y, z) then
        killTimer(timer)
        setElementPosition(localPlayer, x, y, z)
    end
end, 100, 0)

See also