Jump to content
  • Advertisement

Rasly Walker

  • Content Count

  • Joined

  • Last visited

Community Reputation

121 Neutral

About Rasly Walker

  • Rank
  1. Rasly Walker

    Line vs Triangle collision in 3D

    It were 5 days for the whole Test, not just for this function and i did set the time limit myself when i started it. Basically i was trying to write a small simulation in unity3d. Funny is that i found out later that unity3d framework already contains this function, not just for Ray's but for Line's as well ^^   Thanks for that, i like when tutorials have some simply graphic's, i think i understand it better now.  
  2. Rasly Walker

    Line vs Triangle collision in 3D

    After searching some more i found this function, but for it dosn't seem to work, maybe anyone who is better in math can tell what is wrong with it? bool TestSegmTri(Vector3 rs,Vector3 re,Vector3 v1,Vector3 v2,Vector3 v3) { if(Mathf.Sign(v3.z*(re.x*v1.y-v1.x*re.y)+v3.y*(v1.z*re.x-re.z*v1.x)+v3.x*(v1.y*re.z-re.y*v1.z))<=0) return false; if(Mathf.Sign(v2.z*(re.x*v1.y-v1.x*re.y)+v2.y*(v1.z*re.x-re.z*v1.x)+v2.x*(v1.y*re.z-re.y*v1.z))<=0) return false; if(Mathf.Sign(v3.z*(re.x*v2.y-v2.x*re.y)+v3.y*(v2.z*re.x-re.z*v2.x)+v3.x*(v2.y*re.z-re.y*v2.z))<=0) return false; return true; } Source: http://hugi.scene.org/online/hugi25/hugi%2025%20-%20coding%20corner%20graphics,%20sound%20&%20synchronization%20ken%20ray-triangle%20intersection%20tests%20for%20dummies.htm
  3. Rasly Walker

    Line vs Triangle collision in 3D

    Yes i had that in school and i even have done line vs triangles collusions long time ago, but i have successfully forgot all of it and now doing something very different. I guess i was hopping to get a done function that i could just copy paste, this may sound kind of selfish but i don't realy have any choice here, got like two days to finish this program, therefor no time to do it right.
  4. Rasly Walker

    Line vs Triangle collision in 3D

    Right now it is like when you are a fisherman and you meet a starwing painter and he asks you for food and you are like: "Listen here dude, i wont give you any fish but ill teach you how to fish.". In short, im working on something totaly out of my league and i need some quick fix for it, i can't afford to learn to understand how it works.   That "line and the plane" part looks way to complicated for me.
  5. Hi all, there is something i realy need right now, i searched on google but found nothing usefull, so i hope you can help me.   I need to find out if a line in 3D is inside of a Triangle or not, preferable in c#, but in other language would be fine too. And i don't need theory, don't have time for that i need a complete solution. Thanks in advance.  
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!