0
Answered

Components affected by Chronos and Physics

Dabblesoft Dan 3 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 1

I have three questions, one for clarification,one that I'm just confused about, and one about an update to an older question.

1. I haven't been able to find a specific listing of which Unity components are affected by Chronos, or even just which categories to look out for. I assume that a Timeline should be on any gameobject that has a Unity component that is from one of the categories listed in Migration documentation. However, in the documentation it says to put a Timeline on EVERY gameobject that should be affected by Chronos. Does this mean you should have a Timeline on gameobjects that are even just simply acting as a container and therefore only has a Transform component on it or only gameobjects that use one of the Unity categories from the Migration docs? Also, I believe I read somewhere that Timelines aren't recursive to their children, is that correct?

2. I've been messing around with some Physics using Chronos and one issue I'm either not understanding or having trouble with is that when using collision.relativeVelocity.magnitude the value returned during a Chronos timeScale change results in a different number than at normal speed. However, when changing Unity's own timeScale the value will remain the same. In the Migration docs there's no mention of a Chronos substitute for Collision stuff. So how do you calculate a collision.relativeVelocity.magnitude at different Chronos timeScale value than 1 that matches the value you get at normal speed? For example, if at a Chronos timeScale of 1 collision.relativeVelocity.magnitude returns 10 then how do you get it to return 10 when using a Chronos timeScale of 0.2f?

3. In the past someone had asked about Chronos and how it affects Unity's WheelColliders, has there been any updates on that or is there a temporary work around to get more accurate results and prevent the bouncing that occurs?


Thanks a bunch and great asset!

Chronos Version:
2.4.13
Unity Version:
2017.3.0f3
Answered

Hi Dabblesoft Dan! I'm so sorry for the late reply on this.

I'll answer each question individually.

1. Here is the list of affected components:

  • Animation
  • Animator
  • AudioSource
  • ParticleSystem
  • NavMeshAgent
  • Rigidbody
  • Rigidbody2D
  • Terrain
  • TrailRenderer
  • Transform
  • WindZone

You do not need to add Timelines to objects that do not have to control time for these components (e.g. static container objects). It's just a simplification in the documentation.

2. I believe the right approach here would be to divide the relativeVelocity by the time scale. Because Chronos has to hook at the physics properties level and not at the timestep level, it can't preserve all those values like native Unity code does. If dividing does not yield the exact same value, I suspect there'd be a square root to add somewhere in the equation.

3. Unfortunately there hasn't been any progress on wheel colliders, as the Unity API does not seem to expose any member that would be needed for customizing the physical properties based on the time scale.