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 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 this 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 thing that could possibly work."

Moving your character is easier than moving everything 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 this 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.

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

Character keeps jumping on uneven terrain 0 Answers

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

Kinect issue with Character Movement while in flight 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