Trying to change direction of attached unit with setVectorDir command is futile at the moment.
setVectorDir - changes direction momntarily and returns to default direction
setVectorDirAndUp - works
setDir - works
Trying to change direction of attached unit with setVectorDir command is futile at the moment.
setVectorDir - changes direction momntarily and returns to default direction
setVectorDirAndUp - works
setDir - works
In the editor execute
player attachto [nearestBuilding player, [0,0,10]]
try to change direction:
player setVectorDir [1,0,0];
press EXEC -> player turns right 90 degrees. Press Ecs to close debug console -> player returns to default direction.
try
player setVectorDirAndUp [[1,0,0],[0,0,1]] -> works
player setDir 180 -> works
This is bizarre. It works now even though there was no update, so basically it is the same version that I used for initial testing. I know for sure 1 more person had the same issue confirmed, but it is ok now. Dunno what to say.
Yep, I also find another problem between setPitchBand and attachTo, pitch byond 90 degrees flips vectorDir if obj was attached that BI fnc failed to handle it, I tried many hours to implement the fnc to handle attached obj but can't improve it, I'll note this on wiki today.
That's no so much a bug but a limit of the script and is mentioned in the Function.
I have found this to be quite useful.
Thanks @F2k, I’ve tried bapedibupa’s fncs and they really work better than setPitchBank, although BI fnc is the fastest among all who takes 0.1416ms while the rest take more than 0.21ms, I just need more time to figure out if it was attachTo destroy the algorism.
Limitation mentioned as 90 counted as 89.9 doesn’t matter, it was still nicely written but I’m just testing why vectorDir flip on attached obj at a certain pitch, which makes it no longer so functional as bapedibupa’s before dev write it into the engine.
The issue is present again in the latest dev build. Cannot attach player to a building anymore so attaching player to a helicopter. Setting vectordir now does some chaotic turning and sets player back to default direction it was facing when attached.