Author Topic: Custom Brick Collision?  (Read 1009 times)

I'm having issues with brick collision for a custom brick I made. As in, I walk right through it. And now, I get trapped in what seems to be my collision box that is rotated perpendicular to my visible brick, and that I can walk into but not out of. I made the brick, bounds box, and collision box in Blender 2.5. The collision bounds don't peek through the whole brick bounds. Exported to .obj. Imported to Blender 2.49, made sure I had a visible detail and collision detail set on different layers. And exported to .dts. I've been messing with it too much and am sick of it lol. Much appreciated for help that can be offered.


Are you using regular collision or dts collision?

Give us the blb?

It doesn't sound like you're using the same process as I do (obj to blb converter), but here's what I must do:

First, make sure the collision shape is not concave (no inside corners). If you need it to be concave you'll have to use more than one shape, which I think are named Collision-1, Collision-2 and so on

Scale the collision to 0.5 the size of the rest of the brick. Then, rotate the collision by 180 (on Z; just spin it 'round). But since you're exporting both detail and collision in a .dts, both of these steps might be irrelevant.

The only other thing I can think of, which might be your problem, is to make sure to apply location/rotation/scale to every object before exporting. Not doing this results in all sorts of fun and unpredictable problems, at least when it comes to vehicles.

Are you using regular collision or dts collision?

Give us the blb?

Thanks for replying. I use .dts collision. And here you go: http://www.mediafire.com/download/tpw6wvz2izhg3a6/jeepProp.blb

It doesn't sound like you're using the same process as I do (obj to blb converter), but here's what I must do:

First, make sure the collision shape is not concave (no inside corners). If you need it to be concave you'll have to use more than one shape, which I think are named Collision-1, Collision-2 and so on

Scale the collision to 0.5 the size of the rest of the brick. Then, rotate the collision by 180 (on Z; just spin it 'round). But since you're exporting both detail and collision in a .dts, both of these steps might be irrelevant.

The only other thing I can think of, which might be your problem, is to make sure to apply location/rotation/scale to every object before exporting. Not doing this results in all sorts of fun and unpredictable problems, at least when it comes to vehicles.

Let me sort of explain what I'm trying to accomplish in greater detail: Essentially, I'm taking the default Jeep model and making it a place-able "prop" brick, it's not NEEDED but is good practice and I would like to know how. I want to place them across a small map I'm making for aesthetics. Anyway, here's my steps (don't judge me if I'm doing this in all unconventional ways :P):

* = Might've done more steps to tweak it (Ex. Flat shading/Ctrl+A and set Location, Rotation, Scale/resizing/rotating/scaling/making groups of object/figuring out why it's not working/...

1. Copy jeep.dts of Vehicle_Jeep from my Add-Ons, paste to Desktop.
2. Import jeep.dts into Shaper, export to Milkshape 3D ASCI (.txt). (ex. jeepProp.txt)
3. Import jeepProp.txt into Milkshape, export as .obj. (ex. jeepProp.obj)
4. Import jeepProp.obj into Blender 2.5, delete (what I'm guessing is to be) the default collision sphere thing from model.
5. Resize, assign materials, rotate, ...
6. Make new cube (collision box), resize (also adding section cuts to angle for a "better" collision) exactly to model, rename to "COL1".
7. Make new cube (bounds box), resize (No section cuts, just a big rectangular cube) around model, slightly extruded/covering my model and collision box, rename to "BOUNDS".
8. *
9. Save (ex. JeepProp.blend). Export to .obj. (ex. JeepProp.obj)
10. Drag JeepProp.obj onto General's Obj2Blb converter (Makes JeepProp.blb).
11. Open JeepProp.blend into Blender 2.49, make sure everything is ok (materials, names, etc...)
12. * (Might have selected model, went into Edit mode and selected faces that I wanted to be a certain color, pressed P -> Selection to separate from object (makes new object) and renamed them to something like C .3 .3 .3 1 (a color), also might have done this in Blender 2.5).
13. Export as .dts (ex. JeepProp.dts) (everything on one layer/as is), export with triangle strips.
      OR I have also tried: Export as .dts (ex. JeepProp.dts) move model onto Layer 1, COL1 to Layer 2 and BOUNDS to Layer 3, set Visible Detail1 to Layer 1, Collision Detail1 to Layer 2, export with triangle strips.
14. Copy a 'server.cs', rename the names. Make a description.txt. Put all four files (server.cs, description.txt, JeepProp.dts, JeepProp.blb) into Compressed Folder, rename to Brick_JeepProp. Put in Add-Ons.

I think I have everything. Results thus far is a slightly oversized, correctly material-ed (except for the "paintable" part being completely one color/not correctly flat shaded or something), correctly placing Jeep brick prop that has no collision. Well, it sort of does, kind of explained in my first post. It rotates funny all the time, either perpendicular or vertically, and I can't wrench it or hammer it or paint it. Only thing I can do is get stuck in it forever unless I Self Delete. Questions are appreciated and help is even more appreciated :D Thanks.
« Last Edit: November 20, 2015, 01:26:43 AM by xS K I D z »

Or maybe just a how-to-make-prop-bricks-tutorial-thing would work just as well ;P