Jump to content

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


koragg

Recommended Posts

Posted (edited)

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
Posted
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. 

Posted (edited)

I'll send you a custom camera I've been working on in a bit. After reading what you said, there's no way of doing that on a custom object with the default setCameraMatrix function.

Edited by CodyJ(L)
  • Thanks 1
Posted (edited)

GetCamera (combined with the other functions in it's example) fixed a huge part of the problem :) Thanks @pa3ck, @CodyJ(L) would be nice, only thing left to do is to enable free camera movement while spectating the ghost vehicle.

Edited by koragg
Posted

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!

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...