@name Inverse Kinematics test
@inputs Prop:entity

E=entity()
interval(1)
if(first()){
    holoCreate(1,E:pos())
    holoCreate(2,holoEntity(1):toWorld(vec(0,0,25)))
    holoCreate(3,holoEntity(2):toWorld(vec(0,0,-25)))
    
    holoParent(1,E)
    holoParent(2,1)
    holoParent(3,2)
}

Ent1Pos=holoEntity(1):pos()
Ent2Pos=Prop:pos()

Dist = Ent1Pos - Ent2Pos
Leng = Dist:length()
Ang1 = Dist:toAngle()
Ang2 = ang(-asin(Leng / 50), 0, 0)

holoAng(1, E:toWorld(Ang1 + Ang2) )
holoAng(2, E:toWorld(Ang1 - Ang2) )
