setVectorDir: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(note added)
(Undo revision 79144 by Ffur2007slx2 5 (talk) This looks like a bug. made a ticket http://feedback.arma3.com/view.php?id=19005 feel free to repost in discussions)
Line 38: Line 38:
*If the player is facing 90 degrees (east), then this will make him pitch 90 degrees up.
*If the player is facing 90 degrees (east), then this will make him pitch 90 degrees up.
You can't directly pitch an object beyond 90 degrees, because this would change its facing direction. You must first flip it's direction using setDir, then you must bank the object 180 degrees, THEN you pitch the object appropriately.
You can't directly pitch an object beyond 90 degrees, because this would change its facing direction. You must first flip it's direction using setDir, then you must bank the object 180 degrees, THEN you pitch the object appropriately.
<dd class="notedate">Posted on May 29, 2014 - 20:50
<dt class="note">'''[[User:ffur2007slx2_5|ffur2007slx2_5]]'''<dd class="note">
(ArmA3 1.18) Use [[setVectorDirAndUp]] or [[setDir]] on an attached unit to change its direction, while [[setVectorDir]] alone won't do anything.
<code>_unit [[attachTo]] [_logic,[0,0,2]];
_unit [[setVectorDir]] [0.3,0.3,0]; //No effect</code>
<!-- Note Section END -->
<!-- Note Section END -->
</dl>
</dl>

Revision as of 21:14, 29 May 2014

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
Set object's direction vector. Up vector will remain unchanged.
Groups:
Uncategorised

Syntax

Syntax:
object setVectorDir [x,y,z]
Parameters:
object: Object
[x,y,z]: Array
Return Value:
Nothing

Examples

Examples:
Example needed

Additional Information

See also:
vectorUpsetVectorUpvectorDirsetVectorDirAndUp

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

Notes

Posted on March 16, 2008 - 09:50
Str
Command can be also used to rotate camera in all three axis.
Posted on 21:06, 3 March 2009 (CET)
General Barron
setVectorDir can only influence an object's pitch. It can not influence bank. Example: player setVectorDir [0,0,1]
  • If the player is facing 0 degrees (north), then this will do NOTHING.
  • If the player is facing 90 degrees (east), then this will make him pitch 90 degrees up.
You can't directly pitch an object beyond 90 degrees, because this would change its facing direction. You must first flip it's direction using setDir, then you must bank the object 180 degrees, THEN you pitch the object appropriately.

Bottom Section