View Issue Details

IDProjectCategoryView StatusLast Update
0005498Spring engineLuapublic2017-03-24 15:30
Reporterlhog Assigned ToKloot  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version103.0 +git 
Summary0005498: Rotation angles of Get and Set don't seem to make sense
DescriptionI'm trying to execute the following piece of code for a gunship unit every 2nd frame. MoveCtrl is enabled:

_, pYaw, _ = Spring.GetUnitRotation(unitID)
Spring.MoveCtrl.SetRotation(unitID, 0, pYaw, 0)

Yaw seem to oscillate between +value and -value
[f=0052914] pYaw: -0.5681585
[f=0052914] -==================-
[f=0052916] pYaw: 0.56815851

Is that expected?
Steps To Reproduce1) Create a gadget which movectrls a gunship unit
2) write a piece of code + environment as in description
3) Observe result
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

Kloot

2017-03-24 13:13

developer   ~0017387

Expected, the arguments to Set*Rotation (currently) need to have minus signs in front of them if they are obtained from Get*Rotation.

lhog

2017-03-24 14:34

reporter   ~0017388

Interesting.... Then feel free to close.

Kloot

2017-03-24 15:30

developer   ~0017389

NB: ZK already has this taken care of via https://github.com/ZeroK-RTS/Zero-K/blob/master/LuaRules/Utilities/function_override.lua

Issue History

Date Modified Username Field Change
2017-03-24 11:03 lhog New Issue
2017-03-24 13:13 Kloot Note Added: 0017387
2017-03-24 14:34 lhog Note Added: 0017388
2017-03-24 15:30 Kloot Assigned To => Kloot
2017-03-24 15:30 Kloot Status new => closed
2017-03-24 15:30 Kloot Resolution open => no change required
2017-03-24 15:30 Kloot Note Added: 0017389