Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
avatar image
0
Question by Dogg · Aug 21, 2014 at 11:08 AM · gameobjecttransformspriteposition

How To Move GameObjects In Fixed Path?

I have two questions in one. Yes I know only one question per question asked but it's related to this. I'll be sure to not only accept who's ever answer I'm most satisfied with, but also give it a like. Anyways as you read in the title I want to know how can I move certain gameobjects in a fixed path to a certain position. For an example let's say a gameobject is off screen, well I would like to move it across the screen all the way to the end in a diagonal movement(straight up across the screen), then destroy it so it doesn't affect the performance or something.

Now the next question, how can I change the scale of a sprite gameobject from a script to a certain scale? It's like the first question only re-scaling it not moving it. Well sorry for the long paragraphs it was mostly just me typing nonsense. Anyways thanks for reading.

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

Answer by YoungDeveloper · Aug 21, 2014 at 11:23 AM

Use iTween: https://www.assetstore.unity3d.com/en/#!/content/84 It can do everything related to moving in certain paths.

What comes to your sprite scaling, it's not clear, if you want to scale go itself use transform.localScale http://docs.unity3d.com/ScriptReference/Transform-localScale.html

If you want to scale sprite itself use sprite.bounds http://docs.unity3d.com/ScriptReference/Sprite-bounds.html

Comment
Add comment · Show 1 · 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 Dogg · Aug 21, 2014 at 06:19 PM 0
Share

I'll check it out, though I always have problems when using things from the asset store, but who knows maybe I can get something working this time. I just tried using localScale, it does not achieve my desired effect so far. It just changes the scale right off the bat, and not slowly changing it. I haven't used sprite bounds yet, I'll look into it.

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

22 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

Related Questions

Position of a GameObject 2 Answers

How to tell if two blocks are right next to each other?(2D) 1 Answer

Raycast to Disable Script 0 Answers

Instantiate a GameObject at a position specific to an element that was found in a text 1 Answer

How do I check if an Object isn't moving? (C#) 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