Topic: Using values given by Irrlicht.
I need to get the position of a node and use each dimension of the vector.
I use "Node.GetPosition()". I would like to apply the vector to a variable. Then get individual dimensions from the variable.
I am having a problem when I apply the nodes position to variables.
Here is an example of my code.
Const ScreenW=1024, ScreenH=768
Local PlayerPos
Local TargetPos
Local HUDArrow = "HUDArrow.bmp"
PlayerPos = Node.GetPosition()
TargetPos = Node2.GetPostion()
Local = AngleX = ACos((PlayerPos[0],PlayerPos[1]*TargetPos[0],TargetPos[1])/(Mod(PlayerPos[0],PlayerPos[1])Mod(TargetPos[0],TargetPos[1])))
Local = AngleY = ASin((PlayerPos[0],PlayerPos[2]*TargetPos[0],TargetPos[2])/(Mod(PlayerPos[0],PlayerPos[2])Mod(TargetPos[0],TargetPos[2])))
Local = AngleZ = ACos((PlayerPos[1],PlayerPos[2]*TargetPos[1],TargetPos[2])/(Mod(PlayerPos[1],PlayerPos[2])Mod(TargetPos[1],TargetPos[2])))
Local = HUDX = Cos((AngleX-AngleZ)*(ScreenW/2))
Local = HUDY = Sin((AngleY-AngleZ)*(ScreenH/2))
Video.Draw2DImage(HUDArrow, T_irrPosition2d_s32.Create (HUDX, HUDY))
What type of variables could I use?
Thank you.