Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Scene->AdvancedCollision Still Broken along triangle seams.  (Read 502 times)
sybixsus
Customers
Community Member
*****
Posts: 1094


WWW
« on: June 07, 2008, 03:57:31 PM »

I reported this about a year ago and coded some workarounds because it was taking a while to get a fix, and just assumed that somewhere along the line it had been fixed, but it hasn't been fixed. It's quite simple. If you linepick a mesh where two triangles join - even if the triangles are welded - there is a chance the linepick will miss. It's pretty hit and miss, sometimes it works, sometimes it doesn't so I'm guessing you've got some floating point errors in your linepicking code.

I've uploaded a mesh which exhibits the problem. It's a very simple mesh, two triangles, welded together to make a square. It is 10 units by 10 units and is on the XZ plane. The diagonal runs from -5,0,-5 to 5,0,5. I can reproduce the errors by linepicking right along the diagonal. So if you get a loop running from -4.5,-4.5 to 4.5,4.5 in small increments and linepick directly downward, soon enough you'll hit the seams and linepick straight between the two triangles.

http://www.glimmergames.com/temp/TwoTris.rar

« Last Edit: June 07, 2008, 04:16:30 PM by sybixsus » Logged
fai
Customers
Community Member
*****
Posts: 75


« Reply #1 on: June 09, 2008, 10:24:03 PM »

yes, the advancecollision() is the big trouble for me,
I workarounds it, as I have no choice.

I reported this about a year ago and coded some workarounds because it was taking a while to get a fix, and just assumed that somewhere along the line it had been fixed, but it hasn't been fixed. It's quite simple. If you linepick a mesh where two triangles join - even if the triangles are welded - there is a chance the linepick will miss. It's pretty hit and miss, sometimes it works, sometimes it doesn't so I'm guessing you've got some floating point errors in your linepicking code.

I've uploaded a mesh which exhibits the problem. It's a very simple mesh, two triangles, welded together to make a square. It is 10 units by 10 units and is on the XZ plane. The diagonal runs from -5,0,-5 to 5,0,5. I can reproduce the errors by linepicking right along the diagonal. So if you get a loop running from -4.5,-4.5 to 4.5,4.5 in small increments and linepick directly downward, soon enough you'll hit the seams and linepick straight between the two triangles.

http://www.glimmergames.com/temp/TwoTris.rar



Logged
sybixsus
Customers
Community Member
*****
Posts: 1094


WWW
« Reply #2 on: June 14, 2008, 11:29:16 PM »

I spent two solid days of work coding a workaround which is good enough most of the time, but these misses are just too unpredictable to workaround with any degree of reliability. Unfortunately, linepicks are absolutely critical to my game, I use them for everything, so it's a big problem for me.
« Last Edit: June 14, 2008, 11:44:48 PM by sybixsus » Logged
SylvainTV
Administrator
Community Member
*****
Posts: 4479


WWW
« Reply #3 on: June 24, 2008, 12:28:23 PM »

Fixed, I made the ray always an unit ray, and sybixsus said it worked Smiley
Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
sybixsus
Customers
Community Member
*****
Posts: 1094


WWW
« Reply #4 on: June 24, 2008, 01:42:59 PM »

Yep, seems to be working fine now. Thanks very much.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks