Recent Posts

Pages: 1 ... 5 6 [7] 8 9 10
61
DOTween & DOTween Pro / Re: ID field in new version?
« Last post by Daniele on April 24, 2016, 12:51:07 PM »
Hello!

The ID, at least for now, is just in case you want to use static DOTween method on your path via its id, like DOTween.Pause(myId) :P

EDIT: saw your edit after answering, ooops. But yes, when you call a static ID-based method, all the tweens with the same ID will react.
62
DOTween & DOTween Pro / Re: Is DOTween Path relative movement possible?
« Last post by princemoonrise on April 24, 2016, 11:33:07 AM »
Thank you for the advice and idea.  So does this mean I can make a path tween that starts slow or with little movement and when it gets to waypoint 1 I can immediately call a DORestart and have its path re-adapt to its current position?  My goal is to have enemies spawn in at different places, then have them use the same path relative to their position.  Would it work if I did that right when they spawned in?
63
DOTween & DOTween Pro / ID field in new version?
« Last post by princemoonrise on April 24, 2016, 11:29:23 AM »
Hello again.. I was wondering what the new ID field is for in DOTween Path?  Will this allow us to have multiple Tweens with different ID's per gameobject? by having multiple components with different ID's?  (I recall seeing it said this wasn't possible before?)  If not, what is the field used for?  Thank you!  :)

Edit:  Saw the answer on the most recent thread... but I suppose I can use this to ask another question:

What happens if I give tweens the same ID?  Will calling Play cause all the tweens with that ID to play?
64
DOTween & DOTween Pro / Re: Start a tween on another object from a trigger.
« Last post by arico on April 23, 2016, 12:39:17 PM »
Amazing!  Thank you!  :)
65
DOTween & DOTween Pro / Re: Start a tween on another object from a trigger.
« Last post by Daniele on April 22, 2016, 10:57:07 PM »
Hello,

And oops, my bad. I assumed you were talking about DOTweenAnimations, not DOTweenPaths. For some mysterious reason, I didn't add an ID field to DOTweenPaths, and no one requested it before. That said, here you go, I just updated DOTween Pro so there's the ID field on paths too. Just reimport the package and re-run the Setup as usual :)

P.S. Once you give your path an ID (for example "MyID") you can call DOTween.Play("MyID").

Cheers,
Daniele
66
DOTween & DOTween Pro / Re: Start a tween on another object from a trigger.
« Last post by arico on April 22, 2016, 09:00:45 PM »
Hello Demigian,

In my scene I did this: placed an object (cube), added to it a script "Do Tween Path" and I wanted this path to be executed when the first person controller arrives to a collider.  So I added an script to the object with the collider with the instruction: Dotween.Play("cube"), but that doesn't work, the tween doesn´t execute.  Is it there a way to execute this path in such so simple way?.  Do I need to add any instruction to find the id of the path or the id of the gameobject, or I cannot execute this path when something enters a collider (like if this -enter the collider- would work like a switch to execute/stop this object moving through the path?


Thank you very much!  :)
67
DOTween & DOTween Pro / Re: Start a tween on another object from a trigger.
« Last post by Daniele on April 22, 2016, 07:54:25 PM »
Hi!

In DOTween Pro's editor there is a field called "ID", and that's where you assign it. When you create a tween via code instead you can chain a SetId.
68
DOTween & DOTween Pro / Re: Start a tween on another object from a trigger.
« Last post by arico on April 22, 2016, 07:50:50 PM »
Hello,

Please, how do I assign an id to a tween?.  Is it in the editor or by code?.

Thx
69
So i am trying to figure out how i can pass parameters to my method which then creates a tween from it.

I am unsure how people are doing it - and have not really seen many in depth examples for this. My current method is like this:

Code: [Select]
public void SetTarget(Hashtable ht){
    if(ht.ContainsKey("duration") == false){
      ht.Add("duration",2.0f);
    }
    if(ht.ContainsKey("ease") == false){
      ht.Add("ease","linear");
    }

    DOTween.To(()=> transform.position, x=> transform.position = x, (Vector3)ht["target"], (float)ht["duration"]).SetEase((Ease)ht["ease"]);
}

I assume a hash table is not the smartest way to approach this, and i can see  this is going to get even more unmanageable when i add callbacks of which also have parameters. I am confused how for example i would pass an ease type say Quad ease in-out or callbacks with parameters to go with them.

I call my method like this:

Code: [Select]
void eventTriggered(){
    Hashtable param = new Hashtable();
    param.Add("target",target);
    param.Add("ease","QuadEaseInOut");
    cameraHandler.SetTarget(param);
}

Has any one got any advice on how i should setup my method to be more flexible like this?
70
DOTween & DOTween Pro / Standard Unity TextMesh support
« Last post by Caligari on April 18, 2016, 04:44:21 AM »
Hey, I'm looking to tween the color on a TextMesh I have, but as far as I can tell there are no shortcuts to make that possible at the moment. I see that if I was using TextMeshPro it would be possible, but not for the built-in base TextMesh. Is that right? Are there plans to support the built-in TextMesh in the future?
Pages: 1 ... 5 6 [7] 8 9 10