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 Melissa_Goddard · Mar 29, 2012 at 07:33 PM · colliderslevel

Area Unlocking

Hi All!

I am fairly new to the Unity 3D scene and I am currently attempting to limit the areas in which the player is allowed to go. This is so that when the player completes a mini-challenge, a new area of the map is available for them to go to. It is all part of the same terrain. Basically, I want the player to search the available terrain for an object, when they find it, lots of enemies will be spawned and will target the player. The next objective for the player is to reach the safe-zone to complete the level.

I am familiar with Application.LoadLevel("string") however, I do not want it to load another scene altogether, I just want it to be like some box colliders have been removed so the player can then walk where they once were.

What is the best technique in your opinion to achieve this?

Any help would be much appreciated.

Kind Regards

Melissa

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

Answer by Kag359six · Mar 29, 2012 at 08:28 PM

well, in terms of performance you might want to either make it a seperate scene, or use occlusion culling. But if you really want it to be in the same scene, you can simply remove the collider through scripting by using Destroy(object.GetComponent(BoxCollider)). Im not sure if that syntax is right with the box collider part, but its something like that.

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 Melissa_Goddard · Mar 29, 2012 at 08:38 PM

Thanks very much for the replies guys!

So if I'm right in what you're saying is to create an empty game object and assign a box collider to it or a piece of terrain perhaps with a gate, and when the object has been picked up, it is possible to access the Box collider and destroy it during game-play? If so that is excellent.

So for performance it is better to create lots of small scenes rather than larger scenes?

Kind Regards

Melissa

Comment
Add comment · Show 2 · 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 DaveA · Mar 30, 2012 at 12:31 AM 0
Share

Please use the 'add new comment' button to comment on other answers. Use 'Answer' only if you are really answering your own question.

avatar image DaveA · Mar 30, 2012 at 12:33 AM 0
Share

Yes you can access the box collider and destroy it but you might want to just disable it: http://unity3d.com/support/documentation/ScriptReference/Collider-enabled.html

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

physics.OverlapSphere colliders 1 Answer

Colliders, triggers and modelling a level 0 Answers

Level Creation, Prefabs and Colliders 2 Answers

Implementing Level ID 0 Answers

Draw 2d level with tile set and export to png? 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