Page MenuHomeFeedback Tracker

Please add setVelocityModelSpace command to complement velocityModelSpace
Closed, ResolvedPublic

Description

from velocity commands we have

velocity
setVelocity
setVelocityTransformation which has little to do with actual velocity
velocityModelSpace

now desperately need setVelocityModelSpace

Details

Legacy ID
4229479660
Severity
None
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
Feature Request
Steps To Reproduce

try to set velocity of the object relative to the object itself

Event Timeline

Killzone_Kid edited Additional Information. (Show Details)
Killzone_Kid set Category to Feature Request.
Killzone_Kid set Reproducibility to Always.
Killzone_Kid set Severity to None.
Killzone_Kid set Resolution to Open.
Killzone_Kid set Legacy ID to 4229479660.May 7 2016, 3:48 PM
Killzone_Kid edited a custom field.
Bohemia added a subscriber: Dwarden.Aug 2 2013, 4:17 PM
fred64 added a subscriber: fred64.May 7 2016, 3:48 PM

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.

Tajin added a subscriber: Tajin.May 7 2016, 3:48 PM

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.

http://planning.cs.uiuc.edu/node102.html

LouMontana closed this task as Resolved.Nov 6 2020, 2:44 PM
LouMontana updated the task description. (Show Details)
LouMontana edited Additional Information. (Show Details)
LouMontana set Operating System to Windows 7.