Search Issue Tracker

Fixed in 0.3.0-preview.1

Votes

0

Found in [Package]

0.2.5-preview.1

Issue ID

1203208

Regression

No

[ECS] Physics joint constrains are ignored when entities are instantiated from a prefab by entity system

Package: Unity Physics

-

How to reproduce:
1. Open the attached project ("case_1203208-ECS_Asteroids.zip")
2. Open the repro scene ("Scenes/Main")
3. Enter Play Mode
4. Switch to the Scene view and notice the falling plane
5. After the plane has fallen, notice that a few asteroids are drifting down

Expected results: Asteroids don't drift downward
Actual results: Asteroids drift downwards, ignoring the Y joint constraint

Reproducible with: 2019.3.0f5, 2020.1.0a19
Couldn't test with 2017.4 (package is not supported), 2018.4, 2019.2 (errors after downgrading from old package API)
Reproducible with package versions: 0.3.0-preview.4, 0.4.0-preview.10

Note: Issue does not reproduce if the entity is created from the same prefab in the scene, using ConvertToEntity script

  1. Resolution Note (fix version 0.3.0-preview.1):

    The problem is in the sample scripts copied into the user's project. The public samples will be updated accordingly, but basically the call to EntityManager.CreateEntity() in BaseJoint.cs needs to instead use GameObjectConversionSystem.CreateAdditionalEntity() so that the joint entity created during conversion becomes part of the entity prefab's LinkedEntityGroup

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.