[Include] Rotations.inc
#17

Xmm, anyway, you can go outside the landfill. For a reason that I do not understand. How can I fix it?

https://www.youtube.com/watch?v=ZakA...ature=*********

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
AbyssMorgan is correct, it is not the main purpose of this include
But to answer your question you could use any "Rotate" function

For players I would suggest EulerRotate because there is only GetPlayerFacingAngle
PHP код:
new FloatXFloatYFloatZ;
GetPlayerPos(playeridXYZ);
new 
FloatrZ// the only angle you can get is rZ
GetPlayerFacingAngle(playeridrZ); // use 0.0 for rX and rY
// oX (right vector offset) = 0.0, oY (front vector offset) = 5.0, oZ (up vector offset) = 0.0
EulerRotate(0.00.0rZ0.05.00.0XYZ);
// X, Y, Z should now be 5 units before the player 
Anyway this inlude is overkill if you only need GetXYInFrontOfPlayer, actually it would be slower because it takes rX and rY in the calculation, so there is no optimisation if only rZ is present
Just search for GetXYInFrontOfPlayer, it has been asked / posted thousand times
Reply


Messages In This Thread
Rotations.inc - by Nero_3D - 14.08.2016, 01:19
Re: Rotations.inc - by PT - 14.08.2016, 11:11
Re: Rotations.inc - by Sanady - 15.08.2016, 01:37
Re: Rotations.inc - by Nero_3D - 06.01.2017, 23:59
Re: Rotations.inc - by Crayder - 06.02.2017, 18:25
Re: Rotations.inc - by Nero_3D - 10.02.2017, 13:37
Re: Rotations.inc - by Crayder - 10.02.2017, 17:09
Re: Rotations.inc - by AbyssMorgan - 10.02.2017, 17:13
Re: Rotations.inc - by ball - 16.06.2017, 16:44
Re: Rotations.inc - by Nero_3D - 16.06.2017, 21:43
Re: Rotations.inc - by Nero_3D - 11.08.2017, 20:03
Re: Rotations.inc - by Admigo - 03.12.2017, 13:28
Re: Rotations.inc - by Nero_3D - 04.12.2017, 02:29
Re: Rotations.inc - by kennydalglish - 04.12.2017, 06:27
Re: Rotations.inc - by AbyssMorgan - 04.12.2017, 08:04
Re: Rotations.inc - by Nero_3D - 04.12.2017, 23:01
Re: Rotations.inc - by kennydalglish - 05.12.2017, 15:54
Re: Rotations.inc - by Nero_3D - 06.12.2017, 00:22
Re: Rotations.inc - by kennydalglish - 08.12.2017, 21:47
Re: Rotations.inc - by NaS - 08.03.2018, 15:02
Re: Rotations.inc - by Nero_3D - 16.03.2019, 21:26

Forum Jump:


Users browsing this thread: 6 Guest(s)