Hi!
For our Roleplay server, we are building an in-game world editor.
`spawnItem` already supports exact coordinates, yaw and ground snapping.
To complement this, could we get:
- Transparent, client-only previews without collision or pickup.
- Camera raycasts for placement targeting.
- Functions to move, rotate and delete existing world items.
an small Example.:
____________________________________________________________
-- Client: local preview
local preview = createObjectPreview("itfo_apple", x, y, z)
setObjectPreviewOpacity(preview, 0.45)
local hit = raycastFromCamera(maxDistance)
if hit then
setObjectPreviewPosition(preview, hit.x, hit.y, hit.z)
setObjectPreviewRotation(preview, yaw)
end
destroyObjectPreview(preview)
-- Server: edit an existing item
setWorldItemPosition(objectId, x, y, z)
setWorldItemRotation(objectId, yaw)
destroyWorldItem(objectId)
________________________________________________________
Placement would use the existing `spawnItem` after server validation.
These additions would allow preview → adjust → confirm, plus editing placed items.
I couldn't find these features in the wiki. If equivalents already exist, a short example would be appreciated!
Cheers!
For our Roleplay server, we are building an in-game world editor.
`spawnItem` already supports exact coordinates, yaw and ground snapping.
To complement this, could we get:
- Transparent, client-only previews without collision or pickup.
- Camera raycasts for placement targeting.
- Functions to move, rotate and delete existing world items.
an small Example.:
____________________________________________________________
-- Client: local preview
local preview = createObjectPreview("itfo_apple", x, y, z)
setObjectPreviewOpacity(preview, 0.45)
local hit = raycastFromCamera(maxDistance)
if hit then
setObjectPreviewPosition(preview, hit.x, hit.y, hit.z)
setObjectPreviewRotation(preview, yaw)
end
destroyObjectPreview(preview)
-- Server: edit an existing item
setWorldItemPosition(objectId, x, y, z)
setWorldItemRotation(objectId, yaw)
destroyWorldItem(objectId)
________________________________________________________
Placement would use the existing `spawnItem` after server validation.
These additions would allow preview → adjust → confirm, plus editing placed items.
I couldn't find these features in the wiki. If equivalents already exist, a short example would be appreciated!
Cheers!