Fandom

武装突袭 Wiki

ModelToWorld

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 Share

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。

  

点击图片可看到更多讯息

开始使用于

游戏:
Armed Assault
版本:
1.00

描述

描述:
Converts position from object model space to world space. This command will take into account vectorUp of the object when calculating relative coordinates.

基本句法

句法:
object modelToWorld modelPos
参数:
object: Object

modelPos: PositionRelative - [x,y,z] offset relative to the model centre
返回值:
Array - world position in format PositionAGL

范例

范例1:
_aboveAndBehindPlayer = player modelToWorld [0,-1,3];

额外资讯

多人游戏:
-
也可以看看:

modelToWorldVisualworldToModelselectionPosition

注意事项

此处撰写句法皆为可行用法. 可到官网[1]专页回报错误. 你可以使用讨论页面或是论坛来进行讨论.
新增注意事项 | 如何新增?

Notes

Posted on 16 Feb, 2007
Dr_Eyeball
The worldPos parameter appears to be a relative offset to the position of object, so it can often simply be [0,0,0].
Example: to position an object _obj relative to the position of another object _RelObj with on offset of _Offset, try:

_Offset = [_x,_y,_z];
_worldPos = _RelObj modelToWorld _Offset;
_obj setPos _worldPos;


Posted on 16 Feb, 2007
Manny
The object model space has got its Z-Axis along the object's vectorUp, its Y-Axis along the object's vectorDir, while its X-Axis goes along vectorDir x VectorUp (meaning as the X-Axis in a right-handed cartesian coordiante system).


Posted on 8 May, 2008
Dr_Eyeball
If your object requires a new direction, ensure you call setDir prior to setPos when using modelToWorld. Calling setDir afterwards will skew its position otherwise.

_ladder setDir _angle;
_ladder setPos (_building modelToWorld [_x, _y, _z]);


Posted on 6 Feb, 2011
Hduregger
The z height returned changes dynamically with the height of waves beneath the object, if the object is located over sea. The z height returned by getPosATL and getPosASL does not change like this. This was tested by continuously retrieving the position of a static object, like the cross in the empty/corpses category, placed over sea or land. modelToWorld behaves similar to

getPos _obj

but it does not give the same result, therefore

(_obj modelToWorld [0.0, 0.0, 0.0]) is not the same as (getPos _obj).


Bottom Section

更多维基

随机维基