group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
Ragdoll Struct Reference

Parent component on the dead character; holds the 15 ragdoll body entities and the joint entities connecting them. More...

#include <Ragdoll.hpp>

Public Attributes

std::array< entt::entity, static_cast< size_t >(RagdollBone::Count)> bodies {}
std::array< entt::entity, 14u > joints {}
 14 joints for 15 bones in tree topology.
float age = 0.0f
 Seconds since ragdoll spawn.

Detailed Description

Parent component on the dead character; holds the 15 ragdoll body entities and the joint entities connecting them.

Destroying this component (or the entity holding it) should be paired with destroying every body / joint listed here.

Member Data Documentation

◆ age

float Ragdoll::age = 0.0f

Seconds since ragdoll spawn.

Used by gameplay to fade out the corpse after settle.

◆ bodies

std::array<entt::entity, static_cast<size_t>(RagdollBone::Count)> Ragdoll::bodies {}

◆ joints

std::array<entt::entity, 14u> Ragdoll::joints {}

14 joints for 15 bones in tree topology.


The documentation for this struct was generated from the following file: