-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow continuous weapon aiming across 45° elevation #1812
Comments
AFAIK 45° has nothing to do with it. It just picks between the two angles that are valid firing solutions, just that 45° happens to be the breakpoint for targets on equal elevation. But you can have a target already above 45°, units of both trajectory settings can target it and it will pick between the straight angle and the 89ish° one.
Sounds good, perhaps it should be +/- compared to a mainDir though since that sort of already exists and almost does what is wanted, except it currently uses a cone: As a corollary, if you need to move the gameside BAR PR forward you can already specify a maximum by setting the mainDir to Y -1 and setting a maxAngle above 180°:
IMO have a separate bool, "able to pick alternate trajectory", and then it would prioritize according to the |
@sprunk theory looks right to me, there are usually two firing solutions corresponding to the high arc and more direct mode of fire. |
Would also solve this legendary Emmanuel ticket. |
Sprunk is correct. There are always 2 shooting solutions. I think understanding the problem to be solved here is the first step to being able to help you. I wish people would avoid deciding on a solution to a problem and ask for it to be implemnented in engine, and instead explain the problem they are having, how the solution should look to the player, and then maybe throw out some ideas on how it could be solved. |
The issue is that of the two shooting solutions, low & high, you have to pick one. We want smart handling, so low is default, but if low is blocked, high is used. Currently, implementing that game-side is a huge headache, involving complex unit scripts and dummy weapons, with tons of edge cases. |
Isn't quite so simple for game engine to handle without knowing the exact use case.
We would need more levers to fiddle with user side to get the desired behavior right beyond |
That isn't going to be good for performance. You'd have to ensure the number of active units using it is always smallish, otherwise it will be used as a means to grind multiplayer performance to a halt. |
Worse than LUS gadget implementation alternative? |
I know don't know about the LUS gadget alternative, so I couldn't say. Part of the appeal for TA-genre games is the large scale battles - trying to add computationally complex mechanics to potentially a large number of units is going to reduce the practical size of the battles. |
Hopefully uncontroversial: |
that would solve the need for a separate high trajectory weapondef. The dummy weapon in the smart select gadget I wrote was to provide a static QueryWeapon point to aim from a static unmoving location slightly lower than the turret to reduce erratic GetFreeLineOfFire returns |
|
Currently, a weapon def has to use the highTrajectory tag to choose whether it will always shoot below 45° or above 45°.
This requires a huge amount of code game-side to handle units which are desired to fire either low or high trajectory automatically (see beyond-all-reason/Beyond-All-Reason#3720).
Allow weapons to continuously target throughout an elevation of 0° to 90°, and add weapon def tags to optionally specify minimum and maximum elevation angles.
When doing targeting checks, prioritize low trajectory, and only switch to the high trajectory angle if low trajectory is blocked or forbidden.
Deprecate the
highTrajectory
tag in favour of minimum and maximum elevation angle tags.The text was updated successfully, but these errors were encountered: