Author Topic: Prop_dynamic collision bug  (Read 6384 times)

Mr.Fudge

  • WW Pro
  • Newbie
  • *****
  • Posts: 10
  • Karma: 0
  • Acolyte
    • View Profile
Prop_dynamic collision bug
« 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.
(&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

  • WW Pro
  • Newbie
  • *****
  • Posts: 10
  • Karma: 0
  • Acolyte
    • View Profile
Re: Prop_dynamic collision bug
« Reply #1 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

Joris Ceoen

  • Global Moderator
  • Full Member
  • *****
  • Posts: 231
  • Karma: 27
  • WallWorm Ambassador
    • View Profile
Re: Prop_dynamic collision bug
« Reply #2 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:

  • 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

  • WW Pro
  • Newbie
  • *****
  • Posts: 10
  • Karma: 0
  • Acolyte
    • View Profile
Re: Prop_dynamic collision bug
« Reply #3 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.

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3667
  • Karma: 101
  • Behind me?
    • View Profile
Re: Prop_dynamic collision bug
« Reply #4 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).



The hull setup/discussion starts at 4:17.

Joris Ceoen

  • Global Moderator
  • Full Member
  • *****
  • Posts: 231
  • Karma: 27
  • WallWorm Ambassador
    • View Profile
Re: Prop_dynamic collision bug
« Reply #5 on: January 14, 2017, 12:15:22 pm »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 3667
  • Karma: 101
  • Behind me?
    • View Profile
Re: Prop_dynamic collision bug
« Reply #6 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.

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3667
  • Karma: 101
  • Behind me?
    • View Profile
Re: Prop_dynamic collision bug
« Reply #7 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.

Mr.Fudge

  • WW Pro
  • Newbie
  • *****
  • Posts: 10
  • Karma: 0
  • Acolyte
    • View Profile
Re: Prop_dynamic collision bug
« Reply #8 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.

Mr.Fudge

  • WW Pro
  • Newbie
  • *****
  • Posts: 10
  • Karma: 0
  • Acolyte
    • View Profile
Re: Prop_dynamic collision bug
« Reply #9 on: January 15, 2017, 06:42:02 am »
1

Mr.Fudge

  • WW Pro
  • Newbie
  • *****
  • Posts: 10
  • Karma: 0
  • Acolyte
    • View Profile
Re: Prop_dynamic collision bug
« Reply #10 on: January 15, 2017, 06:42:21 am »
2

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3667
  • Karma: 101
  • Behind me?
    • View Profile
Re: Prop_dynamic collision bug
« Reply #11 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.
« Last Edit: January 15, 2017, 10:12:17 am by wallworm »

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3667
  • Karma: 101
  • Behind me?
    • View Profile
Re: Prop_dynamic collision bug
« Reply #12 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.

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3667
  • Karma: 101
  • Behind me?
    • View Profile
Re: Prop_dynamic collision bug
« Reply #13 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.

Kaesar

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
  • Acolyte
    • View Profile
Re: Prop_dynamic collision bug
« Reply #14 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.