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 DoctorSauce · Jul 15, 2014 at 07:28 PM · randomgenerationdungeon

Rooms being spawned in the wrong places? (Random Generation)

Okay, it's kind of hard to explain what my problem is, but I'll give it a go. I know how much it sucks to read through a question that makes no sense.

So, first of all, I am using the asset DunGen for my game: (In case you're curious: https://www.assetstore.unity3d.com/en/#!/content/15682)

To make it work, you build rooms with doorways in them (the doorways are not prefabs, they are just objects with a script attached to them contained in the prefab, making me think the problem is not nested prefabs). You then make these rooms into prefabs, and DunGen pieces the different room prefabs together, connecting them through the doorways. If you're still curious, you can see how it works in the documentation here: http://www.aegongames.com/blog/wp-content/uploads/DunGen_Readme.pdf

So here's my problem: When I build a room and make a prefab out of it, then I add that room to the dungeon maker, it works just fine! It build a dungeon just fine with that room. But if I make any sort of change to that room and then push "Apply" to the prefab, suddenly DunGen starts screwing up the placement of the rooms, badly. I don't even have to make a change to the prefab, it just happens if I push the "Apply" button. I'll show you the difference:

This is a dungeon built out of one room:

alt text

This is a dungeon built out of the same room, no changes made to it, all I did was place the prefab in the scene, push the "Apply" button, then delete it from the scene again:

alt text

It suddenly gets the placement completely wrong. Though according to the placement of the doors, the rooms still seem to think they are connected to each other. Even though obviously, they aren't.

I am baffled as to what could be causing this problem, and hopefully this question makes enough sense. If anybody could offer help to figuring out what is causing this, I would be very grateful. Thank you in advance for any help you guys offer!

dungeon after apply button.png (75.7 kB)
dungeon before apply button.png (75.8 kB)
Comment
Add comment · Show 2
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 Loius · Jul 15, 2014 at 08:21 PM 2
Share

It looks like your generator is using the instantiated object's position information (which should generally be regarded as bad data), so when you apply it uses the new world position and gets offset weird.

avatar image DoctorSauce · Jul 15, 2014 at 08:27 PM 0
Share

I... love... your... face... You just solved my problem that I've been struggling with for 2 days! You were completely right! All I had to do was move the room to position 0, 0, 0, then click apply again! (Where previously, I had it at a totally random position when clicking the apply button). Thank you so much. If you could convert your comment to an answer, I'd be glad to accept it.

0 Replies

· Add your reply
  • Sort: 

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

23 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 avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Procedural Random Walk Dungeon Generator? 2 Answers

Random Button / Plane Generation. 0 Answers

How to generate random terrain for a platformer 0 Answers

Starting a roguelike, maze generator problem. 1 Answer

Random number different from previous generated. 6 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