• 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 GamerRaj · Nov 22, 2014 at 04:48 PM · tween

Any Default Motion Tween in Unity

I need to move object on a desired path. Checked different solutions but wanted to know if Unity has any built in feature. Tried to use iTween but doesn't work well objects with RigidBody and Colliders. The object gets stuck in second waypoint without moving forward.

Comment
Add comment · Show 5
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 robertbu · Nov 22, 2014 at 08:08 PM 0
Share

There is no built-in tween or path following functionality in Unity. If you clearly describe your situation and post your code, perhaps someone can help you. For example, maybe you move an empty game object along the path and have the visible game object attached to the empty game object using a Joint of some sort.

avatar image GamerRaj · Nov 23, 2014 at 10:54 AM 0
Share

I'm trying to move a vehicle (jeep) along a road with some twists and turns from a source to destination point. Since terrain is uneven, moving it based on x and z position is not working consistently. Sometimes jeep goes far away from the road.

Then I placed empty gameobjects on the road on every turn and used $$anonymous$$oveTowards function but making a smooth turn is very difficult.

The way it was described in iTween was very easy but when I placed the jeep which has rigidbody and collider it gets stuck in first waypoint itself.

avatar image koray1396 · Nov 23, 2014 at 01:22 PM 0
Share

do not move it on x and z positions, use physics elements ins$$anonymous$$d such as AddForce etc..

avatar image robertbu · Nov 23, 2014 at 03:16 PM 0
Share

$$anonymous$$ixing physics with direct transform moves is always problematic. I'd start with my suggestion above. Use iTween to move an empty game object. Attach the physical object to the empty game object using a Joint.

Another possibility would be to keep the jeep independent and use Rigidbody.$$anonymous$$ovePosition() to attempt to move the jeep to the position of the empty game object.

avatar image GamerRaj · Nov 28, 2014 at 08:38 AM 0
Share

Thanks! will try and let you know the results. By the way, how to mark someone's post as answer if it is. I can't see that option anywhere.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by SenseEater · Nov 28, 2014 at 09:36 AM

I have used iTween in several of my projects i would say its pretty convenient and efficient if used the right way. One way of dealing with rigidbody/collider issues is to disable the attached collider/rigidbody "onstart" of tween and re-enable it when the tween finished. see if that works for you. all the iTween Presets accept "onstart" and "onfinish" methods. You can refere to the iTween docs.

For sure if you try to tween a body under ongoing physics simulation it would cause you trouble.You should watch out for that.

Comment
Add comment · 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

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How to avoid iTween's AddComponent 0 Answers

Tweening a RectTransform between AutoLayouts? 0 Answers

Asynchronously and smoothly move a 2D player character? 2 Answers

Itween working differently on different screen sizes (with text objects) 0 Answers

iTween Native Support OnComplete 0 Answers


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