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
| Name | Type | Description |
|---|---|---|
| x, y, z | float | The point in the world. |
| interior | int | The 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)