Scripting/Client/Functions/Draw3DSpriteWorld
v0.4+ (PC and Android): an image downloaded with <sprite> as a real quad in the 3D world, same rotation rules as Draw3DTextWorld. Native size is the image size in pixels / 100 metres (a 256x256 image is 2.56 m), multiplied by scaleX / scaleY. Animated GIFs play. Example: Draw3DSpriteWorld("logo.png", Vector(10, 20, 5), Vector(0, 0, 90), 1.0, 1.0, 80.0);
Syntax
Draw3DSpriteWorld(file, x, y, z, rx, ry, rz [, scaleX [, scaleY [, distance]]])Draw3DSpriteWorld(file, Vector pos, Vector rot [, scaleX ...])Arguments
- string file
- float x
- float y
- float z
- float rx
- float ry
- float rz
- any scaleX (optional) – Native size is the image size in pixels / 100 metres (a 256x256 image is 2.56 m), multiplied by
scaleX/scaleY. - any scaleY (optional) – Native size is the image size in pixels / 100 metres (a 256x256 image is 2.56 m), multiplied by
scaleX/scaleY. - float distance (optional)
- Vector pos
- Vector rot
- any scaleX ... (optional)
Returns
bool
Example
function onScriptLoad()
{
local pos = player.Pos;
local result = Draw3DSpriteWorld( "example.png", pos.x, pos.y, pos.z, 0.0, 0.0, 0.0 );
MessagePlayer( "Draw3DSpriteWorld returned: " + result, player );
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
- GetScreenWidth
- WorldPosToScreen
- ScreenPosToWorld
- GetGroundZLevel
- GetGroundZLevelForPos
- GetGroundZLevelForPosLoad
- Draw3DText
- Draw3DSprite
- Draw3DTextWorld
- SetCameraMatrix
- SetCameraTarget
- RestoreCamera
Section: Screen, world and camera
Categories: Client functions | Screen, world and camera