velocityModelSpace: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "<h3 style='display:none'>Notes</h3> <dl class='command_description'> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> <h3 style='display:none'>Bottom Section</h3>" to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma3 | | arma3 | ||
|0.50 | |0.50 | ||
|gr1= Object Manipulation | |gr1= Object Manipulation | ||
| Returns the velocity (speed vector) of the vehicle as an array with format [x, y, z]. Vector is in model space. | | Returns the velocity (speed vector) of the vehicle as an array with format [x, y, z]. Vector is in model space. | ||
| '''velocityModelSpace''' vehicle | | '''velocityModelSpace''' vehicle | ||
|p1= vehicle: [[Object]] | |p1= vehicle: [[Object]] | ||
| [[Array]] | | [[Array]] | ||
|x1= <code>[[velocityModelSpace]] _chopper; | |x1= <code>[[velocityModelSpace]] _chopper; | ||
[[comment]] "Returns [X (left(-) right(+)), Y (backward(-) forward(+)), Z (down(-) up(+))]"; | [[comment]] "Returns [X (left(-) right(+)), Y (backward(-) forward(+)), Z (down(-) up(+))]"; | ||
</code> | </code> | ||
| [[setVelocityModelSpace]], [[velocity]], [[speed]], [[setVelocity]], [[setVelocityTransformation]] | | [[setVelocityModelSpace]], [[velocity]], [[speed]], [[setVelocity]], [[setVelocityTransformation]] | ||
| | | | ||
}} | }} | ||
Revision as of 11:43, 18 January 2021
Description
- Description:
- Returns the velocity (speed vector) of the vehicle as an array with format [x, y, z]. Vector is in model space.
- Groups:
- Object Manipulation
Syntax
Examples
- Example 1:
velocityModelSpace _chopper; comment "Returns [X (left(-) right(+)), Y (backward(-) forward(+)), Z (down(-) up(+))]";
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
- Posted on December 11, 2014 - 02:55 (UTC)
- Pierre MGI
- This function is useful for helicopters as it returns Z vector like an indicator of thrust/load ratio. More or less climb (+) or descent (-) tendency but: As X,Y,Z vectors are relative to vehicle attitude, this function doesn't return a climb or descend rate (as the attitude of the vehicle can be far from horizontal). You can get negative Z vector, in jets, while climbing fast, peeling off in the sky! More or less, you can use as a Z accelerometer factor but invert the sign: +G acceleration (negative vector below the jet) is -Z here. If not "physically" correct, the behavior is sufficient enough for Arma flight model.
- Posted on June 21, 2015 - 02:36 (UTC)
- K.J.
- Previous note is physically incorrect. Velocity can not be used to give information about Thrust/Load ratio or G-Forces/acceleration. To get acceleration you have to create the derivative of velocity after time dv/dt -> the difference of velocity between 2 timesteps divided by the time that passed between the 2 steps.