mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
TEST progress
Adding multiple collision hulls and shapes through the shape editor now works as intended though with multiple convex hulls it does produce a few lag spikes on first load of the objects.
This commit is contained in:
parent
78f6206cde
commit
f963a78446
3 changed files with 42 additions and 23 deletions
|
|
@ -1032,9 +1032,28 @@ DefineTSShapeConstructorMethod( addCollisionDetail, bool, ( S32 size, const char
|
|||
default: objName = "ColConvex"; break;
|
||||
}
|
||||
|
||||
for ( S32 suffix = i; suffix != 0; suffix /= 26 )
|
||||
objName += ('A' + ( suffix % 26 ) );
|
||||
String meshName = objName + String::ToString( "%d", size );
|
||||
S32 suffix = i;
|
||||
while (true)
|
||||
{
|
||||
String tempName = objName;
|
||||
if (suffix == 0)
|
||||
suffix = 1;
|
||||
|
||||
for (S32 s = suffix; s != 0; s /= 26) {
|
||||
tempName += ('A' + (s % 26));
|
||||
}
|
||||
|
||||
if (mShape->findName(tempName) == -1)
|
||||
break;
|
||||
|
||||
suffix++;
|
||||
}
|
||||
|
||||
for (S32 s = suffix; s != 0; s /= 26) {
|
||||
objName += ('A' + (s % 26));
|
||||
}
|
||||
|
||||
String meshName = objName + String::ToString("%d", size);
|
||||
|
||||
mShape->addMesh( mesh->tsmesh, meshName );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue