Generating bounding box inside Shape Editor crashes

Expanding and utilizing the engine via C++.
21 posts Page 1 of 3
saindd
Posts: 220
Joined: Wed Apr 15, 2015 3:20 am
by saindd » Thu Jul 02, 2015 10:51 pm
When trying to generate a bounding box for a shape inside the shape editor, the editor crashes. Select fit type "box" then fit target the model itself. Boom. It also crashes if you change the fit type to anything other than box.
Duion
Posts: 1636
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Fri Jul 03, 2015 11:04 am
I never used bounding boxes, they look useless to me.
saindd
Posts: 220
Joined: Wed Apr 15, 2015 3:20 am
by saindd » Fri Jul 03, 2015 2:47 pm
How do you create player collision, then?
Duion
Posts: 1636
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Fri Jul 03, 2015 4:29 pm
Normally it is done by collision meshes, but the player collisions seem to be done by the bounds. But I think I once made a player and doing no bounding box and it worked.
If you really want or need it create one in a modeling app and call it "Bounds"
saindd
Posts: 220
Joined: Wed Apr 15, 2015 3:20 am
by saindd » Fri Jul 03, 2015 5:51 pm
That's what i'm referring to. Look:
http://torque-3d.readthedocs.org/en/lat ... unding-box

Without them, the engine is not able to create the collision properly and the player ends up falling through terrain and so on. However, i'm not creating one with the character and wanted to generate that inside the engine. The docs say it's fine, but the engine crashes.
TorqueFan
Posts: 130
Joined: Thu Apr 30, 2015 5:35 am
by TorqueFan » Sat Jul 04, 2015 4:40 pm
The bounding box and the collision meshes are 2 different things, and each serves a different purpose. What Duion says is true, in a way, but only when dealing with the actual player character that the client controls. As I recommended in your other posting @
User avatar
saindd
you should setup the player's bounding box dimensions in the player's datablock file. There are fields there for the bounding box and crouching bounding box, etc.

The player is an exception to the rule, in that the bounding box dimensions setup in the player's datablock will also be the player's collision box. Other objects actually use bounding boxes and collision meshes as they 'normally' should be - The bounding box determines visible bounds and the collision meshes determine actual collision. You can see how this works pretty easily:

• Create a large cube taller than the player in size.
• Create a bounds box for the cube, say half the size of the cube so that the bounds box is too small and fits inside the cube.

Toss the cube into a scene and look at it. If you turn the camera to the side, the cube will disappear when the bounds box goes out of view. This is totally incorrect because you'll notice when the cube is not in view and you turn to look at it again it won't render until the bounds box is on screen again. So you end up with a cube that should be rendered but isn't until you're looking closer to its center.

Collision meshes are pretty self explanatory, quite simply they are what you actually collide with. I just wanted to point out the functional differences between the two.
saindd
Posts: 220
Joined: Wed Apr 15, 2015 3:20 am
by saindd » Sat Jul 04, 2015 9:53 pm
How do you determine them in the datablocks? Also, wouldn't that be bad, due to differently sized player models?
TorqueFan
Posts: 130
Joined: Thu Apr 30, 2015 5:35 am
by TorqueFan » Sun Jul 05, 2015 6:40 am
How do you determine them in the datablocks?
• Navigate to art/datablocks/player.cs
• In the datablock PlayerData(DefaultPlayerData) (this is the player datablock...), find the line:

Code: Select all

boundingBox = "0.65 0.75 1.85";
• Adjust to your heart's content. The first number is the x value (from the center), the second the y, and lastly the z.
• Profit
Also, wouldn't that be bad, due to differently sized player models?
Of course not, since you'd want a different datablock for every different model!
saindd
Posts: 220
Joined: Wed Apr 15, 2015 3:20 am
by saindd » Mon Jul 06, 2015 1:34 am
Is there a way of having some visual feedback when setting the bounding box?
saindd
Posts: 220
Joined: Wed Apr 15, 2015 3:20 am
by saindd » Mon Jul 20, 2015 10:35 pm
Nope? :(
21 posts Page 1 of 3

Who is online

Users browsing this forum: No registered users and 3 guests