Skip to content

Conversation

@Timi007
Copy link
Contributor

@Timi007 Timi007 commented Mar 6, 2025

When merged this pull request will:

  • Add 3D and map plotting tools

This feature is meant to help the user measure distances and directions. The start and end positions can be either static or attached to an object, where the values are then updated dynamically. The user can toggle between different distance, speed, and azimuth formats. More formatters can be defined in class zen_plotting_formatters. The color can be changed in the CBA settings. Plotting is possible in 3D or on the map.

arma_plotting.mp4

TODO

  • Fix line connections of rectangular cuboid
  • Fix attaching plot to objects
  • Optimize drawing (do not draw if outside screen) The overhead of checking if the positions are in view is too high ~2x perf decrease
  • Add icons
  • Handle text rendering when attaching multiple plots to objects Limited to one end point for a unit at a time
  • Fix key handlers not always register input
  • Add the time it takes to travel the distance depending on a speed

@Timi007 Timi007 changed the title Add plotting tools Add 3D and map plotting tools Mar 6, 2025
@mharis001 mharis001 added the feature Adds a new feature label Mar 6, 2025
@mharis001 mharis001 added this to the 1.16.0 milestone Mar 6, 2025
Copy link
Member

@mharis001 mharis001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting functionality. Just some initial thoughts.

};
},
{},
[DIK_R, [false, false, false]] // Default: R
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These keybinds conflict with the same base game Zeus controls. I think a default behind some modifiers since this doesn't need to be so accessible would be good.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these better?

  • Ctrl+R: Switch Distance
  • Shift+R: Switch Speed
  • Ctrl+T: Switch Azimuth

@Timi007
Copy link
Contributor Author

Timi007 commented Mar 13, 2025

Thanks for the initial feedback! Can you maybe provide feedback on following question too?

  1. Currently, the max distance the lines and icons are rendered is hardcoded to 3km. Should this be a setting or maybe linked to the view distance?
  2. What measurements units should be present? As a user of the metric system, do we need feet, yards, and miles?
  3. For the line plot, I also want to add the time it takes to travel the distance depending on a speed. Should this speed be also a toggle like distance and azimuth formats? Or a setting? Or toggle + setting?
  4. When attaching a plot point to an object, the formatted texts overlap. In 3D, we can solve this using the text Y offset. On the map there is no parameter. Should only the text of the last plot be shown? Or do we just restrict attaching one plot to one object?

@mharis001
Copy link
Member

  1. I think just a reasonable max value is fine. For example, the visibility component uses a max of 5 km.
  2. You could combine it to "systems" instead of "units". So, metric: meters -> kilometers depending on distance, and imperial: feet -> yards -> miles. Not sure.
  3. Probably just a toggle.
  4. Even with multiple plots with offset text, it would be difficult to tell which one belongs to which plot. Again, not sure what the best UX here is.

Comment on lines 35 to 36
private _azimuthToStart = _endPos getDir _startPos;
private _azimuthToEnd = _startPos getDir _endPos;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be the relative direction?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the direction from start to end pos and end to start. Both _startPos and _endPos are PosASL. I don't understand the relative part in your question.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, when attached to objects the direction value being displayed did not seem intuitive. If that makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to check what you mean. It should show the same value as the unit just opening their compass.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it just comes to whether we want to know that the position is 90 degrees relative to the vehicle or just the difference in their bearings. The former what what I assumed the value was.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What purpose does relative bearing w.r.t. the attached unit have to the Zeus or any unit on the ground? I understand if you want the direction as a relative clock, but I have never given or received relative bearing. For artillery corrections, you also don't use relative directions.

@Timi007
Copy link
Contributor Author

Timi007 commented Mar 25, 2025

Should we only allow attaching one plot at a time for now? I honestly don't have a better solution.

@Timi007 Timi007 marked this pull request as ready for review March 26, 2025 17:58
@Timi007 Timi007 requested a review from mharis001 March 26, 2025 17:58
@Timi007
Copy link
Contributor Author

Timi007 commented Jun 19, 2025

Push

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Adds a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants