from velocity commands we have
velocity
setVelocity
setVelocityTransformation which has little to do with actual velocity
velocityModelSpace
now desperately need setVelocityModelSpace
from velocity commands we have
velocity
setVelocity
setVelocityTransformation which has little to do with actual velocity
velocityModelSpace
now desperately need setVelocityModelSpace
try to set velocity of the object relative to the object itself
this is also related to the other request http://feedback.arma3.com/view.php?id=15211
in order to control vehicle physics from script you should be able to set velocity and rotation in model space, you could use setVelocity but thir requires a matrix transformation on the script, whereas setvelocity in modelspace could be sent to Physx as it is a supported command.
Generally speaking, every "get" command should always have its equivalent "set" command (or the other way around).
To name just a few: "setMass" and "setObjectTexture" are both missing their "get"-equivalent.
Well this command would ease things up but it's not really necessary.
I'm still upvoting this
You can use this:
_deg = (direction _vehicle);
if(_deg < 90 && _deg >= 0) then {
_deg = 90 - _deg;
} else {
if(_deg <=360 && _deg >= 90) then {
_deg = 450 - _deg;
};
};
_velXT = _velX * cos(-1*_deg) - _velY * sin(-1*_deg);
_velYT = _velX * sin(-1*_deg) + _velY * cos(-1*_deg);
and transforming it back into world space would be something like this
_newVelX = _newVelXT * cos(_deg) - _newVelYT * sin(_deg);
_newVelY = _newVelXT * sin(_deg) + _newVelYT * cos(_deg);
this is correct if you work on a land vehicle (yaw), but in an air vehicle such as an helicopter you must also factor pitch and roll.. so the vertical component of velocities and there it becomes complicated...
You are right, I only did a cylindrical transformation which actually only works on flat terrain.
In your case you would have to use Euler angles. Still doable but of course I expect no one to understand this.