• 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 Jzmallz · Aug 07, 2014 at 04:13 AM · movementterrain3dcharacterinfinite runner

Infinite Runner Movement

I am having a hard time trying to decipher in the infinite runner games that are currently out does the player move or does the character move? Mine is going to be in 3D if that helps at all. However, I was wondering what the best practice is to creating a smooth infinite runner, should I move the character or the terrain itself. At first I thought the character, however that would mean the camera would have to follow the character and could resort into some jerky camera movement. Also the problem with moving the character would be, if it is infinite, floating point numbers tend to get skewed at larger values. I am just wondering what is the best practice to accomplish t$$anonymous$$s task. By the way I have an idea about how to go about and complete the game, but I am just trying to figure out what to actually move.

Thanks.

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

2 Replies

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

Answer by rutter · Aug 07, 2014 at 04:13 AM

There's a saying in programming: "Do the simplest t$$anonymous$$ng that could possibly work."

Moving your character is easier than moving everyt$$anonymous$$ng in the scene. A lot faster, too, plus it'll work better with the physics engine.

It's true that floating point error is a concern. But how fast is your character running? 15 units per second? Assuming you're movig in a perfectly straight line, that gives you about two hours before getting 100,000 units away from the origin. If you start at -100,000 units, that's four hours of running in a straight line.

There may be some problems to solve with engineering, but t$$anonymous$$s is probably low on the list.

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 subho0406 · Dec 23, 2014 at 08:56 AM

Another method that could be employed is that changing the coordinates of player along with the world to 0,0,0 whenever player is above a particular coordinate limit say 9000unit. The world and player is moved together provided you use a unity skybox there will be no relative motion observed and the coordinates will become 0,0,0 after every 9000m

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 move a character in unity? 2 Answers

How do I make the water move/appear more smoothly? 0 Answers

How do I stop my character from sliding after adding force? 0 Answers

Movement Script help. Script won't make my 3D object move,Why wont this movement script work. 0 Answers

How to divide my terrain into selectable squares? 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