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
2
Question by raptorkwok · Feb 04, 2014 at 11:35 AM · character controllingfollow pathcurved path

Character moves along pre-defined path / curve

I'm making a yet-another-endless-run game. I know how to make my character ( which is now a cube with Rigid Body component attached ) moves along axis and changes its moving direction by Arrow keys.

However, moving in straight line is boring. Therefore I would like to add some curves to the road, such as this:

Temple Run screenshot

But how do I make my characters to follow the path? I search in Google, Unity Answers, Unity Asset Store & the forum, and found these:

  • SimplePath

  • WaypointMaster

  • SeekSteer

but seems all of these are pathfinding algorithms. I just want the user moves in a certain curve instead of straight line. Did I miss out other code sample or tutorial ?

temple_run.jpg (88.4 kB)
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
1
Best Answer

Answer by zee_ola05 · Feb 04, 2014 at 12:05 PM

Create a container object. Add your Runner in this container object. Make container object follow your curved path (itween or whatever). You can move Runner horizontally using a script and it will still look like he's running because the container object is following the path.

Does it make sense? Clarify in comments. :)

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 raptorkwok · Feb 05, 2014 at 02:31 AM 0
Share

seems I have to spend some time on iTween. Get back to you if I encounter further problems. Thanks.

avatar image zee_ola05 · Feb 05, 2014 at 04:46 AM 0
Share

Does this solve your problem? If it does, please accept as answer. Thanks! :)

avatar image raptorkwok · Feb 06, 2014 at 03:29 AM 0
Share

Yes, but I have further question on combining iTween with Physics acceleration. Will ask in separate question

avatar image shra12ddha · Sep 08, 2015 at 05:26 AM 0
Share

But then will it run along the path? Will it bend towards the curved or circular track or path?

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

18 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

Related Questions

how to follow curved path? 4 Answers

Camera always 90 degrees to player (curved path) 1 Answer

How can I Make a path for Camera ? 1 Answer

Rigidbody trying to follow a spline with smoothing 1 Answer

2D simple road system with curves and intersections 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