Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by sid4 · Nov 22, 2016 at 02:35 PM · itween

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)));
 
         }
     }



Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

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.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sid4 · Nov 22, 2016 at 04:56 PM 0
Share

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

avatar image doublemax sid4 · Nov 22, 2016 at 09:40 PM 1
Share

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.

avatar image sid4 doublemax · Nov 22, 2016 at 10:44 PM 1
Share

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.

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

78 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

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

Prefab Instantiation Issue or Perhaps iTween? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges