|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
A body in the 3D world. More...
#include <RigidBody3D.hpp>
Public Attributes | |
| BodyType | bodyType {BodyType::Dynamic} |
| Static never moves, Kinematic is moved by hand, Dynamic is solved. | |
| f32 | gravityScale {1.0f} |
| Scales this body's share of the world's gravity. 0 = weightless. | |
| f32 | linearDamping {0.05f} |
| f32 | angularDamping {0.05f} |
| f32 | mass {0.0f} |
| Its mass in kilograms. 0 = as heavy as its shape at the density of water, a ball of 10 cm radius 4.2 kg; set it to make a hollow thing light or a small thing heavy. A static or kinematic body has none: nothing moves it. | |
| bool | fixedRotation {false} |
| Keeps the body upright: the solver may move it, never turn it. What a character on legs wants, and what a crate does not. | |
| u32 | layer {0} |
| Which collision layer this body is in (0..15). ONE layer, unlike the 2D world's category bits: Jolt classifies a body by a single id. | |
| bool | continuousCollision {false} |
| Checks the whole path a step covers rather than where the body ended up. What a bullet needs: discrete collision only asks where a body IS, so anything crossing more than its own thickness in one step arrives on the far side of a wall having never touched it. Costs more, which is why it is off. | |
| bool | enabled {true} |
| Disabled bodies are left out of the world entirely. | |
A body in the 3D world.
Definition at line 36 of file RigidBody3D.hpp.
| f32 esengine::ecs::RigidBody3D::angularDamping {0.05f} |
Definition at line 49 of file RigidBody3D.hpp.
Referenced by rigidbody3dApplyJS(), and rigidbody3dToJS().
| BodyType esengine::ecs::RigidBody3D::bodyType {BodyType::Dynamic} |
Static never moves, Kinematic is moved by hand, Dynamic is solved.
Definition at line 39 of file RigidBody3D.hpp.
Referenced by rigidbody3dApplyJS(), and rigidbody3dToJS().
| bool esengine::ecs::RigidBody3D::continuousCollision {false} |
Checks the whole path a step covers rather than where the body ended up. What a bullet needs: discrete collision only asks where a body IS, so anything crossing more than its own thickness in one step arrives on the far side of a wall having never touched it. Costs more, which is why it is off.
Definition at line 73 of file RigidBody3D.hpp.
Referenced by rigidbody3dApplyJS(), and rigidbody3dToJS().
| bool esengine::ecs::RigidBody3D::enabled {true} |
Disabled bodies are left out of the world entirely.
Definition at line 77 of file RigidBody3D.hpp.
Referenced by rigidbody3dApplyJS(), and rigidbody3dToJS().
| bool esengine::ecs::RigidBody3D::fixedRotation {false} |
Keeps the body upright: the solver may move it, never turn it. What a character on legs wants, and what a crate does not.
Definition at line 60 of file RigidBody3D.hpp.
Referenced by rigidbody3dApplyJS(), and rigidbody3dToJS().
| f32 esengine::ecs::RigidBody3D::gravityScale {1.0f} |
Scales this body's share of the world's gravity. 0 = weightless.
Definition at line 43 of file RigidBody3D.hpp.
Referenced by rigidbody3dApplyJS(), and rigidbody3dToJS().
| u32 esengine::ecs::RigidBody3D::layer {0} |
Which collision layer this body is in (0..15). ONE layer, unlike the 2D world's category bits: Jolt classifies a body by a single id.
Definition at line 65 of file RigidBody3D.hpp.
Referenced by rigidbody3dApplyJS(), and rigidbody3dToJS().
| f32 esengine::ecs::RigidBody3D::linearDamping {0.05f} |
Definition at line 46 of file RigidBody3D.hpp.
Referenced by rigidbody3dApplyJS(), and rigidbody3dToJS().
| f32 esengine::ecs::RigidBody3D::mass {0.0f} |
Its mass in kilograms. 0 = as heavy as its shape at the density of water, a ball of 10 cm radius 4.2 kg; set it to make a hollow thing light or a small thing heavy. A static or kinematic body has none: nothing moves it.
Definition at line 55 of file RigidBody3D.hpp.
Referenced by rigidbody3dApplyJS(), and rigidbody3dToJS().