Fix crash when changing mesh collider in async for not-simulated actor
This commit is contained in:
@@ -20,7 +20,7 @@ MeshCollider::MeshCollider(const SpawnParams& params)
|
|||||||
void MeshCollider::OnCollisionDataChanged()
|
void MeshCollider::OnCollisionDataChanged()
|
||||||
{
|
{
|
||||||
// This should not be called during physics simulation, if it happened use write lock on physx scene
|
// This should not be called during physics simulation, if it happened use write lock on physx scene
|
||||||
ASSERT(!Physics::IsDuringSimulation());
|
ASSERT(!GetScene() || !Physics::IsDuringSimulation());
|
||||||
|
|
||||||
if (CollisionData)
|
if (CollisionData)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ void SplineCollider::ExtractGeometry(Array<Vector3>& vertexBuffer, Array<int32>&
|
|||||||
void SplineCollider::OnCollisionDataChanged()
|
void SplineCollider::OnCollisionDataChanged()
|
||||||
{
|
{
|
||||||
// This should not be called during physics simulation, if it happened use write lock on physx scene
|
// This should not be called during physics simulation, if it happened use write lock on physx scene
|
||||||
ASSERT(!Physics::IsDuringSimulation());
|
ASSERT(!GetScene() || !Physics::IsDuringSimulation());
|
||||||
|
|
||||||
if (CollisionData)
|
if (CollisionData)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user