Search the Community
Showing results for tags 'matrix'.
Found 1 result
bi_mg posted a topic in ARMA 3 - MISSION EDITING & SCRIPTINGHi Guys, i'm searching for a simpler way to rotate objects in 3d Space (yaw, roll, pitch). I never try the tranformation and rotation matrix to solve my problem. My Work: I started to work on worldToModel that takes an "Object Model Box 3D Space (named _ModelOrign) as a Parameter and puts "3D World Coordinades" (named _position) of another Object in this model space. private _modelOrign = _this select 0; private _objectOrign = _this select 1; private _position = _modelOrign worldToModel getPosWorld _objectOrign; So I can easily take the saved _position and apply to a targeting Object (named _modelTarget) that is differend rotating in 3D as the Object _modelOrign. Then I just execute the finction modelToWorld and voila the _position is rotating to the rotated _modelTarget in Model Box 3D Space as well. Nice and easy. privat _objectTarget = _this select 0; privat _modelTarget = _this select 1; privat _position = _this select 2; _objectTarget setPosWorld ( _modelTarget modelToWorld _position ) Orientation: to get the orientation of _objectOrign in 3D Space, i used vectorDir and vectorUp of _ modelOrign to get this orientation and apply it to this _objectOrign with the oriantation itsself. Wiki Source: Euler_angles Problem: I've have no idea to combine these two orientations vectors of _modelOrign and _objectOrign to get this problem of the orientation solved. I never used the transformation and rotation matrix. There sould be an easier way to do this. BIS serve an function BIS_fnc_setPitchBank in the past but I've heard that it is not precisely :/. I've never try it out. I'm sceptic about the documentation of vectorModelToWorld explains that it only use vectorDir and not vectorUp. I never try it. im very sure that there is a modern simpler way to solve this problem by a bunch of Arma 3+ vector functions for example addTorque but I do not understand the explanation at all, i'm not english. thank you