Set Airplane Mode Factors||doc135451

September 20, 2022

Format

 Entity:changeFlyMode(mode)
  • The class to which the function belongs:Entity

Description

Changes the entity flight mode coefficients.


Parameters

Variable name type Description
mode float The flight mode coefficient, equal to 0 means not flying, otherwise it is flying


Distinguishing between different flight coefficients


 When the coefficient is less than 0, the flight limit is that the joystick (button) can only control the flight on the parallel plane, and the vertical movement is controlled by the additional up/down buttons


When the coefficient is greater than 0, you can fly freely, and the size of the coefficient determines the speed of ascending/descending


Code Samples

on the server side of the objectmount script, change the entity flight mode coefficients.

this:changeFlyMode(2)