Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

Dots camera

Discussion in 'Cinemachine' started by marvalgames, Nov 16, 2020.

  1. marvalgames

    marvalgames

    Joined:
    Sep 29, 2020
    Posts:
    1
    I am using dots physics so the collider extension doesn't do anything? Work around? Thanks
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    5,559
    For now, you'll have to make your own collider extension that queries Unity.Physics.

    FYI we are working on a 100% DOTS version of Cinemachine. It's still in early stages, as the DOTS API is evolving, but it's looking very good.
     
  3. Unity_gamer

    Unity_gamer

    Joined:
    Aug 19, 2011
    Posts:
    30
    @Gregoryl Any updates on the Dots version Cinemachine ??
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    5,559
    None that I can share at this time. It's still a thing.
     
    Bonkurazu likes this.
  5. ToniSnyder

    ToniSnyder

    Joined:
    Dec 2, 2021
    Posts:
    1
    Hi @Gregoryl! Are there any guides/suggestions to making Cinemachine work with Unity.Physics without stuttering? My process connecting Cinemachine with DOTS is simple: create hybrid object as child of PhysicsBody. CompanionLink'ed GameObject transform updated via CopyTransformToGameObjectSystem. And I make this gameobject as Follow and LookAt targets for CinemachineVirtualCamera. No matter what I change (CinemachineBrain update method, Aim/Body types) camera not moving smooth along with body. Maybe there are some "official" methods for glueing Cinemachine and DOTS for current state of DOTS packages? Thanks in advance!
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    5,559
    @ToniSnyder If the transforms get updated before LateUpdate then CM will see them if the Brain is set to LateUpdate. In that case, you'll have to do some kind of interpolation to adjust for the clock difference between render deltaTime and the physics fixed time step.

    If you're updating UnityPhysics on the FixedUpdate clock with the brain set to FixedUpdate, then you'll need to synch the the transforms (without interpolation) after doing the physics update and before CMBrain does its FixedUpdate.

    Alternatively, you can put the Brain in ManualUpdate mode and call brain.ManualUpdate after the physics has updated and the transforms have been synched.

    Without more info about your game loop I can't really say why you're getting stuttering.
     
    ToniSnyder likes this.
unityunity