Modding, Mission Design, and Coding > FS2 Open Tools

Bounding Box error in PCS2.1 Alpha

(1/3) > >>

esarai:
Hey Gents, just wanted to let you all know that I found the PCS2.1 Alpha to incorrectly account for subobject bounding boxes.  The overall ship bounding box is too small for sections of the gun turrets, and thus half the barrels are not registering in collision detection.  Here's a link to the quasi-modpack that revealed this issue.

http://www.mediafire.com/?w52tt3d1joas18k

I guess I'll also ask in the features thread for manual editing of the main bounding box, just as a failsafe for any similar occurrences. 

FUBAR-BDHR:
That's not a bug. The definition of bounding box is the smallest box all parts of an object can fit into.  Thus detail0 has a bounding box just big enough for all of it to fit into not it's subobjects.  This is true in modeling programs as well.  If any subojects are outside of that bounding box then they will not have proper collision detection. 

There are 2 workarounds.  First is to move the subobject to 0,0,0 in the modeling program then move it back in PCS2.  This only works if the subobject fits in the bouding box when moved.  The second method is to place a small invisible cube (invisible texture that is) at the extents of +- X,y,z of the farthest poly on each subobject to extend the detail0 bounding box. You then need "dont collide invisible" in the ships flags.  BTW if you look at some of V's shipt they did this so it's not a new thing.   

Still a way to resize the bounding box in PCS2 would be great.

esarai:
Thanks for the workarounds!  You're a lifesaver!


--- Quote from: FUBAR-BDHR on September 13, 2010, 08:53:47 pm ---If any subojects are outside of that bounding box then they will not have proper collision detection.  

--- End quote ---

Yikes, I don't know about you, but that feels like an incredibly broken definition.  It seems as if the working definition of the header bounding box is that of the entire ship, not just detail0, and hence why I view it as a bug, because it can break models. Since the practical application of the bounding box requires that it be modified anyways, it might be prudent to have PCS2 make the header bounding box the bbox for the entire model, not just for detail0.

Unless of course that would break something or be unfeasible to implement, at which point a header bbox editor/visualizer would be excellent.

Thanks again!

FUBAR-BDHR:
Remember modeling programs don't care about hierarchy it's just an object to them.  Anything under it is another object.  If you show bounding boxes in the modeling program and highlight detail0 that is the same bounding box you get in game. 

I wouldn't go as far as the automatic detail0 and all subobject thing as that could have implications with object that aren't supposed to have collision detection.  A simple way to resize the bounding box would be best.  Of course an auto-calc would be icing on the cake. 

chief1983:
It would have to take into account allowable subobject motion, at least rotation, as we don't have translation yet.  Is the rotation predictable without defining in its axis in the model?  You were telling me the other day it's not necessary, but it seems like this is a case where it would be helpful at least.

Navigation

[0] Message Index

[#] Next page

Go to full version