Page MenuHomeFeedback Tracker

[Feature Request] Make setVelocityTransformation use positionWorld instead of positionASL, using an optional parameter
Feedback, NormalPublic

Description

getPosASL/setPosASL uses the land contact of the object, which changes according to orientation, so technically it's still a relative position, not absolute, which nullifies the point of using ASL format.

This will cause weird and unexpected movement. Let's say you want to move the object in a straight line:

start = getPosASL player vectorAdd [0,0,10];
end = start vectorAdd [0,1000,0];
spd = 5;
duration = 1000 / spd;
heli allowDamage false;
timer = 0;
onEachFrame {
    if (isGamePaused) exitWith {};
    if (timer > duration) exitWith {onEachFrame ""};
    timer = timer + diag_deltaTime * accTime;
    _dir = [0,1,0];
    _up = [sin (500 * timer), 0, cos ( 500  * timer)];
    heli setVelocityTransformation [start, end, [0,spd,0], [0,spd,0], _dir, _dir, _up, _up, timer / duration];
}

This is what you get:

It's not a straight line....

Would it be possible to add an additional optional bool parameter to make it use positionWorld instead?

object setVelocityTransformation [fromPosASL, toPosASL, fromVelocity, toVelocity, fromVectorDir, toVectorDir, fromVectorUp, toVectorUp, interval, useWorld = false]

useWorld: Uses the world version of ASL format.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce

Use any object with a land contact and rotate it with this command.

Event Timeline

Leopard20 updated the task description. (Show Details)Dec 19 2021, 9:41 AM
Leopard20 renamed this task from [Feature Request] Make setVelocityTransformation use positionWorld instead of positionASL to [Feature Request] Make setVelocityTransformation use positionWorld instead of positionASL, using an optional parameter.
BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Dec 26 2021, 9:20 PM
BIS_fnc_KK changed the task status from New to Feedback.
BIS_fnc_KK added a subscriber: BIS_fnc_KK.

Oh that's a much better idea! Thank you!