Skyline Lua API  Version 1.0
Lua Script Reference for Skyline Game Engine.
LUA_API_Controller.h
Go to the documentation of this file.
1 
2 // SKYLINE LUA CLASS FOR API DOCUMENTATION
3 
111 {
112 public:
113 
151  void move(int dccID, int Speed );
152 
190  void moveUp(int dccID, int moveUpSpd );
191 
228  int spawn(int objID);
229 
230  void doStrafe(int dccID, int state );
231 
232 
233  void doJump(int dccID, int force );
234 
235 
236  void setJumpDownforce(int dccID, int force );
237 
238 
239  void setGravity(int dccID, float x, float y, float z );
240 
241 
242  void enableGravity(int dccID, int state );
243 
244 
245  void invertGravity(int dccID, int state );
246 
247 
262  void setPosition(int dccID, float x, float y, float z);
263 
276  void setPositionString(int dccID, String xyz);
277 
278 
279  void getPosition(int dccID);
280 
298  void getCollisionFlag(int dccID);
299 
316  void setCollisionFlag(int dccID, String flags);
317 
318  void setMoveDirection(int dccID, float x, float y, float z );
319 
320 
321  void setData_upDirectionIndex(float val);
322 
323 
324  void setData_skinWidth(float val);
325 
326 
327  void setData_flipDirection(bool state);
328 
329 
330  void setData_slopeLimit(float val);
331 
332 
333  void setData_gravityY(float val);
334 
335 
336  void setData_stepOffset(float val);
337 
338 
339  void setData_characterWidth(float val);
340 
341 
342  void setData_shapeType(float val);
343 
344 
345  void setData_characterHeight(float val);
346 
347 
348  void setData_Offset(float x,float y,float z);
349 
359  void resetData();
360 
364  void getContactHit_ID(int dccID);
365 
369  void getContactHit_WorldPos(int dccID);
370 
374  void getContactHit_WorldNormal(int dccID);
375 
379  void getContactHit_MotionDirection(int dccID);
380 
384  void getContactHit_MotionLength(int dccID);
385 
399  void setQueryFlag(int dccID,int flag);
400 
401 
420  void followPath(int dccID, string pathName, float speed);
421 
435  int isFollowingPath(int dccID);
436 
450  string getFollowPathName(int dccID);
451 
467  void setPathAccuracy(int dccID, float accuracy);
468 
484  void setPathMaxTurn(int dccID, float maxTurn);
485 
500  void setPathNodeIndex(int dccID, int nodeIndex);
501 
533  void followPathPosition(int dccID, float x, float y, float z);
534 
550  int isDestinationReached(int dccID);
551 
567  void setAdvancedCollision(int dccID, int state);
568 
584  void setMoveAdvanced(int dccID, int state);
585 
586 
602  int getBodyID( int dccID );
603 
619  void remove( int dccID );
620 
638  void setMoveAdvanced( int dccID, int state) ;
639 
658  void setAdvancedCollision( int dccID, int state );
659 
678  void setAdvancedCollision( int dccID, int state );
679 
698  void setDimension(int dccID, float radius, float height);
699 
717  void setOffset(int dccID, float x, float y, float z);
718 
733  float3 getOffset(int dccID, float x, float y, float z);
734 
735 };
736 
737 /*
738 mlen = controller.getContactHit_MotionLength(dcID);
739 mdx,mdy,mdz = controller.getContactHit_MotionDirection(dcID);
740 wnx,wny,wnz = controller.getContactHit_WorldNormal(dcID);
741 wpx,wpy,wpz = controller.getContactHit_WorldPos(dcID);
742 hitID = controller.getContactHit_ID(dcID);
743 controller.resetData();
744 controller.getCollisionFlag(dcID);
745 controller.setMoveDirection(dcID, float x, float y, float z );
746 controller.setData_upDirectionIndex(upDirectionIndex);
747 controller.setData_skinWidth(skinWidth);
748 controller.setData_flipDirection(flipDirection);
749 controller.setData_slopeLimit(slopeLimit);
750 controller.setData_gravityY(gY);
751 controller.setData_stepOffset(stepOffset);
752 controller.setData_characterWidth(cWidth);
753 controller.setData_shapeType(shpeType);
754 controller.setData_characterHeight(ht);
755 controller.setData_Offset(offsetx,offsety,offsetz);
756  void setPositionString(int dccID, String xyz);
757 
758 
759  void getPosition(int dccID);
760 */
void setPositionString(int dccID, String xyz)
Sets the player position .
Definition: LUA_API_Controller.h:110
void setData_stepOffset(float val)
void setAdvancedCollision(int dccID, int state)
Set Advanced Collisions.
void getContactHit_WorldPos(int dccID)
Gets the last collision contacts hit information - WorldPos.
void setData_characterHeight(float val)
void doJump(int dccID, int force)
int spawn(int objID)
This commands add a dynamic character controller(DCC) to any scene entity.
void setQueryFlag(int dccID, int flag)
Sets the controllers query flag use for overlapping object query such as sensor and raycast...
void doStrafe(int dccID, int state)
int isDestinationReached(int dccID)
Poll to check if the controller has reached its destination.
void setData_characterWidth(float val)
void followPath(int dccID, string pathName, float speed)
follow a path simply by calling this function in an update loop. The movement will automatically be s...
void getContactHit_MotionDirection(int dccID)
Gets the last collision contacts hit information - MotionDirection.
void setData_shapeType(float val)
void getContactHit_WorldNormal(int dccID)
Gets the last collision contacts hit information - WorldNormal.
void setOffset(int dccID, float x, float y, float z)
Set the offset of the mesh that is moved by the capsule.
void moveUp(int dccID, int moveUpSpd)
Moves the controller up/down by the arg speed.
void setDimension(int dccID, float radius, float height)
Change the dimensions of a chatacter controller by passing radius and height.
void followPathPosition(int dccID, float x, float y, float z)
Override the default path follow and enter your own point to move to. In order for this to take effec...
void getCollisionFlag(int dccID)
A flag value that is returned from the system when this controller collides with an object...
void setCollisionFlag(int dccID, String flags)
A flag value that is returned from the system when this controller collides with an object...
void setMoveAdvanced(int dccID, int state)
Setting advanced move.
void setPathNodeIndex(int dccID, int nodeIndex)
Set the current node index the controller should head towards on the currently set path...
void setData_upDirectionIndex(float val)
void setData_Offset(float x, float y, float z)
void resetData()
Resets the controller setup date back to its default. This handled internally for you but the command...
Definition: LUA_API_States.h:28
string getFollowPathName(int dccID)
return the name of the path the controller is following
void invertGravity(int dccID, int state)
float3 getOffset(int dccID, float x, float y, float z)
Get the offset of the mesh that is moved by the capsule.
int isFollowingPath(int dccID)
return whether the controller is currently following a path.
void setData_flipDirection(bool state)
void setPathMaxTurn(int dccID, float maxTurn)
Set the maximum speed of the turning rate for this controller.
void setPathAccuracy(int dccID, float accuracy)
Set the accuracy of the path to follow. Lower numbers make the distance to each node before trigger s...
void enableGravity(int dccID, int state)
void getContactHit_MotionLength(int dccID)
Gets the last collision contacts hit information - motionLength.
void setMoveDirection(int dccID, float x, float y, float z)
void getContactHit_ID(int dccID)
Gets the last collision contacts hit information - Parent ID.
void setData_gravityY(float val)
int getBodyID(int dccID)
Get the Body ID of the object with a dynaminc character controller.
void setData_slopeLimit(float val)
void getPosition(int dccID)
void setData_skinWidth(float val)
void setJumpDownforce(int dccID, int force)
void move(int dccID, int Speed)
Moves the controller by the arg speed.
void setPosition(int dccID, float x, float y, float z)
Sets the player position .
void setGravity(int dccID, float x, float y, float z)