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 NishantSood · Mar 11, 2013 at 02:23 PM · runnerendless

Moving the world or the Player??

I am planning to make an endless runner game like temple run. need to know techniques for dynamic world creation. should i move the world back or move the player forward,because of the fact that unity has a limit for the values of position.

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 deltamish · Mar 11, 2013 at 02:46 PM 0
Share

hi what do you mean by unity has limit for poistion and i would recommend moving player which i way simple than moving world and to make object dynamically appear try using Vector3.distance and calculate the distance and only enable the mesh if the player is close enough

1 Reply

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

Answer by Fattie · Mar 11, 2013 at 02:38 PM

there is no one good answer. the simple fact is in real-life projects a mix of both techniques may be necessary.

for example, it's true that you don't want position values to grow too big but -- so what? are you sure you'll ever be anywhere near that limit?

a common approach is "9 champs" where you are on a champ 100m square and there are 8 around you. once the player moves more than say 10% off the middle champ, move everything and recenter so that you are again in the middle of 9 champs.

either eis no one decisive answer, and you have to program completely flexibly so that either of the two techniques you mention work perfectly.

then you can test both for performance in your typical situation.

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 NishantSood · Mar 12, 2013 at 06:39 AM 0
Share

I have tested both the ways,moving the world brings down the fps while moving the player keeps is constant. Should i scale down the world to half of its length

avatar image Fattie · Mar 12, 2013 at 06:51 AM 0
Share

a common approach is "9 champs" where you are on a champ 100m square and there are 8 around you. once the player moves more than say 10% off the middle champ, move everything and recenter so that you are again in the middle of 9 champs.

avatar image NishantSood · Mar 12, 2013 at 07:10 AM 0
Share

I got your point,but the problem in repositioning the world and the player after a certain distance creates a lag,which is easily visible.

avatar image Fattie · Mar 12, 2013 at 07:22 AM 1
Share

There is no one specific answer.

It's like asking "How do I make a hit game?"

This is why dozens of engineers work for years to make major game titles.

I've worked on many titles that do precisely what is described, with no lag or jitter.

right now I'm doing one where you fly over a city that moves incredibly fast underneath the aircraft. No lag.

Is there a problem with your "world" is it made up of too many small objects perhaps?

the question is just so very general it is hard to help.

$$anonymous$$gest you post a new simple question "I have this .. screenshot .. and when I move it there is lag"

explain what sort of and how many objects you have etc.

you are looking for "one answer" which does not exist

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

13 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

Related Questions

Move camera or terrain in endless runner? 1 Answer

Endless runner ground movement 0 Answers

How to create a "save me" feature like subway surfers .temple run, etc ? 0 Answers

Endless Runner with List 1 Answer

Making a 3d endless runner? 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