At 12:20 PM -0400 8/15/05, Joseph Nastasi wrote:
Sorry, the actual number is 1/10th that:
Self.Planet.Bounds = New Bounds3D(New Vector3D,607813)
After executing this, the Radius is correct.
OK, that's certainly a reasonable number.
What happens is the if statement is satisfied when
Self.Model.Position.Y is at 639,114 <-- corrected number
And what's the center of the planet bounds? I'm assuming it's
<0,0,0> but it's worth checking.
Well, how big is your model?
Tiny, in comparison. But here's the odd thing. If I show the
Bounds3D in the debugger, Center(!), Minimum and Maximum are all NIL.
The debugger shows those? I wouldn't expect it to show them at all.
Have you tried logging them (e.g. to System.DebugLog)?
Radius is 20.22 and the Type is correctly set to 2, which _means_
we should be seeing Minimum and Maximum, not Radius (and center in
all cases).
No, it doesn't mean anything of the sort. The properties available
are always available, regardless of how you create the volume. If
it's a spherical volume, then Minimum and Maximum are computed to
enclose the sphere. If it's a box volume, then Center and Radius are
computed to enclose the box. You can create it either way, and
inspect it either way -- that's a feature.
Assume they are okay. The Model is at 0,0,0 with a Radius of 20.22.
Planet.Position is at 0,-637989,0 and has a radius of 607813. Given
this, it doesn't seem like the Intersect should have returned True.
There should be 30156 of space between the two.
I agree. Can you reproduce this in a simple app -- create bounds1,
create bounds2, show that they intersect when they shouldn't?
Best,
- 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>
|