@name Color Wheel Holos
@persist T Tick T360
@persist [Owner Entity]:entity

interval(100)

Tick=(curtime()*15%360)

if(first()) {
    Owner=owner()
    Entity=entity()
    
    T=150
    local Center=Entity:pos()
    local Scale=52
    local EntAngles=Entity:angles()
    local HoloScale=vec(0.5)
    
    holoCreate(50,Entity:pos(),vec(),Entity:angles())
    holoParent(50,Entity)
    
    for(I=1,T) {
        local I360=(I/T)*360
        local Pos=Entity:toWorld(vec(sin(I360/T)*Scale,cos(I360/T)*Scale,0))
        
        holoCreate(I,Pos,HoloScale,EntAngles)
        holoPos(I,Pos)
        holoAng(I,(Center-Pos):toAngle())
        holoParent(I,50)
        holoMaterial(I,"debug/debugdrawflat")
    }
    
    T360=360/T
}


for(I = 1, T) {
    holoColor(I,hsv2rgb(((I*T360)+Tick),1,1))
}

# holoAng(50,Entity:toWorld(ang(0,-Tick,0)))
