Merge branch 'Tryibion-fix-coll-data-delete-crash'
This commit is contained in:
@@ -244,10 +244,14 @@ void Collider::UpdateGeometry()
|
||||
if (actor)
|
||||
{
|
||||
const auto rigidBody = dynamic_cast<RigidBody*>(GetParent());
|
||||
if (_staticActor != nullptr || (rigidBody && CanAttach(rigidBody)))
|
||||
if (rigidBody && CanAttach(rigidBody))
|
||||
{
|
||||
Attach(rigidBody);
|
||||
}
|
||||
else if (_staticActor != nullptr)
|
||||
{
|
||||
PhysicsBackend::AttachShape(_shape, actor);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Be static triangle mesh
|
||||
|
||||
Reference in New Issue
Block a user