realbasic-games
[Top] [All Lists]

Re: Bug? LineSegmentIntersection

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Bug? LineSegmentIntersection
From: Lo Saeteurn <realbasic at miensoftware dot com>
Date: Fri, 23 Sep 2005 08:38:40 -0700
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <A62133C5-26E7-4F77-85C7-3CBD6D5AC3CA at miensoftware dot com> <a06200716bf573a7915d2 at [10 dot 0 dot 1 dot 4]> <cf5e37425c407f3b08607da02bda38f7 at mindspring dot com> <a06200721bf58b68623e4 at [10 dot 0 dot 1 dot 4]>
With my simple project, the opposite is true; Instead of the bounds acting bigger, they acted smaller allowing the line to pass through it. Maybe because the bounds are negative so it has a negative affect?

Maybe you can see this with the snippet you have by shifting every thing to the negative plane.

Here is a bounding box that should show this:
Dim b As New Bounds3D(new Vector3D(-55.961830,-3.940000,-10.286526), new vector3d(-53.038170,-1.640000,-9.413475))

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.

_______________________________________________
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>

<Prev in Thread] Current Thread [Next in Thread>