Prop_dynamic collision bug

Started by Mr.Fudge, January 14, 2017, 06:31:10 AM

Previous topic - Next topic

Mr.Fudge

Hi.

Trying to make a sliding door with animation from max. I followed the tutorial Shawn made.
(https://www.youtube.com/watch?v=fY6UF7lB1T4&feature=youtu.be)
When I launch cs the colition is turned on its side and wont animate with the prop.
I have tried using just a simple box for collision as well as the quick hull.

Any Ideas why this is happening?


Mr.Fudge

The collision model is turned the right way in hammer. its only when I Compile and go ingame its turned 90 degreeze

Joris Ceoen

I'm not sure but I remember having had such problems before. Would you please mention which kind of collision you are using? Since a prop_dynamic is used here, they can have 2 different kinds of collisions:


  • A static one (like in static_props) which goes under the .QC command $collisionmodel.
  • One used for animated props, such as dynamics or ragdolls, which go under the .QC command $collisionjoints.
I think I dabbled with the latter one, where I had mixed results due to them being parented to a bone (and as such change in rotation). Do note that if you are using a dynamic prop that will not change in position, simply use $collisionmodel.

If nothing helps, consider resetting the xForm of the collisionmodel itself in 3DS Max. Let us know if you were able to fix it.

You can find more information about both of these through the following links:
$collisionmodel
$collisionjoints

Mr.Fudge

This is whats in the QC file

// QC File generated by the Wall Worm Model Tools Version 2.955
// Exported From: D:\Work\Lunar base 01\Lunar Base 02.max
// Get the latest version and notes at:
// http://dev.wallworm.com

$scale 1.0
$modelname   "fudge/spaceslidingdoor02.mdl"
$body spaceslidingdoor02 "spaceslidingdoor02.smd"
$collisionmodel "spaceslidingdoor02_hull.smd" {
$concave

}
$contents "solid"
$cdmaterials "fudge"
$sequence idle "spaceslidingdoor02.smd"  activity ACT_IDLE -1 loop fps 25
$sequence SpaceDoorClose "spaceslidingdoor02_sequence_SpaceDoorClose" fps 25.0 fadein 0.2 fadeout 0.2
$sequence SpaceDoorOpen "spaceslidingdoor02_sequence_SpaceDoorOpen" fps 25.0 fadein 0.2 fadeout 0.2

$include   "spaceslidingdoor02_wwmt_custom.qci"

Tried resetting x-forms
I need the dynamic prop to get the animations on it.

wallworm

When a collision hull is rotated incorrectly, it usually means that the hull (or it's root piece) isn't linked/skinned to the correct bone.

The video below is actually a better way to do props that are mechanical (doesn't need skin modifiers).

https://www.youtube.com/watch?v=pxCiL8Io2YE

The hull setup/discussion starts at 4:17.

Joris Ceoen

Quote from: Mr.Fudge on January 14, 2017, 10:30:03 AM
This is whats in the QC file

$collisionmodel "spaceslidingdoor02_hull.smd" {
I need the dynamic prop to get the animations on it.
If your goal is to have the collision MOVE with the door, it will not work with the $collisionmodel command, as it will remain static forever. What you'd want to use is the $collisionjoints command to parent the collisionblock to the bone that moves the door.

Also, what Shawn says is correct.

wallworm

Good catch Joris.

The QC writer in WW has a logic for when to use $collisionjoints instead of $collisionmodel. The logic is determined by how many bones are assigned to the collision model or how many convex pieces are in the concave hull. If there are more than one convex pieces or any bones (collected from skin on hull or by bones assigned to the WWMT object's Bone List in modify tab) then it will use $collisionjoints; all other cases it uses $collisionmodel.

Note that objects added to the Bones list will not export as a mesh! So this means that you should not add any object to the Bones array if you need that object's mesh to export.

wallworm

Considering that I'd never anticipated a case where a hull one only have one convex piece and still be dynamic, I never really accounted for that. I updated WW for this today. I'm assuming this is your issue in the scene you were exporting. If so, the update should just make it automatically work for you now.

Mr.Fudge

Hi again!

Thanks for great response!

Still getting the issue. Tried updating WW to the latest version, nothing changed (except now it's a $collisionjoints)
Then bought the pro version just for safe measures and still nothing.

Everything seems fine when I export from max, then to hammer. It's not until I'm ingame I see the problem.

Mr.Fudge


Mr.Fudge


wallworm

#11
Thanks for buying WW Pro. Make sure to change your global settings to use it in the Model SMD Export section.

In terms of this issue. Did you try linking the hull to the root bone of the model?

EDIT: In the teapot video above, look at 4:17 and watch through the schematic view part to see what I'm talking about with the hull linking.

wallworm

I got the scene and replicated the error. I need to compile to a couple other games and test. It's possibly a bug in the model compiler. I'll let you know as soon as I discover the cause.

wallworm

Just posting an update on this topic.

I sent the files off to Valve after we talked on Skype. Today I just got a response. Valve has confirmed this a bug on their end. They did not give any promised ETA for a fix. Until then, you'll have to continue resorting to the method we discussed to get it working.

Kaesar

Sorry for dump. But there are news about Mr.Fudge's problem?. I'm not using WW right now, but well, I'm making an animated prop for gmod with $collsionjoints and it works pefectly in model viewer but not ingame it spawns 90 degress.

SMF spam blocked by CleanTalk