Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] Object Rotation/Functions

 
  • 0 Vote(s) - 0 Average
Pawn Object Rotation/Functions
Salik_Davince
Offline

Burgershot Member
Posts: 4
Threads: 2
Joined: Apr 2019
Reputation: 0
#1
2022-04-24, 08:10 AM
Hi, I know that the project is practically not supported, but I would like to ask how to implement the rotation of an object and position relative to another object, i.e. group objects, I know that 3DTryg includes the following functions, but I am not strong in trigonometry: (yandex translator) -


* GetRotationFor2Point2D(Float:x,Float:y,Float:tx,Float:ty,&Float:rz);
* GetRotationFor2Point3D(Float:x,Float:y,Float:z,Float:tx,Float:ty,Float:tz,&Float:rx,&Float:rz);

* ShiftVectorToRotation(Float:vx,Float:vy,Float:vz,&Float:rx,&Float:rz);
* ShiftRotationToVector(Float:rx,Float:rz,&Float:vx,&Float:vy,&Float:vz);

* ShiftVectorRotation(Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz,&Float:tx,&Float:ty,&Float:tz);

* Item::GetRotationQuat(elementid,Item3D_Type:element_type,&Float:qw,&Float:qx,&Float:qy,&Float:qz);

* //Nero_3D Rotations Functions:
* Tryg3D::GetRotationMatrixEuler(Float:matrix[][],Float:rx,Float:ry,Float:rz,T3D:eulermode:mode=T3D:euler_default);
* Tryg3D::MatrixRotate(Float:matrix[][],Float:oX,Float:oY,Float:oZ,&Float:x,&Float:y,&Float:z);
* Tryg3D::QuatRotate(Float:qw,Float:qx,Float:qy,Float:qz,Float:oX,Float:oY,Float:oZ,&Float:tx,&Float:ty,&Float:tz);
* Tryg3D::GetQuatFromEuler(Float:rx,Float:ry,Float:rz,&Float:qw,&Float:qx,&Float:qy,&Float:qz,T3D:eulermode:mode=T3D:euler_default);
* Tryg3D::EulerRotate(Float:rX,Float:rY,Float:rZ,Float:oX,Float:oY,Float:oZ,&Float:tx,&Float:ty,&Float:tz,T3D:eulermode:mode=T3D:euler_default);


==============================
You can even show and cite functions without using 3DTryg, but
==============================

And the second question in conclusion is how to set the angle of the player towards the object and set the angle (rotation) of the object towards the player, thank you for your help.!
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode