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
1
Question by lvlup · Jan 30, 2011 at 10:35 AM · gridtileinfiniteground

how do i create a "randomized infinite grid"? details here..

im new to anything scripting, so i need "extra explanations" to what your answers and solutions are! help me learn so i can apply and grow as an artist too =)!

i am trying to create an infinite "grid" if you may..i already roughly know how "it should work" but, i have not much idea how to actually write it.

i have 3 tiles...modeled in Maya, so they're assets now..named as such in unity and tagged as Tile.

-floorLF -floorMd -floorRT

i want to lay them out, in rows, in those 3 columns (left, mid, right)...in the Z axis.

now how can i make Unity "instantiate", i think thats the technique used here, these 3 tiles over and over, like below:

[x][x][x]
[x][x][x]
[x][x][x]
[x][x][x]
[x][x][x]
[x][x][x]

and i want this to never end basically..when it scrolls in the Z axis and "reaches the end", another set of the 3 tiles will be "Spawned" to create this infinity. i think somewhat like a 3column x 20rows would be great for what im trying to achieve...so "row21" wouldnt be there but when we scroll/travel/reach row15 or something near the "end", the new row21 would be craeted..and row1 would be "invisible/removed".

if there's any direct tutorials that can show me how to do this, that willbe great too. the unifywiki has nothing, answers.unity has nothing useful for my level of knowledge either..the 3dLerpztutorial and 2dtutorial didn't really help me find what i need either..and itween doesnt help me much either..key is i wanna learn and understand the code that will be written for this.

so thnks to anyone that can help me build, and teach me, what i need to do, showing me now is great, but i want explanation so i can further apply it to other tasks ahead, thanksthanksthanksthankss!!

i'm writing in C#. no js please!! well js is fine i guess, but then i'll need someone to help me change it to C# since my other scripts i wrote already in C#.

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 lvlup · Jan 30, 2011 at 11:28 AM 0
Share

i found some suggestions relating to setting up Application.LoadLevel or something like that, as well as creating a "treadmill" solution, but nothing that really helps me see how its done, Unity Scripting Reference doesn't really help me understand much either for my level of knowledge and experience with code.

2 Replies

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

Answer by Peter G · Jan 30, 2011 at 03:44 PM

I believe that the Locamotion demo has a scene that does something similar to what you want. The character can walk in either direction and when he/she gets to a certain point, it deletes the last tiles and spawns new ones.

http://unity3d.com/support/resources/unity-extensions/locomotion-ik

Comment
Add comment · Show 3 · 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 lvlup · Jan 31, 2011 at 02:37 PM 0
Share

this resource was excellent. i wouldn't have expected to find this system inside a "locomotion" demo..i saw it a long time ago while searching for tutorials on my own, but completely ignored this package because i assumed it dealt with only character locomotion/animation which wasnt in any way relatd to my problem!!

thanks for pointing this out Peter!

now to break down his script and see what i need and can do with it for my own purpose..

avatar image lvlup · Jan 31, 2011 at 02:39 PM 0
Share

(and is there anyway i can pm you or chat with u privately? lol)

avatar image Peter G · Jan 31, 2011 at 11:37 PM 0
Share

I'm on the forums as the same name pm me there if you can, or email me. I'll post that if the first way doesn't work.

avatar image
1

Answer by Jesse Anders · Jan 30, 2011 at 03:19 PM

the unifywiki has nothing, answers.unity has nothing useful for my level of knowledge either..the 3dLerpztutorial and 2dtutorial didn't really help me find what i need either

This isn't the sort of thing you're likely to find covered on the Wiki or in a tutorial.

Although your question is fairly clear, IMO, there's not enough information there for us to make specific suggestions. The problem is that there are many ways what you describe could be done, and which method to choose depends on gameplay mechanics and other parameters.

That said, a simple solution would be to make the array 'tall' enough that there will always be tiles visible, and then continuously move (in a loop) the tiles down or the camera up. If you set it up right, this should give the effect of continuous scrolling.

Again though, depending on the game mechanics, another solution may be needed.

Comment
Add comment · Show 1 · 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 lvlup · Jan 31, 2011 at 02:41 PM 0
Share

i know that there's many ways to achieve what i described above, it's just i have no idea what to even try yet, not sure where to begin, i don't even know how to write an array, even though i already knew it would be some sort of an array/matrix... =\

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

No one has followed this question yet.

Related Questions

How to check whether gameObject is on even ground? 1 Answer

How to apply more than one trigger on a single gamebject 1 Answer

2D Tile Map Question 0 Answers

Grid Movement VS Free Movement 1 Answer

Correct use of setTile to add tile to Tilemap 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