Skip to content

Commit

Permalink
Merge pull request #3 from Elevator89/fix-validate_spatial
Browse files Browse the repository at this point in the history
Fix validate_spatial method
  • Loading branch information
ZelimDamian authored Apr 8, 2020
2 parents 9a1e00b + 79e1ba9 commit ff673bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sceneObjects/DMeshSO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ void on_mesh_changed(bool bInvalidateSpatial = true, bool bInvalidateDecomp = tr

void validate_spatial()
{
if ( enable_spatial && spatial == null ) {
if (enable_spatial && (spatial == null || !spatial.IsValid)) {
spatial = new DMeshAABBTree3(mesh);
spatial.Build();
}
Expand Down

0 comments on commit ff673bc

Please sign in to comment.