Documentation: VerletPhysicsComponent
Jump to navigation
Jump to search
Name | Type | Initial Value | Example Range | Description |
---|---|---|---|---|
Members | ||||
num_points | int | 2 | ||
num_links | int | 2 | ||
width | int | 1 | ||
resting_distance | float | 2 | [0, 16] | |
mass_min | float | 0.8 | [0.03, 2] | |
mass_max | float | 1 | [0.03, 2] | |
stiffness | float | 1 | ||
velocity_dampening | float | 0.99 | [0.2, 1] | |
liquid_damping | float | 0.7 | how much we dampen when in liquid | |
gets_entity_velocity_coeff | float | 0 | [0, 10] | |
collide_with_cells | bool | true | ||
simulate_gravity | bool | true | ||
simulate_wind | bool | true | ||
wind_change_speed | float | 1 | ||
constrain_stretching | bool | false | ||
pixelate_sprite_transforms | bool | true | ||
scale_sprite_x | bool | true | ||
follow_entity_transform | bool | true | ||
animation_amount | float | 2 | ||
animation_speed | float | 5 | ||
animation_energy | float | 0.6 | ||
cloth_sprite_z_index | float | 1 | ||
stain_cells_probability | int | 0 | 0 = never, 1 = most likely, 10 = less likely - and so on | |
m_is_culled_previous | bool | false | Developer note: this needs to be serialized in case we serialize SpriteComponent.is_visible | |
Custom data types | ||||
type | VERLET_TYPE::Enum | CHAIN | ||
animation_target_offset | vec2 | (0, 0) | ||
cloth_color_edge | uint32 (ABGR) | 0xff9b6f9a | ||
cloth_color | uint32 (ABGR) | 0xff7f5476 | ||
m_position_previous | vec2 | (0, 0) | ||
colors | UintArrayInline | |||
materials | UintArrayInline | |||
Privates | ||||
masses | FloatArrayInline | |||
positions | Vec2ArrayInline | |||
positions_prev | Vec2ArrayInline | |||
velocities | Vec2ArrayInline | |||
dampenings | FloatArrayInline | |||
freedoms | FloatArrayInline | |||
links | VerletLinkArrayInline | |||
sprite | VerletSprite* |