Jump to content

[HELP] Function to force camera movement on/off?


koragg

Recommended Posts

Hey guys, I feel a bit awkward asking for a function name but...xd I'm pretty sure there was some function to force the player's camera movement on and off. What I mean is that after i set the camera with setCameraMatrix() I can't use the mouse to look around me. So I need to add that function which forces camera movement to be on after using setCameraMatrix(). Hope some of you remember it, I asked a few guys but none do :S

 

PS: It's for my race ghost spectating resource.

Edited by koragg
Link to comment
8 hours ago, CodyJ(L) said:

setCameraTarget(localPlayer)

However, toggling movement requires a custom resource.

But i don't need to set the target to myself. It should be kept on the ghost car, only need to enable camera movement. I'll try with warpPedIntoVehicle () to put myself in the ghost car and then setCameraTarget () on me. If only setCameraTarget() worked on other objects except players...it would be so easy to achieve this. 

Link to comment

This did it, camera moves around while spectating ghost vehicle just as if I'm spectating a normal player: 

But is there a way to keep the focus always behind the vehicle (while not moving the mouse)? Right now if the ghost vehicle makes a turn the camera remains facing the spot I left it at with my mouse. It should go back to behind the ghost car automatically. Any help appreciated!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...