Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera target gets buggy when destroying localPlayer's vehicle while using setCameraMatrix #615

Open
ArranTuna opened this issue Sep 29, 2018 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@ArranTuna
Copy link
Collaborator

Describe the bug
When you're in a vehicle with a custom camera matrix (setCameraMatrix) and have your vehicle destroyed by the server (destroyElement) the actual camera target gets reset to the localPlayer but getCameraTarget() still returns false. The camera is now totally bugged and cannot be changed using setCameraMatrix anymore.

Hard to explain, reproducing should explain it.

To reproduce

  • Get into a vehicle
  • crun setCameraMatrix(0,0,0) --camera matrix can be changed without a problem
  • srun destroyElement(getRandomPlayer().vehicle) --your camera will rapidly fly back to your ped (that will glitch your camera)
  • crun getCameraTarget() --returns false but the actual camera target is localPlayer
  • crun setCameraMatrix(0,0,0) --camera matrix cannot be changed anymore
  • crun setCameraTarget(localPlayer) --the problem can only be fixed by resetting the camera target

Expected behaviour
Either the custom camera matrix should remain set, or getCameraTarget() should return local player. Also I kept falling through the ground after the vehicle was destroyed because it must be still trying to stream 0, 0, 0 and not where I was at.

Version
Both v1.5.6-release-14414

Additional context

From https://bugs.mtasa.com/view.php?id=8598

@ArranTuna ArranTuna added the bug Something isn't working label Sep 29, 2018
@ArranTuna ArranTuna added this to the Backlog milestone Sep 29, 2018
@botder botder self-assigned this Oct 26, 2018
@botder botder removed their assignment May 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants