playMaker

Author Topic: DoTween Actions (DOTween v1.1.310)  (Read 87587 times)

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: DoTween Actions (DOTween v1.0.770)
« Reply #30 on: August 24, 2015, 04:19:54 AM »
hi,

can't test your code but change only this:

float yy = to.Value.x;  -> float yy = to.Value.y;
float zz = to.Value.x; -> float zz = to.Value.z;

... and it should work. as you can see it is a bug cause the code is wrong..

let me know how it goes..

NvdS

  • Playmaker Newbie
  • *
  • Posts: 18
Re: DoTween Actions (DOTween v1.0.770)
« Reply #31 on: August 24, 2015, 05:30:03 AM »
Hi,

I've just installed DOtween and the custom actions. I was tipped to install these to tween a menu which I couldn't fix with iTween.

I use the DOtween Move Transform to action to change the position (from Y=-50 to Y=50...pretty straight forward) of the menu (see attachment). It works to change the position of the object. That's a big step forward which makes me happy, but it doesn't tween. As soon as I start modifying the settings of 'duration' it stops working. It doesn't change the position correctly anymore. The Y-pos is set to -49.91714 (instead of 50) and the console promps '....mmm did 'DoTween" work??'

My answer would be: nope, but can't tell why? Does anyone of you guys have a clue?

« Last Edit: August 24, 2015, 05:33:06 AM by NvdS »

NvdS

  • Playmaker Newbie
  • *
  • Posts: 18
Re: DoTween Actions (DOTween v1.0.770)
« Reply #32 on: August 24, 2015, 05:33:48 AM »
lalalala...

just figured it out: setting the time scale to 0 blocked the tweening...

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: DoTween Actions (DOTween v1.0.770)
« Reply #33 on: August 24, 2015, 12:01:11 PM »
hi,

can't test your code but change only this:

float yy = to.Value.x;  -> float yy = to.Value.y;
float zz = to.Value.x; -> float zz = to.Value.z;

... and it should work. as you can see it is a bug cause the code is wrong..

let me know how it goes..

Hey Dudebxl, sorry, this was the fix to local move which I mentioned in my post before. What I meant to say is that I think I'm having trouble with the change end value which doesn't seem to play well with floats. When the target position is changed it sets the follow position to 0. I will try to figure it out and report back here.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: DoTween Actions (DOTween v1.0.770)
« Reply #34 on: August 24, 2015, 02:47:43 PM »
got it working. It was that ChangeEndValue does not like floats so for anyone that is interested, you do not add the restart line at the end. you just add a new DOMove under it. Here is the code for X.

Code: [Select]
Tweener followtweenx = _target.transform.DOMoveX(to.Value.x, duration.Value, snapping.Value).SetAs(setFinal);
                    followtweenx.OnUpdate(() =>
                    {
                        float xmove = to.Value.x;
                        if (!x.IsNone) xmove = x.Value;
                       
                        if (toObject.Value != null)
                        {
                            x = go.transform.position.x;
                        }

                        if (prevTargetPos.x != xmove)
                        {
                            prevTargetPos.x = xmove;
                            followtweenx.ChangeEndValue(xmove, duration.Value, snapping.Value);
                            _target.transform.DOMoveX(xmove, duration.Value, snapping.Value).SetAs(setFinal);

                        }
                    });

I also found other little hiccups in the local script so here is the full script. It has the old code commented in case anyone would like to switch it back, but it has the local fixes and the update I added.

edit: with this script the ease type goes really slow with any in's but not on the outs when the object moves.
« Last Edit: August 25, 2015, 12:18:07 PM by sebaslive »
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: DoTween Actions (DOTween v1.0.770)
« Reply #35 on: August 25, 2015, 09:24:31 AM »
Cool.. Not understanding the problem but thx anyway.. :D
Will review in the next update..

What other hiccups did u find?


sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: DoTween Actions (DOTween v1.0.770)
« Reply #36 on: August 25, 2015, 09:49:45 AM »
Opps, just checked and the other hiccups were my own. Sorry about that.

And the problem was basically that I wanted my object A to follow object B instead of just stopping at B's last known position before it moved.

but thank you for these excellent scripts. A lot of time went into these puppies and I know everyone really appreciates it!
« Last Edit: August 25, 2015, 10:50:48 AM by sebaslive »
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: DoTween Actions (DOTween v1.0.770)
« Reply #37 on: August 25, 2015, 02:31:40 PM »
It changes the duration to function as a speed instead of a duration of how long it takes to get to target.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

zorranco

  • Junior Playmaker
  • **
  • Posts: 50
Re: DoTween Actions (DOTween v1.0.770)
« Reply #38 on: October 01, 2015, 09:08:25 AM »
I try to perform a DOTween fade but the material turns into weird color instead of making it transparent. Only works if alpha is set to zero...any other value turns object into yellowish color.

Shader is Unity 5 standard/transparent.

Any advice?

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: DoTween Actions (DOTween v1.0.770)
« Reply #39 on: October 01, 2015, 09:24:00 AM »
mmmm..

first the fade is 0 to 1 so for 25% fade it means u need to input 0.25

I got it work with _Color  -> input it in 'Material Fade extra' section

list for unity5 shader: open edit shader to find them depending on the shader u r using.

_Color
_TintColor       
_MainTex         
_Glossiness   
_Metallic       
_OverlayTex     
_EmissionLevel 

Diffuse - "_MainTex"

Specular/Roughness - "_SpecGlossMap"

Normal - "_BumpMap"

AO - "_Occlusion"

...... etc

note: as long as it had Alpha u can fade.

let us know if it worked?
« Last Edit: October 01, 2015, 10:26:26 AM by dudebxl »

zorranco

  • Junior Playmaker
  • **
  • Posts: 50
Re: DoTween Actions (DOTween v1.0.770)
« Reply #40 on: October 01, 2015, 10:53:09 AM »
Because alpha value is 0-255, I thought action value was same  :-[

Tryed 0.25 and fades properly :)

Many, many thanks for the explanation!!
« Last Edit: October 01, 2015, 11:01:17 AM by zorranco »

boragungor

  • Playmaker Newbie
  • *
  • Posts: 17
  • Who really wrote Beethoven's music to begin with?
Re: DoTween Actions (DOTween v1.0.770)
« Reply #41 on: December 22, 2015, 02:47:50 AM »
Thanks for the actions =)

dorkirt

  • Playmaker Newbie
  • *
  • Posts: 5
Re: DoTween Actions (DOTween v1.0.770)
« Reply #42 on: January 19, 2016, 06:53:23 PM »
Thanks for share the package !

Getting some errors in some actions with DOTween_1_1_135 package from the official site. 

 :-X


dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: DoTween Actions (DOTween v1.0.770)
« Reply #43 on: January 19, 2016, 07:19:14 PM »
Thanks for the info but I am using it now in unity 5.2 + dotween 1.1.135 in my project and I have no errors. Make sure you updated Dotween after installing using Dotween utility panel. 
« Last Edit: January 19, 2016, 07:47:14 PM by dudebxl »

dorkirt

  • Playmaker Newbie
  • *
  • Posts: 5
Re: DoTween Actions (DOTween v1.0.770)
« Reply #44 on: January 20, 2016, 06:06:42 AM »
Thank you dudebxl.  Didn't know what there is a dotween Setup menu lol.

 In unity 5.3 now i only get this error

ssets/PlayMaker Custom Actions/Dotween Actions/DotweenPathTransformTo.cs(204,38): error CS0115: `HutongGames.PlayMaker.Actions.DotweenPathTransformTo.OnDrawGizmos()' is marked as an override but no suitable method found to override

Removed "override" from "public override void OnDrawGizmos(){"  not sure of the results