Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 sir_ver · May 28, 2019 at 07:14 AM · dynamicmapwallenemies

Programming dynamic barriers

I have a shooter game where the player is fighting against 3 enemies. When the player kills all three of them, player has to move to an other area. Here is the pic: alt text

So we begin at 1. The colored boxes are the walls or barriers. When the enemies are still acitve you cant trespass through the barrier. Only when they are killed. And when they are killed, the player has to go to 2. After the traspassing the blue barrier should then not be trespassable and the green one also. Then the 3 enemies can spawn in area 2. And so on. Do you guys know how I can implement that kind of dynamic barrier?

walls.jpg (25.0 kB)
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Pangamini · May 28, 2019 at 08:43 AM

OK I will assume here that you are using the navmesh for navigation Well, you can create a NavMeshObstacle with carving enabled. This creates a temporary hole in the NavMesh, while the object is active. The other option is to create a NavMeshLink, which is a kind of 'jump' between two locations on the navmesh. The are won't be smoothli navigable, as a normal navmesh would, but the advantage is that it can be set to one-directional passage, so easier for you to prevent the player from going back and forth

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 sir_ver · May 28, 2019 at 10:35 AM 0
Share

no I'm actually using ml-agent to move the enemies. And the player is moved by me.

avatar image Pangamini sir_ver · May 28, 2019 at 11:47 AM 0
Share

Well if it's moved by you, then the motion is constrained by you (where it can or cannot walk). So you want to write your own collision system to implement the barriers?

avatar image sir_ver Pangamini · Jun 03, 2019 at 07:06 AM 0
Share

I just want to move the walls when I have killed the enemies and when I moved to area 2. When I am in area 2 the blue wall should be closed, and the enemies are spawning.

In details: First round: I am in area 1 with the enemies. Blue and black walls are closed. When I kill the enemies, blue wall should be opened. When I move to area 2, enemies should spawn and blue wall should be closed. And this should be in a loop with 1,2,3,4

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

107 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 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 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 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 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

Assigning UV Map to model at runtime 0 Answers

Dynamic wall movement 0 Answers

Create a Dynamic Wall 2 Answers

Problem with dynamic wall 1 Answer

Problem with dynamic wall 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