Collisions editing beginnings

This commit is contained in:
dexy
2020-01-02 00:16:49 +11:00
Unverified
parent f51d5644fd
commit d85f5eddb2
7 changed files with 704 additions and 42 deletions
+48 -5
View File
@@ -540,6 +540,14 @@ namespace CodeWalker
{
res = true;
}
else if (CollisionPoly != null)
{
res = true;
}
else if (CollisionBounds != null)
{
res = true;
}
else if (NavPoint != null)
{
res = true;
@@ -583,6 +591,14 @@ namespace CodeWalker
{
return CarGenerator.Position;
}
else if (CollisionPoly != null)
{
return CollisionPoly.Position;
}
else if (CollisionBounds != null)
{
return CollisionBounds.Center;
}
else if (NavPoly != null)
{
return NavPoly.Position;
@@ -630,6 +646,14 @@ namespace CodeWalker
{
return CarGenerator.Orientation;
}
else if (CollisionPoly != null)
{
return Quaternion.Identity;
}
else if (CollisionBounds != null)
{
return Quaternion.Identity;
}
else if (NavPoly != null)
{
return Quaternion.Identity;
@@ -677,6 +701,14 @@ namespace CodeWalker
{
return WidgetAxis.Z;
}
else if (CollisionPoly != null)
{
return WidgetAxis.XYZ;
}
else if (CollisionBounds != null)
{
return WidgetAxis.XYZ;
}
else if (NavPoly != null)
{
return WidgetAxis.XYZ;
@@ -724,6 +756,14 @@ namespace CodeWalker
{
return new Vector3(CarGenerator.CCarGen.perpendicularLength);
}
else if (CollisionPoly != null)
{
return Vector3.One;
}
else if (CollisionBounds != null)
{
return Vector3.One;
}
else if (NavPoly != null)
{
return Vector3.One;
@@ -784,14 +824,17 @@ namespace CodeWalker
{
PathNode.SetPosition(newpos);
}
else if (CollisionPoly != null)
{
CollisionPoly.Position = newpos;
}
else if (CollisionBounds != null)
{
CollisionBounds.Center = newpos;
}
else if (NavPoly != null)
{
NavPoly.SetPosition(newpos);
//if (projectForm != null)
//{
// projectForm.OnWorldNavPolyModified(NavPoly);
//}
}
else if (NavPoint != null)
{