Portal SAMP
[Ajuda] GetPlayerLookAt - Versão de Impressão

+- Portal SAMP (https://portalsamp.com)
+-- Fórum: SA-MP (https://portalsamp.com/forumdisplay.php?fid=5)
+--- Fórum: Área de suporte (https://portalsamp.com/forumdisplay.php?fid=6)
+--- Tópico: [Ajuda] GetPlayerLookAt (/showthread.php?tid=2769)



GetPlayerLookAt - Eduardofi - 07/09/2022

Existe uma função estilo GetPlayerLookAt só que para veiculo? Ela buga totalmente dentro de um veiculo


RE: GetPlayerLookAt - Sants - 07/09/2022

Creio que esta função pode te ajudar: 

Código PHP:
GetVehicleRotation(vehicleid, &Float:rx, &Float:ry, &Float:rz



Documentação:

https://sampwiki.blast.hk/wiki/GetVehicleRotation


RE: GetPlayerLookAt - Eduardofi - 07/09/2022

(07/09/2022 18:08)Sants Escreveu: Creio que esta função pode te ajudar: 

Código PHP:
GetVehicleRotation(vehicleid, &Float:rx, &Float:ry, &Float:rz



Documentação:

https://sampwiki.blast.hk/wiki/GetVehicleRotation

Nao tem como usar ela no meu sistema. Eu uso a função que mencionei acima para pegar a posição da onde o jogador está olhando e depois crio uma explosão naquelas coodenadas


RE: GetPlayerLookAt - Device-Black - 08/09/2022

(07/09/2022 23:19)Eduardofi Escreveu:
(07/09/2022 18:08)Sants Escreveu: Creio que esta função pode te ajudar: 

Código PHP:
GetVehicleRotation(vehicleid, &Float:rx, &Float:ry, &Float:rz



Documentação:

https://sampwiki.blast.hk/wiki/GetVehicleRotation

Nao tem como usar ela no meu sistema. Eu uso a função que mencionei acima para pegar a posição da onde o jogador está olhando e depois crio uma explosão naquelas coodenadas

Usa GetPlayerCameraFrontVector
Link: https://sampwiki.blast.hk/wiki/GetPlayerCameraFrotVector


RE: GetPlayerLookAt - xbruno1000x - 08/09/2022

A include 3DTryg tem as funções abaixo, que são responsáveis por pegar um ponto a frente do veículo.

Float: Tryg3D::GetPointInFrontOfVehicle2D(const vehicleid, &Float:tx, &Float:ty, const Float:radius);
Tryg3D::GetPointInFrontOfVehicle3D(const vehicleid, &Float:tx, &Float:ty, &Float:tz, const Float:radius, &Float:rx = 0.0, &Float:rz = 0.0);

Creio que uma dessas sirva para seu propósito.