Search Results for

    Show / Hide Table of Contents

    Bones

    A Bone is a data structure that holds all data relevant to their associated Particles and Collider(s).the Bone data structure is associated with 1 Entity. The `Entity the Bone is associated with is refered as a RigComponentEntity. To create a RigComponentEntity, all you have to do is add a RigComponent and a ConvertToEntity Component to a GameObject. This will add all nessacary RigComponent data furing the Coversion of the GameObject.

    Each Bone is assigned a specific DynamicBuffer<Particle>. NOTE: depending on the Bone type the way to access the Bone's DynamicBuffer<Particle data may be different.

    There are 2 types of Bones that the system contains. They are:

    • Single Bone: where a DOTSDynamicBone data structure added to an Entity. The DOTSDynamicBone data structure only represents a single bone.
    • Multiple Bones: where a DOTSDynamicBone_BufferElement data structure is added to an Entity. Unlike Single Bone, Multiple Bones is for use with Multiple Bones on a single Entity.

    Why not just use DynamicBuffer for both cases?

    I do this simply for efficency and unnessacary memory allocation. The DynamicBuffer uses indexing and in order to manage multiple Particles on a single Entity, some more data needed to be added in the DOTSDynamicBone_BufferElement data structure.

    Can I modify the Bone data?

    Yes, you can modify and create new bone at runtime in order to change how the DOTS Dynamic Bone functions. See Single Bone and Multiple Bones for more information.

    In This Article
    Back to top DOTS Dynamic Bone Documentation