grofit / dotween-nodecanvas

Node Canvas actions for DoTween library
12 stars 4 forks source link

Add support for SetSpeedBased #3

Closed DogeThis closed 8 years ago

DogeThis commented 8 years ago

Should expose this useful parameter.

DogeThis commented 8 years ago

SetSpeedBased(bool isSpeedBased = true) If isSpeedBased is TRUE sets the tween as speed based (the duration will represent the number of units/degrees the tween moves x second). NOTE: if you want your speed to be constant, also set the ease to Ease.Linear. Has no effect if the tween has already started or is inside a Sequence.

transform.DOMoveX(4, 1).SetSpeedBased();
grofit commented 8 years ago

Add a pull request once you get it working and will merge in

grofit commented 8 years ago

Have merged in the pull request, will close this but feel free to add others or comment further on here if needed.

armnotstrong commented 6 years ago

Hi,

If isSpeedBased is TRUE sets the tween as speed based (the duration will represent the number of units/degrees the tween moves x second).

Here x is 1 right? If I understand right, when set tween as speed based, the duration became a parameter which indicts how much units the tween changes per second?