At 12:05 PM -0700 9/22/05, Jeff Quan wrote:
Instead of simplifying existing code, I decided to write an app
from scratch in RB2005r3 to view the problem. Apologies for cutting
non-2005 users out, as I wanted to use the trimesh functions to
create a visual line. Here's a link to my code:
<http://www.geocities.com/jeffq_cnet/BoundsTest.zip>
You can move the line by passing your mouse over the RB3D space.
Things get really wonky if you click the "Animate line" checkbox. In
this case, I really hope I'm doing something wrong!
That's a neat app. It worked fine for me until I clicked Animate
Line, which moves the other end of the line segment (the one that
doesn't track the mouse). For me, when this end is higher than about
Y=20 or so, then it starts acting as though the bounds radius is
larger that it should be. The higher this end of the line, the more
the collision radius grows.
Here's the code snippet I've been looking for:
Dim v0 As New Vector3D(-200, 28, 0)
Dim v1 As New Vector3D( -70, 28, 0)
Dim b As New Bounds3D( New Vector3D, 50)
Dim result As Vector3D
result = b.LineSegmentIntersection( v0, v1 )
if result <> nil then
MsgBox "WRONG! Found collision at " _
+ str(result.x) + "," + str(result.y) + "," + str(result.z) _
+ ", a distance of " + str(result.Length)
end if
...which clearly demonstrates that it's finding a collision that is
well outside the bounds radius. We'll look into this.
Thanks,
- Joe
--
Joe Strout REAL Software, Inc.
Vote for REALbasic (twice!) in the LinuxWorld Reader's Choice Awards:
http://linux.sys-con.com/general/readerschoice.htm
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|