111 int spawn(
string meshFilename,
float posX,
float posY,
float posZ,
float scaleX,
float scaleY,
float scaleZ );
132 void setPosition(
int entityID,
float posX,
float posY,
float posZ);
151 void setPos(
int entityID, Table pos);
243 void setScale(
int entityID,
float scaleX,
float scaleY,
float scaleZ );
307 void delete(
int entityID );
337 void addScript(
int entityID,
string scriptName );
356 void setShadow(
int entityID ,
int enabledState);
374 void setVisible(
int entityID ,
int enabledState);
434 void setRotation(
int entityID,
float rotX,
float rotY,
float rotZ );
455 void roll(
int entityID,
float angle,
int DegreeOrRadian);
476 void pitch(
int entityID,
float angle );
497 void yaw(
int entityID,
float angle );
514 void setFixedYaw(
int entityID,
int check[0 or 1] );
537 void turn(
int objID,
float pitch,
float yaw,
float roll );
559 void move(
int objID,
float pitch,
float yaw,
float roll );
587 float4
getRotationTo(
float srcRotX,
float srcRotY,
float srcRotZ,
float destRotX,
float destRotY,
float destRotZ);
616 float3
getRadialOffset(
int objID,
float radiusOffset,
float posx,
float posy,
float posz);
694 float3
getUp(
int entityID );
734 void setDirection(
int entityID,
float dirX,
float dirY,
float dirZ );
896 void lookatObject(
int entityID,
int targetID,
float rotProgress,
int axisX,
int axisY,
int axisZ );
929 void lookatPosition(
int entityID,
float lookAtPosX,
float lookAtPosY,
float lookAtPosZ,
float rotProgress,
int axisX,
int axisY,
int axisZ);
1071 int setTag(
int entityID,
string tag);
1105 setName(
int objID,
string name);
1161 int isColliding(
int objID ,
float direction_x,
float direction_y,
float direction_z,
float range,
int queryflag);
1187 int exist(
int entityID);
1381 void callFn(
int entityID,
int targetID, String functionName, String arg);
1421 void attach(
int parentID,
int childID);
1452 void detach(
int parentID,
int childID);
1460 float getHeading(
int objectID,
int TargetID);
1465 float getHeadingV3(
int objectID,
float x,
float y,
float z);
1688 void rotateToSurface( eID, normalx, normaly, normalz, qw, qx, qy, qz );
1701 float distance =
entity.getDistanceToCamera(objID);
1715 bool setStatic(
bool state);
1729 float setVisibleDistance(
float distaance);
void setShadow(int entityID, int enabledState)
This Function lets you cast shadows on the object you provide.
float getBoundingRadius(objID)
Get bounding box size.
float4 getLocalOrientation(int entityID)
Gets the Orientation in LOCAL Space of the entity Provided. The values returned are a Quaternion...
float getHeading(int objectID, int TargetID)
returns the yaw angle between the 2 objects
void setVisible(int entityID, int enabledState)
Set the visibility of the entity you provide.
float getBoundingMaximum(objID) float getScale()
Get bounding box maximum.
void setDirection(int entityID, float dirX, float dirY, float dirZ)
Set the Direction of an Entity by passing entitiy ID and the direction as a float3.
float3 getPosition(int entityID)
This Function will return the position of the specified Entity.
void setRotation(int entityID, float rotX, float rotY, float rotZ)
Set the Rotation of a specific scene entity.
void pitch(int entityID, float angle)
set how much to pitch a specific scene entity. This number will add to the current rotation of the en...
entity followPath(entityID, Pathname, Speed,(opt) useRoll)
Follow a path.
void setScale(int entityID, float scaleX, float scaleY, float scaleZ)
Set the Scale of the Entity with the id of entityID.
float3 getDirection(int entityID_1, int entityID_2)
Simple and Fast Function for getting the Direction between two entities. It Simply subtracts the mai...
int getDescription(int entityID)
Get a description from an entity ID.
float3 getRight(int entityID)
Get the Right direction of the specified object based on orientation.
float3 subtractPositions(int entityID_1, int entityID_2)
This Function will provide the means to subtract one entity position from another entity...
void lookatPosition(int entityID, float lookAtPosX, float lookAtPosY, float lookAtPosZ, float rotProgress, int axisX, int axisY, int axisZ)
Similar to the lookatObject Function, except this looks at a position which could be moving or stati...
void setPosition(int entityID, float posX, float posY, float posZ)
This Function will let you set the given position of the given Entity with the id of entityID...
int removeRegisteredTodEvent(int objID)
Removes this object from the tod system and will no longer receive any tod event messages.
float getBoundingMinimum(objID)
Get bounding box minimum.
int getLastHitID()
Returns the ID of the last object hit with the ray cast system.
String getName(int objID)
Get the scene list name of the entity with the passed objID arg.
float3 getRadialOffset(int objID, float radiusOffset, float posx, float posy, float posz)
Returns a poitional vector for an offset down the forward direction.
void turn(int objID, float pitch, float yaw, float roll)
Set the relative rotations of a specific scene entity.
int setDescription(int entityID, string description)
Set a description to an entity.
float paramName
Definition: LUA_API_Entity.h:1661
void entity refreshDynamicProperties()
Refresh dynamic properties.
float3 getLocalOrientationByAxis(int entityID, int axisX, int axisY, int axisZ)
Gets the Orientation in LOCAL Space of the entity Provided Multiplied by an axis. This allows you to...
int isColliding(int objID, float direction_x, float direction_y, float direction_z, float range, int queryflag)
Returns the value 1 if this ray collides with an object.
float getSquaredDistance(int objectID, int TargetID)
returns the distance between the 2 objects but less accurate and faster then getDistance() ...
float paramValue
Definition: LUA_API_Entity.h:1661
int getDistanceToVector(obj, x, y, z)
Position to vector.
void setQueryFlag_Model(int entityID)
Set the Query flag for MODEL_MASK. Once an entity has had this mask applied, it will be INCLUDED in ...
void callPublicFn(entityID, targetID, value)
Call this command to trigger an event in the target entities script.
float3 getWorldOrientationByAxis(int entityID, int axisX, int axisY, int axisZ)
Gets the Orientation in WORLD Space of the entity Provided Multiplied by an axis. This allows you to...
string getMeshName(objID)
get mesh name distance from object to camera.
int setAdvancedMaterial(id, materialname)
Set material to advanced.
void setMaterialName(int objId, string materialName)
Call this command to set the material name of all sub materials.
int exist(int entityID)
Returns the value 1 if the entity ID pass in the arg exists in the scene.
float3 getLocalPosition(int entityID)
This will return the local position of the specified entity based on its parents node position...
float distance
get distance to camera distance from object to camera.
Definition: LUA_API_Entity.h:1701
float getBoundingSize(objID)
Get bounding box size.
float3 getWorldPosition(int entityID)
This Function will return the world position of the specified Entity whether it is attached or not...
int setTag(int entityID, string tag)
Set a tag name for the object.
void callFn(int entityID, int targetID, String functionName, String arg)
Use entity.callFn(...) to call any function in any objects script, a direct script ot script communic...
float3 getForward(int entityID)
Get the Forward direction of the specified object based on orientation.
void setStatic(int entityID, int state)
Set the visibility distance of the entity of entityID.
int getTagFromID(int entityID)
Get a Tag name from an entity ID.
float getHeadingV3(int objectID, float x, float y, float z)
returns the yaw angle between the object and the provided position x,y,z
setName(int objID, string name)
Set the scene list name of the entity with the passed objID arg.
Definition: LUA_API_States.h:28
void setVisibleDistance(int entityID, float distance)
Set the visibility distance of the entity of entityID.
float3 inverseTransform(int entityID, float x, float y, float z)
transforms a world space position to local position based on node orientation. This essentially makes...
void setSubMaterialName(int objId, int subentityIndex, string materialName)
Call this command to set the material name of the specified sub entity.
int registerTodEvent(int objID)
Add this Object to the Time Of Day system so that its script can receive atod event. Great to turn on/off the lights at night.
void setPos(int entityID, Table pos)
This Function will let you set the position of an Entity with the id of entityID by pass in a table f...
void setLocalOrientation(int entityID, int rotW, int rotX, int rotY, int rotZ)
Set the LOCAL Orientation of the entity you provide to the function.
float3 getDirectionOfEntity(int entityID)
Simple and Fast Function for getting the direction of an entity without needing 2 ids or positions It...
int getIDFromTag(string entityTagName)
Get the ID of the Entity from its Entity Tag.
void attach(int parentID, int childID)
This function will allow you to attach a "sceneEntity" or "dynamic sceneEntity"(spawned) to another e...
float4 getWorldOrientation(int entityID)
Gets the Orientation in WORLD Space of the entity Provided. The values returned are a Quaternion...
void getMaterialName(int objId, int subentityIndex)
Call this command to get the material name of the sub entity passed through.
int getNumSubEntities()
Call this command to get the number of sub entity the sceneEntity has.
void setQueryFlag(int entityID, int QueryFlag)
Set the Query flag for this object to the value pass in the second argument "QueryFlag".
void move(int objID, float pitch, float yaw, float roll)
Move the specified object in the XYZ direction by the unit amounts passed in the argument.
void lookatObject(int entityID, int targetID, float rotProgress, int axisX, int axisY, int axisZ)
Simple Function to make one entity lookat another entity.
void roll(int entityID, float angle, int DegreeOrRadian)
set how much to roll a specific scene entity. This number will add to the current rotation of the ent...
float getDynamicProperty(eID, paramName) float setDynamicProperty(eID
getDynamicProperty
float4 getRotationTo(float srcRotX, float srcRotY, float srcRotZ, float destRotX, float destRotY, float destRotZ)
Gets the shortest arc quaternion to rotate this vector to the destination vector. This can be used t...
float getElevation(int objectID, int TargetID)
void setWorldOrientation(int entityID, int rotW, int rotX, int rotY, int rotZ)
Set the WORLD Orientation of the entity you provide to the function.
void yaw(int entityID, float angle)
Set the Yaw of a specific scene entity.
void setQueryFlag_DoNotSelect(int entityID)
Set the Query flag for DO_NOT_SELECT_MASK. Once an entity has had this mask applied, it will be EXCLUDED in ray casts to objects.
void detach(int parentID, int childID)
This function will allow you to detach a "sceneEntity" or "dynamic sceneEntity"(spawned) from another...
void addScript(int entityID, string scriptName)
This Function will Add a script referenced by scriptName to an entity with the id of entityID...
void rotateToSurface(eID, normalx, normaly, normalz, qw, qx, qy, qz)
Rortate to surface Rotate an entity to align with the surface of a physics object.
void setFixedYaw(int entityID, int check[0 or 1])
Fixes an entity to only rotate around the Y Axis, this will stop quaternion rotations from rolling...
float getDistance(int objectID, int TargetID)
returns the distance between the 2 objects
float3 getUp(int entityID)
Get the UP direction of the specified object based on orientation.
int spawn(string meshFilename, float posX, float posY, float posZ, float scaleX, float scaleY, float scaleZ)
This Function will spawn a new scene entity model with the provided meshFilename, position and scale...
Definition: LUA_API_Entity.h:83
float3 subtractPositions_float3(float x1, float y1, float z1, float x2, float y2, float z2)
This function provides the means to subtract 1 float3 from another float3, useful for getting directi...