Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Enabling kinematic Triggers in Timeline conflicts with Physics (2018.3)

Discussion in 'Timeline' started by crdmrn, Dec 23, 2018.

  1. crdmrn

    crdmrn

    Joined:
    Dec 24, 2013
    Posts:
    152
    I just noticed, after updating my project from 2018.2.19 to 2018.3, that the game didn't resume correctly after the opening cutscene, done using the built-in Timeline.

    I'm fairly sure about all of this being due to some bug in the Timeline because playing the same scene without the playableasset (meaning the director is disabled from start) at the beginning doesn't cause any problem.

    Basically, what's happening is that the kinematic trigger SphereCollider attached to my main player is in two different position (or at least that's what it looks like):

    1) During Update it's where it should be: at the position where the character is
    2) During FixedUpdate (when the physics are calculated and drawn by the physics debugger) it's at the position where it was when it was enabled the last time: in this case, the position where my character is at the end of the intro cutscene (which is a playableasset, played through a director).

    This prevents it from detecting any collision, and if i'm right about what's happening, it's clearly a bug.
    Or, as always, I'm missing something, but honestly this time I haven't the slightest idea of what it could be :S

    Small set of explanatory images:
    1) Notice how the yellow sphere on the right drawn by the PhysicsDebugger is not in the same position as the green wireframe sphere on the left drawn by the BoxCollider inspector.
    WhatsApp Image 2018-12-22 at 12.12.36.jpeg
    2) Enabling and disabling the sphere collider makes the position of the yellow sphere update to the latest position where the collider was enabled.
    WhatsApp Image 2018-12-22 at 12.14.48.jpeg
    3) Moving the character again though, creates the same disconnection as in point one.
    WhatsApp Image 2018-12-22 at 12.16.02.jpeg

    Any help, possibly from staff, would be greatly appreciated as this is driving me mad :D
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    To confirm, this worked in 2018.2? It may be a bug. I did a quick test to see if the behaviour was different between versions and it doesn't appear to be, but my test could be missing something.

    Timeline updates during Update, not FixedUpdate, so I expect a visual difference between the physics debug sphere and the actual sphere because the draw occurs after the update. That occurs in both 2018.2 and 2018.3. In your example, there is a very big difference, so either there is a large velocity or something is wrong.

    Feel free to open a bug and we'll take a look at it asap.
     
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,589
    If you never submitted a bug report so far, here is a document that describes how Unity Technologies want us to report bugs (it's important to include a project to reproduce the issue):
    https://unity3d.com/unity/qa/bug-reporting

    After you submitted the bug-report, you receive a confirmation email with a bug-report Case number. You can post this Case number here (in this forum thread) for Unity staff to pick up, in case they see your post.
     
  4. crdmrn

    crdmrn

    Joined:
    Dec 24, 2013
    Posts:
    152
    That is correct, it worked in 2018.2 and it started behaving like this once updating to 2018.3.
    Also, this occurs only when the Timeline is done playing, as the character GameObject gets turned on only then (by the Timeline itself).

    I didn't open a bug report because i wanted to narrow it down a bit more before submitting one; also, the project is quite big, so I'm not sure how to easily submit a bug report :S
     
  5. crdmrn

    crdmrn

    Joined:
    Dec 24, 2013
    Posts:
    152
    thierry_unity and Peter77 like this.