Facepunch / sbox-issues

175 stars 12 forks source link

Breakable pieces of a prop spawning in the wrong location due to their origins not being respected #6452

Open jkinz3 opened 2 days ago

jkinz3 commented 2 days ago

Describe the bug

When breaking a prop, the pieces spawn in the wrong location. For example, I included a gif of me breaking a pot. I have the scene timescale set to .1 to make it easier to see. As you can see, when the model breaks, the pieces spawn collapsed towards the center. It appears that the compiled pieces have their origins automatically set to their centers.

To Reproduce

  1. Open up a sbox project.
  2. Create a model in a DCC and import it into sbox using ModelDoc.
  3. Make pieces for that model and make sure the location matches the original models. ( I recommend the cell fracture plugin included with blender).
  4. Export the pieces into a single file.
  5. Import pieces using the "Add Break Pieces From Mesh" option in ModelDoc.
  6. Add a prop_data node and set the health of the prop to 1
  7. Compile model
  8. Place model in a scene and apply damage to model that exceeds 1

Expected behavior

If the pieces share the same origin as the original model, they should spawn in the equivalent place when the model breaks.

Media/Files

vreak Here are the pieces in modeldoc image And here's the actual mesh image

Additional context

No response

aylaylay commented 2 days ago

Could you zip up the complete model please? We have breakable props and they work.

jkinz3 commented 2 days ago

AntiqueCeramicVase_01.zip Here is a folder containing the FBX files for the original mesh, the physics hull, and the pieces, as well as the vmdl and the material/textures.

aylaylay commented 2 days ago

Thank you sir

aylaylay commented 14 hours ago

Should be fixed now