Open Eideren opened 5 years ago
The error still persists. Is there a solution to this?
myEntity.GetOrCreate<StaticColliderComponent>().ColliderShapes.Add(new StaticMeshColliderShapeDesc { Model = myModel });
'Entity Entity has a PhysicsComponent without any collider shape'
Release Type: Latest
Version: Latest
Platform(s): Any
Describe the bug Quoting
sebl
on Discord "Hello, i'm currently trying to create a physicscomponent from code. although i set a collidershape, it doesn't get added to the component. i think the reason is somewhere here the NativeCollisionObject is null, so the collidershape doesn't get added.so, maybe anyone has an idea of what i am missing here? also, i get this error in the log: 'Entity xyz has a PhysicsComponent without any collider shape'"
so, maybe anyone has an idea of what i am missing here? also, i get this error in the log: 'Entity xyz has a PhysicsComponent without any collider shape'
To Reproduce
Once the engine hits PhysicsComponent.Attach It checks for
if (ColliderShapes.Count == 0)
and returns immediately afterwards without checking for an existingColliderShape
.Additional context I'll be taking care of this issue through this PR.