• Collisions not working as intended
    14 replies, posted
[IMG]http://image.prntscr.com/image/af19a0256c4e4830a092ee741ba5e7f1.png[/IMG] [IMG]http://image.prntscr.com/image/966baf0312764cfcb38e4e4148209caa.png[/IMG] The collision/physics whatever it is model is made to have the big gap in the middle since it's a doorway, but in-game the model acts as if the collision model is one big square as I cannot shoot through it or anything of the sort. Am I doing something wrong here? I have the same issue with a window-frame prop, too, so my issue isn't just isolated to this one model.
i'm not familiar with gmod. can you walk thru the gap? does that 'weapon' use a hitbox collission test? that thing should be a single hitbox. to split that you'd have to create bones for every part and generate or setup hitboxes for every part. i might be wrong tho.
No I can't walk through it. If I'm reading that right, I need to make the collision one solid box and then cut out the part where the door is rather than 3 separate boxes?
no if you can't walk thru that space it's potentially 'broken'. you can use hlmv to display and check the colission model real quick. to make it valid colission it's gotta be completley closed and welded boxes(i can't see that), each having a smooth surface.
did you add $concave under $collisionmodel in the qc?
Yeah, is it supposed to be there?
Are all the 3 collision boxes set to the same smoothing group ? I'm pretty sure they should have different smoothing group numbers.
The requirements for a collision model are that each piece must be a separate element and all edges fully smoothed (they can be in the same smoothing group). Can you post the compile log?
[code]Compiling with Crowbar 0.29.0.0: "C:\Users\Vasey\Desktop\Modding\rust\wood house\doorway\wood_doorway.qc" ... Compiling ".\wood_doorway.qc" ... qdir: "c:\users\vasey\desktop\modding\rust\wood house\doorway\" gamedir: "C:\Program Files (x86)\Steam\steamapps\common\Half-Life 2\ep2\" g_path: "wood_doorway.qc" Building binary model files... Working on "wood_doorway.qc" SMD MODEL wood_doorway_reference.smd SMD MODEL wood_doorway_anims\wood_doorway_animation.smd SMD MODEL wood_doorway_physics.smd WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Error with convex elements of wood_doorway_physics.smd, building single convex!!!! Model has 1 convex sub-parts Collision model completed. --------------------- writing C:\Program Files (x86)\Steam\steamapps\common\Half-Life 2\ep2\models/vasey\wood_house\wood_doorway.mdl: bones 964 bytes (1) animation x y ips angle @idle 0.00 0.00 : 1.#J ( 90.00) 0.0 animations 112 bytes (1 anims) (1 frames) [0:01] sequences 220 bytes (1 seq) ik/pose 164 bytes eyeballs 0 bytes (0 eyeballs) flexes 0 bytes (0 flexes) textures 72 bytes keyvalues 0 bytes bone transforms 0 bytes bone flex driver 0 bytes Collision model volume 546336.75 in^3 collision 0 bytes total 1768 --------------------- writing C:\Program Files (x86)\Steam\steamapps\common\Half-Life 2\ep2\models/vasey\wood_house\wood_doorway.vvd: vertices 21792 bytes (454 vertices) tangents 7264 bytes (454 vertices) total 29120 bytes --------------------- Generating optimized mesh "C:\Program Files (x86)\Steam\steamapps\common\Half-Life 2\ep2\models/vasey\wood_house\wood_doorway.sw.vtx": body parts: 8 bytes models: 20 bytes model LODs: 12 bytes meshes: 9 bytes strip groups: 25 bytes strips: 27 bytes verts: 4086 bytes indices: 1344 bytes bone changes: 16 bytes everything: 5571 bytes --------------------- Generating optimized mesh "C:\Program Files (x86)\Steam\steamapps\common\Half-Life 2\ep2\models/vasey\wood_house\wood_doorway.dx80.vtx": body parts: 8 bytes models: 20 bytes model LODs: 12 bytes meshes: 9 bytes strip groups: 25 bytes strips: 27 bytes verts: 4086 bytes indices: 1344 bytes bone changes: 16 bytes everything: 5571 bytes --------------------- Generating optimized mesh "C:\Program Files (x86)\Steam\steamapps\common\Half-Life 2\ep2\models/vasey\wood_house\wood_doorway.dx90.vtx": body parts: 8 bytes models: 20 bytes model LODs: 12 bytes meshes: 9 bytes strip groups: 25 bytes strips: 27 bytes verts: 4086 bytes indices: 1344 bytes bone changes: 16 bytes everything: 5571 bytes Completed "wood_doorway.qc" ... Compiling ".\wood_doorway.qc" finished. Check above for any errors. ... Compiling with Crowbar 0.29.0.0: "C:\Users\Vasey\Desktop\Modding\rust\wood house\doorway\wood_doorway.qc" finished.[/code]
it does not like your collision model, Make sure all edges are smoothed and all elements are sealed.
[QUOTE=Stiffy360;50896339]it does not like your collision model, Make sure all edges are smoothed and all elements are sealed.[/QUOTE] Does it not like the different boxes being inside of eachother, either? [editline]16th August 2016[/editline] I've gotten it fixed thanks to your help. I remade the collisions with no intersecting boxes and each assigned to its own smoothing group, thanks a lot. Hopefully this thread will be of help to anyone else having this issue, too.
They should be able to intersect, and they should be able to be in the same smoothing group.
[QUOTE=Stiffy360;50894429]The requirements for a collision model are that each piece must be a separate element and all edges fully smoothed (they can be in the same smoothing group). Can you post the compile log?[/QUOTE] Weird, I once had to do that or the collision model would be tweaked/collapsed by studiomdl during compiling.
[QUOTE=Stiffy360;50897374]They should be able to intersect, and they should be able to be in the same smoothing group.[/QUOTE] Weird, that's all I changed and now it works perfectly. There's a chance I changed something else along the way too but I've used this method for another 3 models now and it fixed them all.
different materials can also mess them up. Make sure they use the same material.
Sorry, you need to Log In to post a reply to this thread.