Search Unity

Chronos – Time Control – Unity Awards Winner

Discussion in 'Assets and Asset Store' started by LazloBonin, Apr 9, 2015.

  1. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    812
    If anybody is having issue with Windows Store builds, TypeSerializer and GetType, replace line 16 in TypeSerializer.cs with:

    Code (CSharp):
    1. #if (!UNITY_METRO)
    2.             Type type = Type.GetType(fullName, false, false);
    3. #else
    4.             Type type = Type.GetType(fullName, false); // Third argument not always supported
    5. #endif
    I'll get that fix pushed in the next version.
     
  2. Blue-Wolf

    Blue-Wolf

    Joined:
    May 27, 2014
    Posts:
    20
    Thanks for the prompt response, cheers!
     
  3. tnaseem

    tnaseem

    Joined:
    Oct 23, 2009
    Posts:
    149
    PM sent with link to download a little test project. Thanks for looking into it! Hopefully, you can find out what's going on. I have a feeling it's to do with the forces not behaving properly with Chronos.
     
    LazloBonin likes this.
  4. Double_D

    Double_D

    Joined:
    Dec 5, 2012
    Posts:
    1
    Just wanted to report some accidental repeated text on the tutorial page, under the section "Modifying The Spawner", the text currently reads,

    "That means our spawner will execute at normal speed no matter what time scale we a value we haven't even touched. That means our spawner will execute at normal speed no matter what time scale we assign to our Enemies clock."

    I believe it should just read as,
    "That means our spawner will execute at normal speed no matter what time scale we assign to our Enemies clock."
     
  5. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    812
    Thanks for the heads up, fixed.
     
  6. nowshow

    nowshow

    Joined:
    Dec 26, 2015
    Posts:
    4
    Great video demo, video examples will be included in the plugins?
    Cool explosions, which you are using plugins?
     
  7. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    812
  8. VirtualVassal

    VirtualVassal

    Joined:
    Oct 5, 2015
    Posts:
    13
    Hello! So I picked up Chronos on sale with the intent to use it in another project down the line (looks too cool to pass up).

    I'm looking to start making my UI and Pause Menu; fairly new to this, and I was looking at this asset to control my pause functions: https://www.assetstore.unity3d.com/en/#!/content/9603 (I use Playmaker).

    I started wondering though, could I just use Chronos to pause my game? This may be a dumb question, because I assume I can, but has anyone here used Chronos just for their pause menu, and if you want to explain (in brief) how to go about that, it'd be much appreciated.

    Thanks for the great asset!
     
  9. N00basaurusRex

    N00basaurusRex

    Joined:
    Jan 25, 2015
    Posts:
    6
    Hi, I'm fairly new to C# and I'm trying to follow the Chronos tutorial... I'm to the point where it gets to scripting and changing the getcomponant<rigidbody2d>.velocity = newVelocity one line 48 of the enemy script and switching it out for time.rigidbody2D. I got through changing the type of script as well, from mono to base behavior and adding "using chornos". The tutorial then says to hit play and I should see the results of those changes... but the scene plays normally without any change. The time control on the buttons 1-5 has no effect on how the demo plays. I don't know what I'm doing wrong... I can't get the tutorial to work.
     
  10. s1fr

    s1fr

    Joined:
    Mar 5, 2015
    Posts:
    5
    This looks like an excellent asset.

    Can you point me to a guide that allows me to slow down and reverse a particle system?

    I've got a particle system prefab to which for test purposes I've added a Timeline script that hooks to the Global Root clock. I'm getting slowdown and stuttering through the entire scene, so I must be doing something wrong?
     
  11. N00basaurusRex

    N00basaurusRex

    Joined:
    Jan 25, 2015
    Posts:
    6
    Ok. I added debug.log to each of the get button if statements... and now they work? I also think I was pressing the 1 key too early as there was nothing for Chronos to record.
     
  12. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    812
    You can use Chronos for pausing your game, although it might be a bit of an overkill over the traditional Time.deltaTime vs Time.unscaledDeltaTime method. Still, it's perfectly possible. Just add a Timeline component to every game object you want to pause, pointing to a global clock (let's say this clock is called "Game"). For your UI elements, either don't add a Timeline at all, or add a Timeline pointing to another "GUI" global clock. Then, simply set the Game clock's time scale to zero; the GUI will remain unaffected, at the normal 1 time scale.

    Glad you got it fixed!

    Thanks! Slowing down and reversing a particle system is as easy as adding a Timeline component to the GameObject with the ParticleSystem component, then changing the referenced clock's time scale to < 1 for slow down, < 0 for rewind. However, you might get stuttering at very low absolute time scales on the particles. See the limitations page for more details: http://ludiq.io/chronos/limitations#particles

    If you're getting scene-wide stuttering or lag, there's an issue else where. How many objects are in your scene? How many of them have timelines?
     
  13. VirtualVassal

    VirtualVassal

    Joined:
    Oct 5, 2015
    Posts:
    13
    Appreciate the response. I've been having a few glitches with the traditional time.deltatime, so I might look into Chronos as a backup. Thanks for the layout of how to go about it.
     
  14. Deleted User

    Deleted User

    Guest

    Hi,

    New to this asset and not quite sure what I should be trying to modify for this error:

    MissingReferenceException: The object of type 'Rigidbody' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    Chronos.RigidbodyTimeline3D.set_bodyIsKinematic (Boolean value) (at Assets/utilities/Chronos/Source/Timelines/RigidbodyTimeline3D.cs:135)
    Chronos.RigidbodyTimeline`2[UnityEngine.Rigidbody,Chronos.RigidbodyTimeline3D+Snapshot].Update () (at Assets/utilities/Chronos/Source/Timelines/RigidbodyTimeline.cs:93)
    Chronos.TimelineEffector.Update () (at Assets/utilities/Chronos/Source/TimelineEffector.cs:40)
    Chronos.Timeline.Update () (at Assets/utilities/Chronos/Source/Timeline.cs:108)

    Basically on RigidbodyTimeline3d at line 135:
    set { component.isKinematic = value; }

    It is trying to set a Rigidbody which no longer exists (from being destroyed).

    What is the best way to inform Chronos that the object's Rigidbody is no longer there an that 'set' is no longer needed?

    Thanks.
     
  15. Blackbox514

    Blackbox514

    Joined:
    Apr 8, 2016
    Posts:
    22
    Hi folks,

    I'm also new to this asset and have a question regarding the following code snippet I got from the documentation.

    Clock enemiesClock = Timekeeper.instance.AddClock("Enemies");
    Enemy[] enemies = GameObject.FindObjectsOfType<Enemy>();

    foreach (Enemy enemy in enemies) { // This assumes every enemy already has a Timeline component
    Timeline timeline = enemy.GetComponent<Timeline>();
    timeline.mode = TimelineMode.Global;
    timeline.globalClock = enemiesClock;
    }

    Issue #1 - Strangely the globalClock member doesn't seem to exist in Timeline! :) Am I missing something obvious?

    Thanks for any help you can provide.
     
  16. s1fr

    s1fr

    Joined:
    Mar 5, 2015
    Posts:
    5
    [I had no joy with particles, I had about 20 objects in my test scene with timelines only on one of them.

    So I went for a different approach. I'm now using (for a demo) the Fracture plugin you use on your demo video, only nothing seems to happen when I apply a Timeline object to each of the fractured objects (for now just pointing at the root global clock set to 1.0 timescale for testing). Everything is just frozen.

    I went through the comments and noted you mentioned something about modification, using a PhysicsTimer3D component, which I can't find anywhere.

    Can you please step me through how to do this with the Fracture asset please?
     
  17. Blackbox514

    Blackbox514

    Joined:
    Apr 8, 2016
    Posts:
    22
    DISCLAIMER: I'm a total noob here, so please take my response with a grain of salt.
    What I can say is that I did manage to successfully integrate Chronos in my game after a few hours work and did experience a few problems that exhibited the frozen behaviour you describe.

    A few things I had to check:
    1. Do all your objects have rigidbody's? I think I read somewhere that they also have to be set to Kinematic, but don't quote me on this.
    2. In your scripts, make sure that your class uses BaseBehaviour and that the "time" component is not null. This is really important actually. For a couple of my GameObjects, time was equal to null so I needed to manually fetch the Timeline component using GameObject.GetComponentInParent<Timeline>().
    3. Validate that the Timeline was assigned to a valid Globalclock which is not set to 0. This happened to me by accident, where my root got set to 0 by accident.
    4. If Chronos isn't made aware of all the forces that are exerted on your objects, nothing will happen. Follow the migration guide Rigidbody section and adjust all scripts which exert force on the gameObjects ie. use "time.rigidbody.foo" instead of "GetComponent<Rigidbody>().foo".
    5. In my particular project, my Timekeeper object is located in a different scene that I set to Do Not Destroy On Load and therefore all the Timelines within the GameObjects buried in the levels could not point to the global clocks. Only when I realized I could load both scenes in the editor was I able to assign the proper GlobalClock. I originally tried doing this via C# script but failed miserably... hence my above question which hasn't been answered yet.

    Hope this helps!

    -Y
     
    Akshara likes this.
  18. s1fr

    s1fr

    Joined:
    Mar 5, 2015
    Posts:
    5
    Thanks Blackbox514, here's where I'm stuck.
    In the Fractured code, there is a class called FracturedObject with a method called Explode and in there is the following line:

    chunk.GetComponent<Rigidbody>().AddExplosionForce(fExplosionForce, v3ExplosionPosition, 0.0f, 0.0f);​

    Given that chunk is a FracturedChunk object, there's no neat way I can think of to substitute as per the migration guide, and given that ludiq has already done this for this asset, I was wondering if he'd be kind enough to share his precise changes?

    Update: I've derived FracturedChunk from BaseBehaviour, which allowed me to insert those migration changes, but still no movement.

    ludiq, any help appreciated!
     
    Last edited: Oct 4, 2016
  19. Blackbox514

    Blackbox514

    Joined:
    Apr 8, 2016
    Posts:
    22
    Btw, I'm not saying this is the case here, but I just wanted to point out that this is precisely the type of situation where #2 occurred in my project. To fix, I needed to fetch the Timeline component manually from the parent for it to work.

    [UPDATE] You've probably already done this, but I'd put a couple Debug.Log's in there to validate how many times the code is called (once per fragment chunk), the names of each of the chunks, and the check that the values that are passed were initialized properly and are not all zero.

    Also, as per the migration guide you need to make sure mass, drag values are properly set using Chronos time as well. I hadn't thought of those the first time through.

    Finally, I found that Unity's "Time" functions are very easily confused with Chronos lowercase "time" and I had a few I missed originally.
     
    Last edited: Oct 4, 2016
  20. s1fr

    s1fr

    Joined:
    Mar 5, 2015
    Posts:
    5
    I've got a lot further. However, I still have a big problem. (I'd gladly pay ludiq for support on this, any idea where he is these days?)

    I can get a fractured object to move forward and backwards with positive and negative timescales on a root timer, but after a while, changing the value while playing has no effect. The biggest issue is that let's say a fractured object, using a negative timescale has returned to its original position: From that point, setting a positive timescale only ejects one or two fragments, the rest stay put.

    I could really use some help on this ludiq. If you can share the modifications you made to the Fracture and Shatter plug in that allows this all to work, that'd be much appreciated. I have a big demo to give to a major client on Monday and this is the only thing holding me up! Thanks in advance.
     
  21. Deleted User

    Deleted User

    Guest

    How do you recommend setting up multiple TimeScale clocks.

    The documentation says:
    "Chronos is never affected by Time.timeScale. You should refrain from using that property, as it may even cause unexpected behaviour with physics. To control time globally, create a rootGlobalClock instead and make all of your other clocks its descendants".

    Basically I need two TimeScales so some things can remain paused while Chronos is paused and others keep going with the actual TimeSinceLevelLoaded.

    I'm thinking that making a new variable TimeSinceLevelLoadedX and modifying it's own variable TimeScaleX. The question would be, how to have it exactly match TimeSinceLevelLoaded with the exception of it's unique TimeScaleX?

    As in every Update() or FixedUpdate() TimeSinceLevelLoadedX += something * TimeScaleX?

    Thanks
     
  22. s1fr

    s1fr

    Joined:
    Mar 5, 2015
    Posts:
    5
    As mentioned above a couple of times, I gave up on particles, and went for the Fracture & Destruction asset as used in your demo. Would you be able to share the changes you made to their source to get things working with Chronos please? I've been banging my head against a wall (patiently) for a few days and have made some progress, but cannot get an acceptable result. As I've mentioned, happy to pay for support if necessary, seeing as you look pretty busy these days!
     
  23. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    812
    Missed the email notifications again... Unity really needs to fix their forum software. Sorry all.

    If you destroy the rigidbody component at runtime, you can call GetComponent<Timeline>().CacheComponents() to inform Chronos of the change.

    That's my bad! Forgot to update the documentation. Replace it with timeline.globalClockKey = enemiesClock.key; I'll update the documentation.

    Did you use the code that I sent on Pastie earlier in the thread? Here it is, updated for the latest Chronos version: http://pastie.org/10940663

    See above code. Maybe setting the timeline's rigidbody to kinematic is the key to unlocking movement here.
    That's because Chronos is not a replay plugin. When the time scale is over 0, no recorded data is used. Since there is no explosion triggered again, the objects don't move again.

    You can add multiple GlobalClock components to the Timekeeper object. Then, have your Timelines point to one or the other depending on which set of objects you want to pause. Then you won't need to use the traditional Time hacks.

    Are you the user who emailed me? If so, I hope your F&D problem is now resolved, but I'm still willing to help out for particles. What exactly isn't working?
     
  24. Giosolo

    Giosolo

    Joined:
    Sep 19, 2012
    Posts:
    9
    I have a endless parallax scrolling to the left. Whenever it reaches the left side of the screen,
    I update its transform position to be positioned at the most right side of the screen.
    It has a TimeLine. When I rewind it, I get a fast interpolation of the whole parallax from side to side.
    How can I avoid this interpolation?

    Here is the Update function:

    Code (CSharp):
    1.     public void Update ()
    2.     {
    3.         if(timeline.timeScale > 0)
    4.         {
    5.             if(transform.position.x < minScrollX )
    6.             {
    7.  
    8.                 timeline.Do
    9.                 (
    10.                     true, // ... create a repeatable event...
    11.  
    12.                     delegate // ... that sets new position and saves the previous one...
    13.                     {
    14.                         Vector3 tmp = transform.position;
    15.                         Vector3 prevPosition = tmp;
    16.                         tmp.x += maxScrollX;
    17.                         transform.position = tmp;
    18.                         return prevPosition;
    19.                     },
    20.  
    21.                     delegate (Vector3 prevPosition) // ... and reverts it on rewind.
    22.                     {
    23.                         transform.position = prevPosition;
    24.                     }
    25.                 );
    26.             }
    27.             else
    28.             {
    29.                 transform.position += new Vector3(-speed * timeline.deltaTime , 0 , 0);
    30.             }
    31.             return;
    32.         }
    33.     }
     
  25. Giosolo

    Giosolo

    Joined:
    Sep 19, 2012
    Posts:
    9
    I ended up with a workaround using a custom recorder.
    Also removed the Occurence from the scroll script:

    Code (CSharp):
    1.     public void Update ()
    2.     {
    3.         if(timeline.timeScale > 0)
    4.         {
    5.             if(transform.position.x < minScrollX )
    6.             {
    7.                 Vector3 tmp = transform.position;
    8.                 Vector3 prevPosition = tmp;
    9.                 tmp.x += maxScrollX;
    10.                 transform.position = tmp;
    11.             }
    12.             else
    13.             {
    14.                 transform.position += new Vector3(-speed * timeline.deltaTime , 0 , 0);
    15.             }
    16.             return;
    17.         }
    18.     }    
    Custom recorder:
    Code (CSharp):
    1. using UnityEngine;
    2. using Chronos;
    3.  
    4.  
    5. public class ParallaxRecorder : Recorder<ParallaxRecorder.Snapshot>
    6. {
    7.     public struct Snapshot
    8.     {
    9.         public Vector3 position;
    10.     }
    11.  
    12.     // Record the current position in a snapshot
    13.     protected override Snapshot CopySnapshot()
    14.     {
    15.         return new Snapshot()
    16.         {
    17.             position = transform.position
    18.         };
    19.     }
    20.  
    21.     // Apply a snapshot to the current GameObject
    22.     protected override void ApplySnapshot(Snapshot snapshot)
    23.     {
    24.         transform.position = snapshot.position;
    25.     }
    26.  
    27.     // Interpolate between two snapshots for smoothing.
    28.     // If the position delta between snapshots is too high then instead of lerp it - set it to the target position.
    29.     protected override Snapshot LerpSnapshots(Snapshot from, Snapshot to, float t)
    30.     {
    31.         if(from.position.x - to.position.x > 1)
    32.         {
    33.             return new Snapshot()
    34.             {
    35.                 position = to.position
    36.             };
    37.         }
    38.  
    39.         //else
    40.         return new Snapshot()
    41.         {
    42.             position = Vector3.Lerp(from.position, to.position, t)
    43.         };
    44.              
    45.     }
    46. }
     
    Last edited: Oct 17, 2016
  26. Deleted User

    Deleted User

    Guest

    Forgive me if this has been resolved somewhere in this thread, I can't seem to find the search for this thread only.

    I have some objects "falling"; rigidbody 2D; basically relying on gravity and linear drag to change how fast they fall. I have noticed that when using the rewind feature, the linear drag value doesn't return to its initial value, even after the timescale being set back to one. This ends up causing them all to fall super super quick.

    Is this a known issue or something I have done wrong in either using Chronos or in my approach to having these objects fall?

    I have checked it by looking in the editor.

    Before rewind: Linear Drag = 0.1
    After first click to rewind: Linear Drag = 0.06
    After second click to rewind: Linear Drag = 0.001

    It's also manipulating the Angular Drag is an odd way too.

    Any help would be greatly appreciated, thanks. Rewind problems aside, I LOVE this asset, using to slowdown everything including music is a really cool feature.
     
  27. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    812
    That's a clever workaround, but I feel like your first attempt should have worked. I think the problem is that even though you change the position instantly, and revert it on rewind, which is a perfect use of occurrences, the transform recorder will still take its snapshots at regular intervals and interpolate between them.

    Perhaps another way of doing it, more simply, would be to force the recorder to take a snapshot before and after the position change in the same frame, therefore having it interpolate over 1 frame.

    If you want, I'll tell you how to do that, and if it works, I'll make the changes available for the next version.

    First, go to Chronos/Source/RecorderTimeline.cs and change the Record method at line 93 from protected to public.

    Then, surround your position change with manual records:

    Code (CSharp):
    1.     public void Update ()
    2.     {
    3.         if(timeline.timeScale > 0)
    4.         {
    5.             if(transform.position.x < minScrollX )
    6.             {
    7.                 timeline.transform.Record();
    8.                 transform.position = transform.position + new Vector3(maxScrollX, 0, 0);
    9.                 timeline.transform.Record();
    10.             }
    11.             else
    12.             {
    13.                 transform.position += new Vector3(-speed * timeline.deltaTime , 0 , 0);
    14.             }
    15.             return;
    16.         }
    17.     }    
    Your custom recorder shouldn't be needed anymore after this.

    Let me know if this works! I'm a bit worried that two snapshots at the same frame might throw a divide by zero exception somewhere though, if that's the case, I'll guide you on how to fix it.

    That's odd, drag shouldn't be affected at all when rewinding, only when slowing down or accelerating.

    Can you give me some more details on how you call your rewind code?
    Do you manually change drag somewhere? If so, do you do it using Timeline.rigidbody2D.drag instead of Rigidbody2D.drag, as prescribed in the Migration guide? http://ludiq.io/chronos/migration
     
  28. Deleted User

    Deleted User

    Guest

    Hi, here is the code which determines the timescale which is in a FixedUpdate

    Code (CSharp):
    1.     void FixedUpdate () {
    2.         clock = Timekeeper.instance.Clock("Root");
    3.         KeepOnScreen();
    4.  
    5.         if(touchDown)
    6.         {
    7.             //clock.LerpTimeScale(1.0f, 0.2f, true);
    8.             clock.localTimeScale = 1.0f;
    9.  
    10.             #if UNITY_EDITOR
    11.                 MouseControl();
    12.             #elif UNITY_ANDROID
    13.                 TouchControl();
    14.             #endif
    15.         }
    16.         else
    17.         {
    18.             if(rewind)
    19.                 clock.localTimeScale = -1.0f;
    20.             else
    21.             {
    22.                 //clock.localTimeScale = 0.0f;
    23.                 clock.localTimeScale = 0.1f;
    24.             }
    25.         }
    26.     }
    and basically a button on screen, when clicked, it toggles rewind to true, (setting the timescale to rewind)
    The game objects it is affecting have no attached code to modify the drag, and initial settings of

    Linear Drag: 1
    Angular Drag: 0.05
    Gravity Scale: 1

    on the Rigidbody2D; set via the inspector window.

    But I notice each time I click on the rewind button, the Linear Drag and Angular Drag settings change with each click.
     
  29. Deleted User

    Deleted User

    Guest

    Just a quick update, I've noticed that it seems to occur going from a timescale of 0.1f, to -1.0f; Slowing down the time changes the Linear Drag / Angular Drag - and then I'm going straight into reverse time with those slowed down values.

    I did a test going from 1.0f to -1.0f and then it works as expected. Not to worry then I see it's an error in my approach - I think I can fix it but switching to normal timescale prior to dipping into reverse. Thanks again for this awesome asset
     
  30. Borisss

    Borisss

    Joined:
    Feb 17, 2014
    Posts:
    10
    Hi, sorry if this was already answered, I've not been around for couple of months. After upgrading to Unity 5.4.1 particles no longer work for me (even in the demo scene):
    • their speed is much higher then without chronos timeline (time scale is set to 1)
    • they're not completely affected by clocks (pausing doesn't work, rewinding works)
    Is this a known issue? Is there a workaround?
     
  31. aaron2005

    aaron2005

    Joined:
    Mar 22, 2014
    Posts:
    3
    Hi there. Thats a Question I originally posted at the Fracturing DestructionThread, but I didn't received an answer that worked for me.

    So I hope to get an answer from the Chronos angle. Maybe someone also tried to combine both?

    I also want to add, That I needed a script to add the TimeLine because the Chunk somehow stuck at place. So I added this Script to the Chunks.

    EDIT: That thing will triggered, if I destroy the connections to the other chunks.

    Code (CSharp):
    1. public class afterDestroyed : MonoBehaviour {
    2.     public FracturedChunk thisChunk;
    3.     public Chronos.Timeline thisLine;
    4.     public bool chronosIsSet;
    5.     public GameObject thisChunkGameObject;
    6.  
    7.     // Use this for initialization
    8.     void Start () {
    9.         thisChunk = this.GetComponent<FracturedChunk>();
    10.     }
    11.  
    12.     // Update is called once per frame
    13.     void Update () {
    14.         if (thisChunk.IsNonSupportedChunk && !chronosIsSet)
    15.         {
    16.             thisLine = this.gameObject.AddComponent<Chronos.Timeline>();
    17.             thisLine.mode = Chronos.TimelineMode.Global;
    18.             thisLine.globalClockKey = "y";
    19.             chronosIsSet = true;
    20.         }
    21.     }
    22. }
    Here the original post:

    I try a combination of the Fracturing Destruction from Ultimate Gametools the chronos time manipulation. So, I destroy an object and then I revert this action, until the object is fixed again. I am able to add the chronos script to the chunks to let the pieces move forward and backward. But I have no idea, how to connect a chunk to the other again while the game plays?

    Here a little Preview



    I start with a fracture-explosion I do by raycast. That destroys the connection and the ceiling fall. With the timetool I revert the time, so the ceiling will be on its origin place. Now I need to connect them again, to not fall down after play normal time agein. Someone an idea or a hint?
     
    Last edited: Nov 2, 2016
  32. raxel

    raxel

    Joined:
    Dec 12, 2014
    Posts:
    12
    Hey, is there going to be a sale soon? I need Chronos (well I do need a small part of it)
     
  33. yandrako

    yandrako

    Joined:
    Dec 2, 2013
    Posts:
    26
    Hi Ludiq, I wrote you an email with an issue but maybe you didnt see it so I write it here aswell:


    I have a new issue with the chronos plugin and I wonder if you could point me how to solve it.

    Some background info you need to know:
    In my game I use several magic objects that the player can throw on the scene. One of the is a time object which has a time buble (this object has an area clock 3d component attached). When an object of the same global clock traverse this bubble it slows. This works well so far.

    Before some changes, I used to instantiate the object to throw each time i throw it, and then destroy. With this configuration everything works properly. Now I optimice the code so now I dont instantiate the objects each time, just activate and deactivate changin their position.

    The problem:
    first time an object A traverse the time buble of the object B, works well. But after a second throw I have two strange behaviours:
    1 - If I deactivate the bubble object, the timeline of A object still slows as it were traversing a bubble. I suspect it record the timeline somehow and then repeat it? Not sure but the objects slows without the area clock active on the scene.
    2 - Sometimes the object A after traverse the time buble a second time get like a superspeed and get totally crazy.

    Any ideas what could be happening?

    I tried to explain as better as I can, but if you dont understand what I'm trying to describe I can record some video with the issue to help you understand.

    Thank you so much in advance
     
  34. Otavio_Soato

    Otavio_Soato

    Joined:
    May 28, 2014
    Posts:
    4
    So... anyone can help me? rs.
     
  35. Deleted User

    Deleted User

    Guest

    Is there a way to allow AreaClock3d to effect clocks differently (multiply clocka by 2, multiple clockb by 0.5, multiple clockc by 0)?
     
  36. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    812
    Thanks for the report! The issue is fixed in v.2.4.4, which will be submitted for review today.

    Thanks for the report. Unity 5.4 and 5.5 changed a lot of particle related code, and I've now updated Chronos v.2.4.4 to take it into account. However, unfortunately, Unity also introduced a bug that makes simulations stutter, therefore breaking Chronos' particle rewind feature. The issue has been reported and confirmed; Unity is working on it: https://fogbugz.unity3d.com/default.asp?854431_5mmt5ltn2q6nuseh

    There is no sale planned at the moment.

    Answered your email!

    Unfortunately, that's not possible with the current architecture for Chronos. Since it's a very specific use case, I won't be implementing it in an official release. If you want to have a look at implementing yourself, check Chronos/Source/Timeline.cs: the Update method at line 52 calculates the time scale.

    I've changed some code in v.2.4.4 that might impact this; when it's released, could you update and tell me if you still get the issue?

    For this, you'll want to use Occurrences. The documentation and examples for that is here: http://ludiq.io/chronos/documentation/occurrence

    In that specific case, looking at the Fracture & Destruction documentation, I believe you should do something like this:

    Code (CSharp):
    1. fracturedObject.GetComponent<Timeline>().Do
    2. (
    3.     false, // Not repeatable
    4.  
    5.     delegate // On forward, explode
    6.     {
    7.         fracturedObject.Explode(explosionPosition, explosionForce);
    8.     },
    9.  
    10.     delegate // On backward, reset chunks
    11.     {
    12.         fracturedObject.ResetChunks();
    13.     }
    14. );
    15.  
    You might run into a problem with this, however. IIRC, F&D disables the FracturedObject game object when exploding. Therefore, if your timeline is on it, it won't update properly after the explosion, and the backward occurrence will never be called. My suggestion would be to create a Timeline configured the same way on another game object next to the FracturedObject, and instead call "Do" from there.

    Does that make sense? More precisely, instead of:

    Code (CSharp):
    1. fracturedObject.GetComponent<Timeline>().Do(...);
    Use:

    Code (CSharp):
    1. otherHiddenObject.GetComponent<Timeline>().Do(...);
     
  37. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    812
    Version 2.4.4 has been submitted for review.

    Changelog:
    • Fixed bug where animator recording data was lost on pause
    • Fixed bug where disabling area clocks wouldn't release the timelines within
    • Fixed bug where Windows store builds failed because of a missing reflection method
    • Made RecorderTimeline.Record public to allow circumventing of interpolation
    • Updated the rewindable particle systems code to Unity 5.5
    • Added linear and angular drags to rigidbody recorder snapshots
    • Experimental: When rewinding, 2D rigidbodies now trigger the simulated property instead of isKinematic to account for every new body type introduced in Unity 5.5
    • Website: new support form. Support from the Unity forum thread will progressively be faded out.

    Important message

    Because the Unity forum software consistently fails to send me email notifications, I have decided to stop using this thread for support.

    If you have a bug report, question, or feature request, please use the new support form: http://ludiq.io/chronos/support
     
  38. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    In the Version 2.4.2 I think, I had problems setting navmesh destinations while paused as it resets my destination when unpaused, was this fixed?
     
  39. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    812
    I do believe I fixed that issue, try 2.4.3. If it's not fixed, let me know via: http://ludiq.io/chronos/support
     
  40. jlg

    jlg

    Joined:
    Mar 9, 2015
    Posts:
    1
    Can we play from a certain point and from a saved record yet? If not can I sponsor this cause I love Chronos!
     
  41. terrygreer

    terrygreer

    Joined:
    Sep 27, 2014
    Posts:
    18
    Hi
    A very interesting product.
    How hard would it be to make the rewindable actions savable? I've wanted to make a game where you could rewind to any point and then carry on from there for a while, how hard would this be to do? (I know it would take up a lot of memory - but what would the bandwidth likely be for each say minute of game time? I know that it would obviously depend on the game's complexity, but some rules for figuring it out would be helpful)
     
  42. mpenna

    mpenna

    Joined:
    Jan 11, 2017
    Posts:
    1
    I'm no Unity expert, so I'm not sure if this applies at all, but could this plugin be used for controlling the playback speed of movie textures? I'm aiming at being able to play a movie inside a scene and give the user control over its playback speed (speed up / slow down). Does this plugin afford this?
     
  43. SVC-Games

    SVC-Games

    Joined:
    May 21, 2013
    Posts:
    137
    If I understand correctly, a bigger maxParticleLoops value is less taxing and 0 (or negative) is more demanding? If no rewindable timeline is in use maxParticleLoops doesn't make any difference?
     
  44. LunaTrap

    LunaTrap

    Joined:
    Apr 10, 2015
    Posts:
    120
    Can someone explain me why i get this error?



    The "Root" clock is obviously there!

    Also, chronos contantly uses .GetComponent(TimeLine) method, i see it here in this forum, in the tutorials and in the demos, why keep using GetComponent so much? i would think you guys know components must be chached on start.

    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. namespace Chronos.Example
    4. {
    5.     // A base class that provides a shortcut
    6.     // for accessing the timeline component.
    7.     [RequireComponent(typeof(Timeline))]
    8.     public abstract class ExampleBaseBehaviour : MonoBehaviour
    9.     {
    10.         public Timeline time
    11.         {
    12.             get { return GetComponent<Timeline>(); }
    13.         }
    14.     }
    15. }
    Im sorry, but is it needed to call GetComponent all the time, every frame?

    I read this on the tutorials

    Im sorry but long since a certain update of Unity, transform.position and gameobject properties are automatically cached for unity components, GetComponent is not called here, so this is a bad example.
     
    MrAdventure likes this.
  45. mallmagician

    mallmagician

    Joined:
    Jul 15, 2015
    Posts:
    6
    Hi folks,

    Having just slogged my way through this thread, I fear I may have just spent $40 on this, and it can't do what I thought it could based on the store description.

    Ever the optimist, I've messaged the dev, and I'd also like to throw it open to discussion here.

    My use case:-

    Basic puzzle game. Grid based. Cubes move to point on a grid using tweening.

    I bought this asset, as I figured the rewind function would have the ability to stop where you want it to. Here's my problem.... rewinding to some points, lands me slap bang in the middle of a tween. The cube is therefore out of place, no longer behaves as it should, and the world is a dark and lonely place for me. Hehe.

    I read through the documentation before buying, and saw references to a Record function to force the recorder to record a certain frame. But for the life of me (only a noob coder), I can't figure out how to implement that to help my problem. Finally after a lot of tinkering, I broke down, cried a little, shouted at the heavens and decided to message here and the dev on his forum.

    If anyone could help me hack a way around this and implement a rewind that stops pre or post tweens, I'd be forever grateful and would consider you a hero of epic proportions.

    Thanks :)
     
  46. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    812
    Heads up!

    Chronos is 30% off for a few days only!

    Asset Store Link

    Reminder: Because the Unity forum software consistently fails to send me email notifications, I have decided to stop using this thread for support. If you have a bug report, question, or feature request, please use the new support form: http://ludiq.io/chronos/support
     
  47. neuroTrophy

    neuroTrophy

    Joined:
    Jan 22, 2015
    Posts:
    11
    Couldn't you save all of the pieces positions over the last certain number of turns (if not turn based, you could have it store its positions prior to the tween) and then just tween back to the positions. So, instead of actually rewinding via Chronos, you can simulate rewinding by sending all of the pieces back to their stored positions.I'm not sure of your exact needs, so perhaps Chronos would be the better solution; in which case I am not of much help. Good luck!

    Oh, just realized this was MONTHS ago. Well, hopefully you got things figured out haha.
     
  48. ohbado

    ohbado

    Joined:
    Aug 13, 2014
    Posts:
    37
    Hi.
    Are you checking your support forum?
    You seemed to leave the forum for a long time.
     
  49. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    812
    Hi ohbado!

    Sorry, you're right, I've been focusing my time and attention on support for Bolt, our newly released product, because Chronos is pretty stable by now. I'll give a thorough look at all open Chronos issues this week and see if I can issue a patch quickly.
     
  50. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    812