You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
This will work for the local player, when it comes to a remote player it will return true but you will not see that players head move.
To Reproduce
forkey, valueinipairs(getElementsByType("player")) dolocalrot=getPedCameraRotation(value)
localx, y, z=getElementPosition(value)
localvx=x+math.sin(math.rad(rot)) *10localvy=y+math.cos(math.rad(rot)) *10setPedLookAt(value, vx, vy, 10, 3000)
end
After outputting the values from getPedCameraRotation and the vx, vy values, they are definitely changing for when the remote player moves his head, meaning this bug is within setPedLookAt.
Also try: crun setPedLookAt(getPlayerFromNick("name"), 0, 0, 0, -1)
You will not see his head move, despite it returning true.
I remember making it work on MTA 1.5.5 using setPedAimTarget as the wiki says, but after an update (i don't know which one) this trick stopped working. It would be cool to pin point where the problem is and get this solved.
I was digging through the Wiki and found this issue linked on the setPedLookAt page. It says there that for remote players, you have to use setPedAimTarget before setPedLookAt. With this information and the script in this Issue's main post, I made this which is functional and smooth (tested with other players). Hope it helps somebody.
Describe the bug
This will work for the local player, when it comes to a remote player it will return true but you will not see that players head move.
To Reproduce
After outputting the values from getPedCameraRotation and the vx, vy values, they are definitely changing for when the remote player moves his head, meaning this bug is within
setPedLookAt
.Also try:
crun setPedLookAt(getPlayerFromNick("name"), 0, 0, 0, -1)
You will not see his head move, despite it returning true.
Additional context
From https://bugs.mtasa.com/view.php?id=4325
The text was updated successfully, but these errors were encountered: