Hello, @philsa-unity
I have used the parenting mechanism of ECS CC, and it works well with ghost entities that do not have a PhysicsBody
or KinematicCharacterBody
. However, when I make a character (CC) a child of another entity (e.g., a Horse) where both have KinematicCharacterBody
components, the Client Build crashes.
if (allowMovingPlatformDetection)
{
if (context.PlayerSummonersLookup.HasComponent(ThirdPersonEntity))
{
var parent = context.PlayerSummonersLookup[ThirdPersonEntity].Summoner;
if (parent != Entity.Null)
{
var positionEntity = context.ChildLookup[parent][0].Value;
var AnchorePoint = context.LocalToWorldLookup[positionEntity].Position;
CharacterAspect.SetOrUpdateParentBody(ref baseContext, ref characterBody, parent, AnchorePoint);
}
}
else
{
CharacterAspect.SetOrUpdateParentBody(ref baseContext, ref characterBody, Entity.Null, default);
}
}
Is it possible to achieve this setup without causing crashes?
How can I make parenting for 2 Character Controllers?
Any help appreciated.
Thanks.