Feature Creep / Accurate Distance Checks

Author
Message
tomjscott
User Banned
Posted: 15th Jun 2014 16:45
We need a method to accurately check the distance between objects. Currently, we are all using the simple distance check function provided in script, which takes the origin point and calculates the distance to the origin point of another object. However, if you have an object larger than the distance check then the distance check fails even if you are touching the object. A more accurate distance check needs to be able to utilize the bounding box extents of the entity so that if you are within that distance from any of the extents then the check still succeeds.

Take a large wall that is 1000 wide and 50 deep. If you want something to trigger when the player is within 100 of the wall then you only get a hit if the player is within 100 of the center point. To hack it, you need to make the distance check something like 600. Then it unfortunately triggers when the player is really far away if approaching toward the center. It just doesn't work very well right now.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.007
mfgcasa
10
Years of Service
User Offline
Joined: 16th Dec 2013
Location:
Posted: 17th Jun 2014 00:26
hmm I thought the distance used the collision of the object(which would probably solve this issue), if not then that's a way they could improve the distance in the future. Right now I would rather they focused on something else as this, while nice, can be gotten around by making meshes square.(Not ideal but not game breaking either)

RAM 8 GB

i7-4770k CPU 3.50 GHz

NVIDIA GeForce GTX 550 Ti
PM
tomjscott
User Banned
Posted: 17th Jun 2014 00:30
In my experience they are not using the collision of the object or it would work correctly. Making meshes square doesn't solve the issue. If you have a cube that's 200x200 and you want to check distance to object being less than 100 then you could never get a trigger because it would currently require you to be 100 units inside the cube to get a hit.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.007

Login to post a reply

Server time is: 2024-11-23 10:11:27
Your offset time is: 2024-11-23 10:11:27