Wall Worm Forums

Design Tools => Wall Worm Model Tools => Bug Reports => Topic started by: Mr.Fudge on January 14, 2017, 06:31:10 AM

Title: Prop_dynamic collision bug
Post by: Mr.Fudge on January 14, 2017, 06:31:10 AM
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?

Title: Re: Prop_dynamic collision bug
Post by: Mr.Fudge on January 14, 2017, 06:36:24 AM
The collision model is turned the right way in hammer. its only when I Compile and go ingame its turned 90 degreeze
Title: Re: Prop_dynamic collision bug
Post by: Joris Ceoen on January 14, 2017, 07:17:43 AM
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:

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 (https://developer.valvesoftware.com/wiki/$collisionjoints)
$collisionjoints (https://developer.valvesoftware.com/wiki/$collisionjoints)
Title: Re: Prop_dynamic collision bug
Post by: Mr.Fudge on January 14, 2017, 10:30:03 AM
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.
Title: Re: Prop_dynamic collision bug
Post by: wallworm on January 14, 2017, 11:17:42 AM
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.
Title: Re: Prop_dynamic collision bug
Post by: Joris Ceoen on January 14, 2017, 12:15:22 PM
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.
Title: Re: Prop_dynamic collision bug
Post by: wallworm on January 14, 2017, 12:43:20 PM
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.
Title: Re: Prop_dynamic collision bug
Post by: wallworm on January 14, 2017, 02:51:52 PM
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.
Title: Re: Prop_dynamic collision bug
Post by: Mr.Fudge on January 15, 2017, 06:41:28 AM
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.
Title: Re: Prop_dynamic collision bug
Post by: Mr.Fudge on January 15, 2017, 06:42:02 AM
1
Title: Re: Prop_dynamic collision bug
Post by: Mr.Fudge on January 15, 2017, 06:42:21 AM
2
Title: Re: Prop_dynamic collision bug
Post by: wallworm on January 15, 2017, 10:00:38 AM
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.
Title: Re: Prop_dynamic collision bug
Post by: wallworm on January 16, 2017, 12:00:53 AM
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.
Title: Re: Prop_dynamic collision bug
Post by: wallworm on January 24, 2017, 04:16:01 PM
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.
Title: Re: Prop_dynamic collision bug
Post by: Kaesar on September 09, 2020, 01:24:59 PM
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.
Title: Re: Prop_dynamic collision bug
Post by: wallworm on November 27, 2020, 01:55:59 PM
Quote from: Kaesar on September 09, 2020, 01:24:59 PM
I'm not using WW right now, but well

Hopefully you got a fix for this. I'm pretty low on time lately, so except for issues dealing with Max/WW, I generally am slow to respond. Check that your bone hierarchy is same between hull and model.