EASY make object move faster. itween related
I am using a script from " itween " to move this gameobject up and down etc
but its not moving at the speed I want
2d game
I understand this script is probably linked and pulls from other itween scripts, I tried opening the other itween script but cannot figure how to adjust this, I tried adjusting some easin out etc code in the other itween script but still -- nothing
please help
below is the script I have on the object --
if needed I can post the other itween script but its not possible its massively long
public class cutterupdown : MonoBehaviour
{
//Timer = Time.time + Random.Range(1,6);
/*
void Start(){
iTween.MoveBy(gameObject, iTween.Hash("x", 3, "easeType", "easeInOutExpo", "loopType", "pingPong", "delay", .3));
}
}
float maxTimeVis = 5.0f; //max time for visible
float maxTimeInvis = .5f; //max time for invisible
IEnumerator Start () {
float maxTimeVis = 5.0f; //max time for visible
float maxTimeInvis = .05f; //max time for invisible
float curTime = 0.0f;
while(Active) {
if (gameObject.GetComponent<Renderer>().enabled) {
curTime = Random.Range(0.01f, maxTimeInvis);
} else {
curTime = Random.Range(0.01f, maxTimeVis);
}
gameObject.GetComponent<Renderer>().enabled = !gameObject.GetComponent<Renderer>().enabled;
yield return new WaitForSeconds(curTime);
}
*/
void Start(){
iTween.MoveBy(gameObject, iTween.Hash("x", 3, "easeType", "easeInOutExpo", "loopType", "pingPong", "delay", Random.Range(.01f,1f)));
}
}
Answer by doublemax · Nov 22, 2016 at 03:38 PM
I think i already answered a similar question from you: The "delay" parameter controls "when" the animation starts, not the speed. Set the "time" parameter to control the speed of the animation.
when you say set the time parameter do I search and set it in the itween script or do I make one in this script?
the itween script has problly 100 pages in that script sicne as u know its a pull / use what you need type of script
I was talking about the parameter in the iTween hash.
"delay", Random.Range(.01f,1f)
Replace "delay" with "time" and you get should what you want.
got it can I ask you?
can I keep the delay and then just add the time copied code next to it? or on next line
I do want a delay but also want him to move fast when he does.
Your answer

Follow this Question
Related Questions
How to change the speed of a runing iTween as I desired? 0 Answers
iTween camera fade NOT fading UI canvas 0 Answers
Timeline preview and iTween: iTween scripts getting added to objects in the editor 0 Answers
iTween: show a loading text right after CameraFadeTo has turned the screen black 0 Answers