Announcement

Collapse
No announcement yet.

Adding collision to static meshes with no collision object..

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Adding collision to static meshes with no collision object..

    I've noticed many objects provided with the game content can not be changed to have collision. For example the bamboo fence even shows as having collide_block_all when you drop it into your scene but it doesn't work!?

    #2
    If there is no collision on an official mesh, you can either create a blocking volume around it (which is fine if you have a few of them) or you can follow this tutorial to duplicate the mesh into your own map package.

    Once you do that, you can have the static mesh editor create one for you (though there are limitations) or you should also be able to use the builder brush to create a collision box too. Either way, the simpler the shape of the collision box, the fewer calculations the engine has to do.

    Comment


      #3
      What if you wanted something more complex than the builder brush can create?

      As far as I can see it is only able to make wedges and boxes. What if you wanted say One large box with a wedge shape on top for the collision... The builder brush couldn't create the complex a shape so what would be other options?

      Sorry if this is digressing any from the original thread..

      Comment


        #4
        There are several ways to create a more complex builder brush. I like these two:


        The first, is to use the geometry tools to modify the shape of the brush:
        http://www.hazelwhorley.com/tutorials/ue3_geometry.html
        You can clip and extrude to turn a simple brush primitive (cube, cylinder, etc.) into a more complex shape.

        The next method is to use existing BSP to shape the builder brush (just as you normally use the builder brush to shape BSP).
        There are two commands - Intersect and De-intersect. One removes any portions of the brush that are within solid BSP, the other removes any any portions of the brush that are not within solid BSP. Therefore, you can add-subtract BSP primitives until you have a BSP object that matches the desired collision shape, then place the brush over it, use the correct command, end get a single BSP brush that matches the entire shape.
        That's how I built the collision for this cylindrical room in my map (before, you could get stuck on seams on the wall meshes): http://www.3dbuzz.com/vbforum/attach...1&d=1212600480
        I created BSP blocks to represent the entryways far outside my map, then sized a hollow cylindrical brush, placed it over the blocks, and Intersected (or de-intersected - I forget which) to create holes in the mesh for the entryway. I added as blocking volume.

        If this is a static object, then it might just be best to surround it with multiple blocking volumes that confirm to the approximate shape - instead of going thorugh all the effort to create a single brush of the right shape and duplicate the mesh. That's what I did with this oddly-shaped mesh:
        http://www.3dbuzz.com/vbforum/attach...1&d=1213852072
        I used 18 separate blocking volumes to create a reasonably tight-fitting shape.

        Comment


          #5
          In my case it's a Kactor with physics. Thank you greatly!

          Comment

          Working...
          X