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 /
This question was closed Jul 23, 2012 at 03:46 PM by lyzard for the following reason:

Other, solved by OnTriggerEnter

avatar image
0
Question by lyzard · May 29, 2012 at 07:32 PM · collisionontriggerenterpathfinding

Grid pathfinder and collision detection with OnTriggerEnter

Hi, I've made a grid pathfinder and need to correctly setup whether a cell is blocked or not by a collider.

Bounding boxes are not accurate enough for my purpose since I have some meshes with "holes" that must not block all the cells they are on.

Raycasting seems not to be a good solution either because by design they return false if casting from inside a collider (hence failing to detect cells that are fully inside a collider).

OnTriggerEnter seems to be my best chance, for instance by creating mini-colliders for each of my cells, but because of huge grids (~20,000 cells) I need to find some performance workaround. For instance, I could create mini-colliders for few seconds to detect static meshes, then handle dynamic objects differently. So my question is how to have more control on OnTriggerEnter ? What's the optimal amount of time I should wait for OnTriggerEnter to be called (or not) to declare a "static" cell free ? Only one FixedUpdate frame or more ? Any insight on my issue (or maybe another solution) would be highly appreciated :)

Edit: Ok I've actually tested and it seems I can declare free a cell when entering the second FixedUpdate frame if OnTriggerEnter was not called before. I'll assume this hypothesis is correct and will build my system around it, hoping it is consistent.

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

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Can Someone help me with this script? 1 Answer

Why would OnTriggerEnter get called, but not OnTriggerExit? 0 Answers

Shooting myself 0 Answers

Unwanted occurence of collision event 1 Answer

onTriggerEnter dosent work 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