View Issue Details

IDProjectCategoryView StatusLast Update
0006043Spring engineUnit Scriptingpublic2018-09-19 11:02
ReporterStickyStains Assigned To 
PriorityhighSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version104.0 
Summary0006043: Spring.SetCameraState not working on Direction Vector
DescriptionCamera state can not be set.
The inherited SetStateMap does not seem to apply.
Steps To Reproducefunction widget:GetInfo()
    return {
        name = "Minimal Testing Widget",
        desc = "Alters the camera direction at random - Drag&Drop into MTW.lua in Luaui/widgets",
        author = "PicassoCT",
        version = "2.0",
        date = "YearOfTheGNU ",
        license = "GNU GPL, v2 or later",
        layer = math.huge,
        hidden = false,
        handler = true,
        enabled = true -- loaded by default?
    }
end

function widget:Shutdown()

end
function widget:Initialize()
end

function widget:Update()
    camState = Spring.GetCameraState()
    assert(camState.dx)
    Spring.Echo("Valid Camera State loaded with vector",dx,dz,dy)
    
    camState.dx, camState.dz, camState.dy= math.random(-10,10)/10, math.random(-10,10)/10, math.random(-10,10)/10
    Spring.Echo("Valid Camera State modified with vector",camState.dx, camState.dz, camState.dy)
    
    Spring.Eco("Altering Camstate")
    Spring.SetCameraState(camState)
end
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

StickyStains

2018-09-18 22:12

reporter   ~0019356

I tested this, and this works when not having the value assigned i assign :(
Please close this issue

Issue History

Date Modified Username Field Change
2018-09-18 22:10 StickyStains New Issue
2018-09-18 22:12 StickyStains Note Added: 0019356
2018-09-19 11:02 Kloot Status new => closed
2018-09-19 11:02 Kloot Resolution open => no change required