Hello everyone!
I am writing a script which should place object behind NPC on the right side. However now the position is chosen randomly according to HeadingAngle. Can anyone help me make it work properly so object is placed always on the right (left) side of NPC?
Here is the plan:
[url=http://postimage.org/][img]http://s6.postimg.org/7qz7p8241/Instruction.jpg[/img][/url]
let HeadingAngle := PlayerRef.GetAngle Z + PlayerRef.GetHeadingAngle DialogueTargetRef
Print "Player's heading angle is " + $HeadingAngle
set SINus to sin HeadingAngle
set COSinus to cos HeadingAngle
Print "Sin is " + $SINus
Print "Cos is " + $COSinus
let PosX := 100
let PosY := 300
Set fRelativePosX To DialogueTargetRef.GetPos X + (PosX * SINus)
Set fRelativePosY To DialogueTargetRef.GetPos Y + (PosY * COSinus)