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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by miningold · Aug 21, 2012 at 10:44 PM · itweenfollowpathspline

Follow curved path with dynamic speed

I am looking for a plugin/library/tutorial that would let me have an object follow a curving path and change the speed of the object through scripting.

I have looking into iTween but it does not look like it allows specific speed settings it only eases.

Does anyone know of something that would help?

Comment
Add comment · Show 1
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 Fattie · Aug 22, 2012 at 06:48 AM 0
Share

glance at the Asset Store, there seem to be a number of such packages there

2 Replies

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

Answer by miningold · Aug 23, 2012 at 10:37 PM

I found my answer here

 float Velocity = 1f;
 float PathOnePercent = Vector3.Distance(iTween.PointOnPath(path, percentage) , iTween.PointOnPath(path, percentage + 0.1f));
 float RealOnePercent = iTween.PathLength(path) * 0.1f;
 float Distortion = RealOnePercent / PathOnePercent;
 float RealPercentToMove = (Velocity * Time.deltaTime) / iTween.PathLength(path);
 percentage = (RealPercentToMove * Distortion) + percentage;
 iTween.PutOnPath(gameObject, path, NewPercentPosition);

All you have to do is change velocity over time, it works great.

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
avatar image
0

Answer by ScroodgeM · Aug 21, 2012 at 10:46 PM

http://answers.unity3d.com/questions/298608/recommendations-for-a-scriptplugin-for-creating-se.html

Comment
Add comment · Show 2 · 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 miningold · Aug 21, 2012 at 11:11 PM 0
Share

Sorry, forgot to mention, the curve needs to curve in 3D space not just 2D.

avatar image ScroodgeM · Aug 23, 2012 at 10:15 PM 0
Share

answer there is for one axis of path coordinate. so, for 2D you need to apply it twice, for 3D - triple.

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

9 People are following this question.

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

Related Questions

object follow a spline path 1 Answer

PutOnPath iTween spline but not restrict in the up direction (jump) 3 Answers

How do Move a gameobject along a path WITHOUT A SPLINE 1 Answer

iTween Path Rotation 0 Answers

Dog chasing my player on curved path? 2 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