The quarter circle on the picture consists of 90 small ellipses that should create a full circle. However, once one of the values is a negative number, it doesn't even create the ellipse anymore. The values are calculated correctly (the vector on the top of the picture), and if I manually enter the values the vizzy calculated, it also works.

The values are calculated using the pythagorean theorem. I set a variable (xPosition) to round(sin(deg2rad(90 - direction)) * (dist / (range / 200))) and another variable (yPosition) to round(sin(deg2rad(direction)) * (dist / (range / 200))). Direction is the direction (in degrees) the line points to, dist is currently set to 450, range is currently set to 1000. Then, I set a third variable to vec(xPosition, yPosition, 0). This variable is the position on the MFD.

Example: Direction - 100

xPosition:
round(sin(deg2rad(90 - 100)) * (450 / (1000 / 200))
= round(-0.17 * (450 / 5))
= round(-0.17 * 90)
= round(-15.3)
= -15

yPosition:
round(sin(deg2rad(100)) * (450 / (1000 / 200))
= round(0.98 * (450 / 5))
= round(0.98 * 90)
= round(88.2)
= 88

Position:
vec(-15, 88, 0)

Bug Rejected Found in 1.2.107.0
Sandbox View

1 Comment

  • Log in to leave a comment
  • Profile image

    New test results:
    The negative numbers were just a coincidence, I reached the limit of objects (which seems to be 95, strange value) exactly, when one of the calculated numbers became negative.
    New theory:
    The game has a really strange limit of objects on MfDs (95), which resulted in the MfD not creating the ellipses anymore in the same frame the first number becomes negative. That would be a strange coincidence, but it's the only way I could explain the results of some new experiments. So, two questions: 1. Is this theory correct? and 2. Is there a way to change / delete that limit (without xml editing, Android blocked it)?

    Pinned 2 months ago

No Upvotes

Log in in to upvote this post.