Page 1 of 1

Bounding Box Manipulating

Posted: Mon Dec 07, 2009 10:28 pm
by metal_head
Hi! As you all know, I'm working on a mini project. THe actors in the game are made of simple planes, textured with TGA textures. The problem is that in the game, all boundingboxes are a little away from the actual meshes. BoxWIdth/Height commands won't help, cuz they only change the size of the boundingbox and my problem is this:
bbox.jpg
(163.26 KiB) Not downloaded yet
Anyone know how to fix this?

Re: Bounding Box Manipulating

Posted: Mon Dec 07, 2009 10:31 pm
by Jay
Use Equity to reposition the actors.

Re: Bounding Box Manipulating

Posted: Tue Dec 08, 2009 1:40 pm
by metal_head
Yeah, that's what I tough it could fix this, but when I did a reposition, the Bbox just got larger and moved away so that it was pretty much the same... :(

Re: Bounding Box Manipulating

Posted: Tue Dec 08, 2009 2:23 pm
by bernie
V6.1..0 of Equity will show the bounding box but repositioning the actor won't solve the problem you have there, it will move the bounding box with the actor. It looks as if you need to re-make that model altogether.

Re: Bounding Box Manipulating

Posted: Tue Dec 08, 2009 3:55 pm
by metal_head
Yeah, but it's not only one or two models, it's all the models... all of my models are just planes with TGAs and all of them have this problem. How will I be able to remodel a model so that it aligns with it's bbox anyway?


PS. Jaaaay....you have access to the source code, right? Do you know what's going on?

Re: Bounding Box Manipulating

Posted: Tue Dec 08, 2009 6:17 pm
by Jay
Hm I don't think the problem are the actors anymore. How big is the general scale of the objects and how big is it? Maybe floating-point accuarcy is a problem (basically, the farther away you get from point (0,0,0) the more inaccurate it gets and it COULD happen that objects begin to 'bounce' when they move because all the values are rounded and there can be rounding errors.)

Re: Bounding Box Manipulating

Posted: Tue Dec 08, 2009 7:08 pm
by metal_head
You mean the scale definition in the Pawn.ini ?
Well, this is the player's one for instance:

Code: Select all

[PacBeast]
actorname = pacbeast.act
actorrotation = 0 180 0
actorscale = 0.4
fillcolor = 255 255 255
ambientcolor = 255 255 255
subjecttogravity = true
ambientlightfromfloor = false
boundingboxanimation = pac_idle
shadowsize = 30
0.4, but almost everything in my RF projects so far has had a floating point scale definition and I've never had this problem before...
ah.... if there was a way to model the width and the lenght of the boundingbox as well as the position....

Re: Bounding Box Manipulating

Posted: Tue Dec 08, 2009 7:46 pm
by animatrix
Have you tried not using a plane but using a thin box for your model?, since you will only see the faces it wont matter how thick it is, the box should treat it normaly, unfortunatly, per poly collision would be good for this type of game. But one question, why a 2d game in a 3d game engine? there are several 2d game design packages that you could do this in without any problems at all. It would still have 3d look to it. Ive got several 2d games that work well, just curious. :)
Also, model bones have somthing to do wth boxes I think. make sure that is centered.

Re: Bounding Box Manipulating

Posted: Tue Dec 08, 2009 9:09 pm
by metal_head
It's not a 2D game, I just imagine the characters and the interactive world props to be cartoony, and a plane with TGA is the perfect thing. I also think that the problem could be the plane, I could try adding another invisible plane in one of the models and compile to see there are any changes

Re: Bounding Box Manipulating

Posted: Tue Dec 08, 2009 9:31 pm
by metal_head
OK.....the following just doesn't make sence:
I made an invisible box arround my pawn and that didn't change anything... than I made a new box model from scratch and the boundingbox was almost perfect, what the hell?!

Re: Bounding Box Manipulating

Posted: Tue Dec 08, 2009 10:34 pm
by Jay
And how big is the level? The important thing about the accuracy problem is the ratio between the level size and the actor size. If your level is really big it becomes a problem.

I have edited my post and sadly after that that bit of information got lost.

Re: Bounding Box Manipulating

Posted: Tue Dec 08, 2009 10:38 pm
by metal_head
It's happening on all of my levels and they have different sizes. Also the directions in the game are Y and Z, not Y and X
so my levels look like this in the editor:

Code: Select all

|  |
|  |
|  |
Rather than:

Code: Select all

--------
--------

Re: Bounding Box Manipulating

Posted: Tue Dec 08, 2009 10:56 pm
by Jay
Have you checked the animations and especially the boundingboxanimation (pac_idle)? I am running out of ideas now...

Re: Bounding Box Manipulating

Posted: Tue Dec 08, 2009 11:05 pm
by metal_head
well, nothing wrong with that animation, as well as all the others idle or not...
...would it be possible to manipulate the box with another program like Equity or something...
...tried also rotating the model in Equity and than rotating it back in pawn.ini....no effect.


**EDIT**
Oh yeah, found something nice:
When I set boundingbox = nocollide in Pawn.ini, the pawn just disappears and usually the pawn just get's it's collision removed and still get rendered.

Re: Bounding Box Manipulating

Posted: Tue Dec 08, 2009 11:23 pm
by metal_head
Guys, funny, but putting a BoxWidth(35) in the Spawn order fixed the problem and now the box is completely and corectly covering the pawn.
Soooo, I think the problem here's solved