Game Development Community

ContainerSearchCurrRadiusDist not working

by Mike Morgan · in Torque Game Engine · 07/22/2006 (3:34 am) · 2 replies

I assume that the reason this function isnt working (it returns the same values as ContainerSearchCurrDist) is because the objects I am using it on do not have collision boxes set up. However, I cannot put on the collision boxes as I want the player to pass through. I am only dealing with cube shaped objects here so perhaps a processer intensive hack might work. I haven't had much experience with Torque and it seems that there should be a simple solution. Any ideas for how I might get this closest point function to work while keeping the objects as they are?

Also, ContainerSearchCurrRadiusDist does produce the closest point on the object, right? Not just the first point on a line from the source to the center of the target.


Thanks

#1
07/22/2006 (8:01 am)
Yeah that function works on the bounding box of the objects. I once had a problem where radiusDamage (in radiusDamage.cs) was trying to apply a negative damage amount. Figured out it was because the visual bounds of the object were within the radius, but the bounding box was not within the radius (had a tank vehicle, but the canon didn't have a bounding box surrounding it). You are correct on why it doesn't work, but I can't really help on how to get it to work; just thought I'd add that little tidbit.
#2
07/24/2006 (1:59 pm)
Thanks Juan, does anyone have any ideas for a solution?