• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Library] 3DTryg
#12
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);





----



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.!
  Reply


Messages In This Thread
3DTryg - by AbyssMorgan - 2021-04-18, 07:24 AM
RE: 3DTryg - by Pinch - 2021-04-18, 02:48 PM
RE: 3DTryg - by AbyssMorgan - 2021-05-01, 01:24 PM
RE: 3DTryg - by AbyssMorgan - 2021-05-05, 07:52 PM
RE: 3DTryg - by Radical - 2021-05-25, 11:18 PM
RE: 3DTryg - by AbyssMorgan - 2021-05-26, 03:28 PM
RE: 3DTryg - by Radical - 2021-05-30, 09:28 PM
RE: 3DTryg - by AbyssMorgan - 2021-06-03, 06:14 AM
RE: 3DTryg - by AbyssMorgan - 2021-09-17, 08:22 PM
RE: 3DTryg - by AbyssMorgan - 2021-09-19, 04:10 PM
RE: 3DTryg - by AbyssMorgan - 2021-10-31, 10:41 AM
RE: 3DTryg - by Salik_Davince - 2022-04-24, 08:05 AM

Forum Jump: