mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add 'static' entity body-type
This commit is contained in:
parent
d6696b54cb
commit
2b7b68f3c2
7 changed files with 8 additions and 18 deletions
|
|
@ -39,6 +39,7 @@ Example:
|
|||
|
||||
Determines how the physics engine will work with it.
|
||||
|
||||
- *static* - static body. No physics calculation, no velocity.
|
||||
- *dynamic* - default type. The physics engine calculates movement and collisions.
|
||||
- *kinematic* - only movement is calculated, without collisions.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
# Entities and components
|
||||
|
||||
## Types notation used below
|
||||
|
||||
- vec3 - 3D vector (array of three numbers)
|
||||
- mat4 - 4x4 matrix (array of 16 numbers)
|
||||
|
||||
Type annotations are added for documentation purposes and are not part of the Lua syntax.
|
||||
|
||||
## Entity
|
||||
|
||||
The entity object is available in components as a global variable **entity**.
|
||||
|
|
@ -107,7 +100,7 @@ body:is_crouching() -> bool
|
|||
-- Enables/disables the "crouching" state
|
||||
body:set_crouching(enabled: bool)
|
||||
|
||||
-- Returns the type of physical body (dynamic/kinematic)
|
||||
-- Returns the type of physical body (static/dynamic/kinematic)
|
||||
body:get_body_type() -> str
|
||||
-- Sets the physical body type
|
||||
body:set_body_type(type: str)
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
|
||||
Определяет то, как с ним будет работать физический движок.
|
||||
|
||||
- *static* (статический) - физический движок не воздействует на тело.
|
||||
- *dynamic* (динамический) - тип по-умолчанию. Физический движок просчитывает движение и столкновения.
|
||||
- *kinematic* (кинематический) - просчитывается только движение, без столкновений.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,5 @@
|
|||
# Сущности и компоненты
|
||||
|
||||
## Обозначения типов, используемые далее
|
||||
|
||||
- vec3 - 3D вектор (массив из трех чисел)
|
||||
- mat4 - матрица 4x4 (массив из 16 чисел)
|
||||
|
||||
Аннотации типов добавлены в целях документации и не являются частью синтаксиса
|
||||
Lua.
|
||||
|
||||
## Сущность
|
||||
|
||||
Объект сущности доступен в компонентах как глобальная переменная **entity**.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue