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 Jan 08, 2014 at 07:39 PM by IgorAherne for the following reason:

Here is the solution http://wiki.unity3d.com/index.php?title=PolyContainsPoint

avatar image
0
Question by IgorAherne · Jan 08, 2014 at 07:18 PM · meshruntimevolumedetect

Am I inside a volume? (Without ray cast and default colliders?)

alt textHello once again!

Here is an improved version of a question explained here

Interesting, can one tell if a point in space is inside a given mesh without any kind of colliders? It get's harder once it's not a cube, but for example a pyramid, especially if we are using the x-y-z coordinate-bound approach, comparing all 3 coordinate components of vertexes against ours. Can I use c# to actually see that my position is inside a specified volume using some function?

I cannot use ray cast since I need to do this at the same time about 200 times every frame from 200 different points on the map. :<

I was thinking if I ray cast every 10 degrees (In a sphere-pattern), so I get 36 ray casts (All done in editor before the game starts). I then detect points of intersection, plant a vertex there, and come out with a mesh. Standing inside of this object I know that I will be able to see towards that emission point.

But I need to find out if I am in between those vertexes during gameplay. Raycast is very heavy on resources.

thanks for helping!

P.S.

I was thinking, maybe it's possible to create such mesh using a lighting/shadow approach? In it I somehow would detect if a surface is lit by light and would plant a vertex of my mesh where the light hits the surface, simply by looking at change of light - Sounds a little crazy, but that's what I am essentially trying to achieve with pre-bake using ray casts.

check.png (80.6 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

0 Replies

  • Sort: 

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

Find all triangles inside given bounds 1 Answer

Save to Prefab or Mesh? 0 Answers

Dynamic conversion of any uploaded mesh to assetbundle? 0 Answers

Vertex snapping of any mesh at runtime 2 Answers

change the mesh of object during runtime using javascript 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