Author Topic: How do i add collisions to a brick? (Blender)  (Read 1748 times)

I'm using blender with portifys dts plugin and demians blb plugin
and im confused on how to make collisions for the brick because the hammer doesnt destroy it and the paint doesnt paint it
and i can walk through it like a ghost
how do i add collisions to it?

https://github.com/DemianWright/io_scene_blb#definition-objects
you need a bounds object which encapsulates the whole brick, and then collision boxes (maximum 10) that can be inside the cube. I think they must be named 'collision1' 'collision2' etc.

Unless you're doing something pretty advanced I doubt you'd need to use the DTS exporter here.

I should've specified I'm new to blender so i don't understand allot.

you don't need to define bounds in your dts collision iirc.

you don't need to define bounds in your dts collision iirc.
so how do i do it. I would say my brick is complicated since it's a slightly edited cube with a cone on top. (I made it as a test/learning type thing)



This is what i made as a practice/test/learning thing
« Last Edit: March 22, 2017, 01:15:01 PM by yeTenszi »


i took a screen shot of what it looks like in game atm but thats not really the issue


Create a box around your brick and name it COLLISION. copy that exact box and name it BOUNDS.

Create a box around your brick and name it COLLISION. copy that exact box and name it BOUNDS.
i already told him to do this but I think he wants dts collision. in that case, split the model up into the cone and the box, then name each object collision1 and collision 2.

i'm new to this stuff so i don't know if dts is required or not

You need to export your collision as a separate .dts file if you want a non-cube collision. In the config file for brick you need to specify the brick collision like this:

Quote
datablock fxDTSBrickData (BrickSignStopData)
{
   brickFile = "./stopsign.blb";
   category = "Special";
   subCategory = "Signs";
   uiName = "Stop Sign";
   collisionShapeName = "./squarecol.dts";
   iconName = "Add-Ons/Brick_Road_Sign/stopsign";
   orientationFix = 1;
   
   hasPrint = 1;
   printAspectRatio = "2x2f";
};


You need to export your collision as a separate .dts file if you want a non-cube collision. In the config file for brick you need to specify the brick collision like this:


does the collision in blender have to have a specific name or anything else like that?
or can i just save the mesh as a dts and have it work (which i have done)

does the collision in blender have to have a specific name or anything else like that?
or can i just save the mesh as a dts and have it work (which i have done)
it has to be named like col-1 or col-100 or something prefixed with col-1 ie col-105
and it has to be convex, if your shape is convex (which your shape appears to be) then you need to split them into different meshes
so you would do your cone at the top as one mesh ie col-100 and then the base part of the brick as another mesh ie col-101

then export as a dts and referr your brick datablock to that dts as its collisionShapeName

okay the collision works now
and now that i think about it
it looks like spikes

but it also floats a bit which idk how to fix