How I can import rotation from file? I need Quaternions Currently I can only import object location.
Structure of txt file:
x,y,z,xrot,yrot,zrot,wrot,nameofobject
Here is my script:
(
file = memStreamMgr.openFile @"C:\test.txt"
while NOT file.eos() do
(
local line = filterString (file.readLine()) ", "
if line.count == 8 AND isValidNode (local obj = getNodeByName line[8]) do
obj.pos = [line[1] as float, line[2] as float, line[3] as float]
)
memStreamMgr.close file
)