So my rule (3.4*distance*machine epsilon for single/double precision) gives a value of 4cm worst-case accuracy for single precision between two points/vertices at 99,999.99 distance. In other words, most of the time you will get 1cm or so accuracy, but occasionally it will be 4cm. On top of that, there is the magnification of spatial resolution base error due mainly to multiplications (if you multiply a number by 10, the error is multiplied by 10). Although I use this rule, magnification tends to overwhelm it and it hard to predict when you only write some of the code: unity may contribute more than your code.įor example, I find the Unity reparenting operation generates noticeable error in the transform value. By observing this error at a distance of > 10^11 (near an average Mars orbit), the reparenting magnification + whatever is done in my scripts, is around 45 times what my rule predicts. I've just been facing a few practical problems right now that have only barely been adressed here: How do I get serious collision physics to work with a continous floating origin (CFO) setup? I'm sorry for Necroing this, I saw this thread and found it very helpful for programming my space game. There've been code suggestions for raycast collision detections and that works well enough for frontal collisions. #EAZYDRAW INDEPENDENT SCALE NOT AVAILABLE CODE# #EAZYDRAW INDEPENDENT SCALE NOT AVAILABLE CODE#īut what about hits that aren't directly frontal, but where my spaceships collides with something at the sides?ĭo you know if there's some elegant solution to detect such hits? I've bee trying to use the detect collision function from rigidbodies and it sort of works, but there's a major problem.
0 Comments
Leave a Reply. |