Page 1 of 1

Double height physics objects error

Posted: Sat Oct 16, 2021 4:31 am
by Nick3069
I'm running into this very strange error where the physics objects have double the height in-game compared to 3ds Max and TresEd. I was making physics objects for a building in 3ds Max using the standard primitive box tool, which I've notice sets the object's origin at the bottom instead of the center. I didn't think it would cause any problem, but the game's engine doesn't seem to like that and essentially protrudes a copy of the box at the bottom. I've tried centering the origin point, but that didn't really help. Does anyone have any idea how I can fix this?

Re: Double height physics objects error

Posted: Sat Oct 16, 2021 6:54 am
by tatu
If you got access to the source, use the Mesh Tool MAX script from it. It got a "Center Pivot" feature (Center Pivot then Hard-Save below it).
This is the only way to actual save the Pivot position from 3ds Max when exporting to TPM, unless you import a model from Trespasser, combine the objects to use the imported models Pivot location. From what Draco told me, this is how he hacked the pivot back in the day to get it centered before we discovered the official script feature!

Trespasser with use the Pivot as the center and create a boundary box based on it. It doesn't calculate the center based on the faces/verts itself from my understanding.

Re: Double height physics objects error

Posted: Sat Oct 16, 2021 4:54 pm
by TheIdiot
I use the "Reset X-Form" tool myself to fix any pivot-related problems. Place the pivot point where you want using the gizmo and then simply Reset X-Form. This also fixes problems caused by mirroring and scaling when you export your mesh. You have to rotate your physics box so that it is facing forward and vertical before you do this, however, as the bounding box for a physics object appears to be what the engine actually uses to calculate physics.

Re: Double height physics objects error

Posted: Sat Oct 16, 2021 7:08 pm
by Nick3069
tatu wrote:If you got access to the source, use the Mesh Tool MAX script from it. It got a "Center Pivot" feature (Center Pivot then Hard-Save below it).
Thank you! That worked! :D I was afraid I'd have to redo all of that work.
TheIdiot wrote:I use the "Reset X-Form" tool myself to fix any pivot-related problems. Place the pivot point where you want using the gizmo and then simply Reset X-Form. This also fixes problems caused by mirroring and scaling when you export your mesh.
Thanks, I'll try to remember that in the case I might not have access to the Mesh Tool script. I was also going to ask about the mirrored object error, but even though 3ds Max still gives me a warning, the mirrored objects seem to have also been corrected by the Mesh Tool script.

Re: Double height physics objects error

Posted: Sun Oct 17, 2021 5:21 am
by machf
If you want a quick fix (because sometimes exporting an object as a .tpm, importing it into MAX and then reimporting it into the level after modifying it may mess up the object's normals), assign the object a physics box which is properly centered and of the right dimensions, I did that for the oxygen tanks at the end of TC Isle...

Re: Double height physics objects error

Posted: Mon Nov 15, 2021 9:21 pm
by Draconisaurus
Another tip: You can keep a basic box physics object somewhere, and then when it's time to create a new physics model, bring it to the area of a model to be made physical, then use the single-direction uniform scale, in one of the 3 possible directions, until it fits. As long as the original obj has a truly centered pivot, this can be used to make the rest.