I see you have not used the force material id check box. You will likely run into issues if you export with default materials on your collision mesh. (which in the case of bf1942 happens to be the material used by water. This material has collision bugs if used on meshes)
If your crate is "wooden", you can just use material 80 for default wood, or 82 for thin wood. Just type them into the material field once you have that check box ticked. (the drop down menu for this has no real purpose at this point since the script maker didn't put anything in it other then the single "Generic Armor" option)
From the screen shot you have the collision mesh filled in as well as the lod mesh. (I'd also recommend you tick the "BSP Optimization" check box. Probably not a big deal for a simple object like this, but using this for more complex objects is a must for good performance). From that screenshot of the export dialog, you have the minimum stuff set correctly, so the reason collision isn't working is not with the mesh, but with the coding and/or RFA it's packed in.
Also, COL02 is not required. If there is no COL02 the game will just use COL01 for all collisions. Generally COL02 are more important for vehicles and large statics. For example Planes collide with COL01 while land vehicles collide with COL02. If you made a large hanger building and your COL01 doesn't have an interior designed into it, you will find it impossible to get your planes into the building. COL02 is used by projectiles and soldier interaction as well. I also noticed child objects of any vehicle use COL01 for collision when hitting another vehicle. But that's getting into the itty bitty details that isn't important at this stage of modding right now.
I think the issue is perhaps in the coding. Did you check to see if there is an existing object that already uses the name you chose for your object? If so that would present a conflict and the game will ignore the new object and continue to use the old one. Generally the collision physics command is specified after the geometry command, though I don't see how the order of these two particular commands being important in this case. I'm just going by how I see 99.9% of all object code I've come across.
Code: Select all
ObjectTemplate.create SimpleObject crate
ObjectTemplate.geometry crate
ObjectTemplate.hasCollisionPhysics 1
There's not much else to add so I think there's either a problem with the materials your collision mesh is using or you haven't repacked the standardMesh rfa and it's still using the old one.
EDIT: After watching the video you appear to have used the lod mesh for your collision mesh on export. You definitely need to check the "Force MatID" option and set a material number. LOD Meshes almost always use material 1 for single material objects and so on, and that means you end up with the water material on your box. This mostly impacts vehicle collision as vehicle collision with objects that have material 1 assigned will have collision bugs and/or take excessive damage from even slow speed impact into the object. Though in this case it's not causing your issue since soldiers collide fine with objects that have the water material assigned. Though if you were standing on top of the box you would notice that you can't jump. That's another glitch with having a water material on a object.
This is a mapside mod so everything for your object is in the map rfa. Since your using Battlecraft, there's a possibility the editor is screwing up something with your object. Try placing some of the crates on your map, then extract and check everything to see that it's intact then repack the rfa with something like WinRFA or another similar tool. If it then works, then Battlecraft is messing up your object map somehow and causing the collision for the object to not work. I've checked the con files for vanilla BF1942 and there isn't another object with the name you chose, so there isn't a name conflict. So most likely something is getting corrupted when you are saving the map because from your screenshots and video, you are exporting the mesh correctly and the code you wanted to use should have worked.