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 risinghell09 · Jul 22, 2013 at 03:29 PM · javascripteffectendlessstairs

How could I create an endless stairs effect?

I am looking to create an endless stairs effect similar to that in Super Mario 64. So the player would go up the stairs, and no matter how far they go, if they turn around they will be at the bottom again. http://www.youtube.com/watch?v=B-udfiFZcko This video will show you what I'm on about, but it's a 10 hour long video... But yeah could someone please tell me how I could create this effect?

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 MadJohny · Jul 22, 2013 at 03:33 PM

Maybe use an invisible wall, and make the stairs move down in the y and z axis, and maybe when it reaches a certain point it goes back up, it would need to be really smooth tho to make it look good

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
1

Answer by Shaolin-Dave · May 16, 2016 at 05:17 PM

Create a prefab for a section of stairs, and a trigger that will be placed a little bit up the stairs. Have the bottom of the stairs in a separate GameObject.

When the player hits the trigger, have it spawn a copy of the stairs prefab just a little beyond the stairs that are currently available, and move the trigger forward the same distance as the stairs length.

At the same time, delete the section of the stairs at the bottom, and move the position of the stairs bottom to that position.

Alternatively you could just have two long sections of stairs and have the bottom one move past the top one, rather than constantly spawn new ones. You could even make two triggers as part of the stair prefabs rather than stand-alone. I suggest against that if the player has the ability to look down the stairs while walking up them backwards.

If they do have the ability to walk up the stairs backwards and view the bottom, I'd make some tweaks to the trigger. Have it create the new section of stairs above the existing all the time, but only delete the lowest section and move the bottom when they're facing forward. This way, they'll think they're making progress as they're walking away from the bottom, but it'll still be infinite and the bottom of the stairs will catch up to them the moment they turn around.

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

17 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

Related Questions

Multiple Cars not working 1 Answer

photocamera flash 1 Answer

Destroy GameObject A or B 1 Answer

Cube terrain with perlin noise 1 Answer

What is wrong with this script? 2 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