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 komodor · Jan 26, 2015 at 05:02 PM · collider2dgeometry

[noone knows] substitution for EdgeCollider2D.OverlapPoint ?

anybody knows how to work this around? as the EdgeCollider2D is line and not polygon, there's no native method to get if certain point is inside or outside, does anybody have idea how to find out? (of course first point == last point)

edit: i actually believe it's not possible without few raycasts - my first thought is to raycast in 4 directions and count number of intersections and if the count is even, then it's outside and if odd then inside, however i am looking for some "system" solution i'm maybe missing

be so kind and don't delete the [noone knows] tag because i believe it's more ethical to attract pro's eyes on another then landing page instead of popping up the question and make other questions move downwards (as you can see in my profile i don't use this tag on every stupid question i have ever had

Comment
Add comment · Show 4
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 zeppike · May 06, 2015 at 10:16 AM 0
Share

I am just curious why are you using Edge ins$$anonymous$$d of poli?

avatar image komodor · May 06, 2015 at 10:45 AM 0
Share

because polygoncollider2d doesn't accept all vertices i give it because it's too close (http://answers.unity3d.com/questions/871904/collider-vertices-too-close.html)

avatar image fafase · May 06, 2015 at 10:52 AM 0
Share

http://stackoverflow.com/questions/1560492/how-to-tell-whether-a-point-is-to-the-right-or-left-side-of-a-line

avatar image komodor · May 06, 2015 at 12:35 PM 0
Share

thank you fafase i know about it already, i am just looking for some solution based on physics, as i need to do it on few objects every frame, this one would be great on simple objects, i was using it in flash long time ago

it looks like there's no simple solution so i will stick with the one i am using now i guess, let's see if somebody finds better one

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

18 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

Related Questions

Jittery movement when colliding with a wall 2D. 0 Answers

OnTrigger events not working 1 Answer

Player sprite sinks into colliders 1 Answer

All of my doors are opening at the same time. Why? 0 Answers

Make the bullet in a 2d Top Down shooter get destroyed after passing mouse position 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