View Issue Details

IDProjectCategoryView StatusLast Update
0004491Spring engineGeneralpublic2016-04-23 17:05
Reporteremmanuel Assigned To 
PrioritylowSeverityfeatureReproducibilityN/A
Status newResolutionopen 
Product Version97.0 
Summary0004491: unitdef maxangledif is dumbly made
DescriptionmainDir={0.0, 1, 0},maxAngleDif=135.0,can shoot a conical from the top to the low sides
changing maindir restrict the complete turn

free horizontal spin & limited elevationonly from top or down origin not possible
using animdef script radian axis limitations make the unit will wait forever facing the ennemy without shooting

writing a gadget just for override basic unitdef is fail

this not allow to make a a turet that will shoot 360° direction and only -15° to +15° as near all the turret build in the world since the start of the times does
Steps To Reproducemake a basic tank & cry
Additional Informationdamn !
TagsNo tags attached.
Checked infolog.txt for Errors

Relationships

duplicate of 0001414 closed Adding a vertical option for maxangledif on weapons. 

Activities

Google_Frog

2016-02-13 08:22

reporter   ~0015757

As far as I can tell he wants to make a weapon which can change its aim horizontally but not vertically. So it can fire in any direction but is limited in its pitch up and pitch down.

Returning false in aimWeapon to make a pitch restriction does not work because the weapon will still pick the unit as a valid target.

raaar

2016-02-16 01:35

reporter   ~0015793

Last edited: 2016-02-16 01:36

I vaguely remember a "minbarrelangle" weapon def at some point, but it's not listed on https://springrts.com/wiki/Gamedev:WeaponDefs

there could be another property besides maxAngleDifX for weapon X with the four angles, like angleBoundariesX = [leftLimit rightLimit downLimit upLimit]

the example for that tank would be

angleBoundaries1={-180, +180, -15, +15}

but you can sort of fake it with the current system for one of the angles, for example:
weaponMainDir1={0, 1, 0} -- up
maxAngleDif1=210 -- this enforces the -15º restriction

FLOZi

2016-04-23 15:50

reporter   ~0016203

Last edited: 2016-04-23 15:54

minBarrelAngle was an OTA tag - I always thought that was merely cosmetic; it prevented the barrel being raised above that angle but didn't change the trajectory, but a quick google suggests otherwise.

IMO this is a wontfix as there are now many lua functions for manipulating/choosing unit/weapon targets, you could implement such a tag in lus.

Google_Frog

2016-04-23 17:05

reporter   ~0016204

I don't think that this can be implemented in lua. The engine asks lua for targeting input too infrequently for an issue-free solution. That said, I don't think lua needs to be able to implement weapon angle restrictions.

Issue History

Date Modified Username Field Change
2014-08-06 07:33 emmanuel New Issue
2016-02-12 22:16 Kloot Relationship added duplicate of 0001414
2016-02-13 08:22 Google_Frog Note Added: 0015757
2016-02-16 01:35 raaar Note Added: 0015793
2016-02-16 01:36 raaar Note Edited: 0015793
2016-04-23 15:50 FLOZi Note Added: 0016203
2016-04-23 15:53 FLOZi Note Edited: 0016203
2016-04-23 15:54 FLOZi Note Edited: 0016203
2016-04-23 17:05 Google_Frog Note Added: 0016204