koragg Posted September 26, 2017 Share Posted September 26, 2017 (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 PS: It's for my race ghost spectating resource. Edited September 26, 2017 by koragg Link to comment
Captain Cody Posted September 26, 2017 Share Posted September 26, 2017 setCameraTarget(localPlayer) However, toggling movement requires a custom resource. Link to comment
koragg Posted September 27, 2017 Author Share Posted September 27, 2017 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
Captain Cody Posted September 27, 2017 Share Posted September 27, 2017 (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 September 27, 2017 by CodyJ(L) 1 Link to comment
pa3ck Posted September 27, 2017 Share Posted September 27, 2017 I never actually used this function, always wondered how it worked, maybe it's something you can use? https://wiki.multitheftauto.com/wiki/GetCamera 1 Link to comment
koragg Posted September 27, 2017 Author Share Posted September 27, 2017 (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 September 27, 2017 by koragg Link to comment
koragg Posted September 27, 2017 Author Share Posted September 27, 2017 Would this work btw? https://community.multitheftauto.com/index.php?p=resources&s=list&name=freecam&descr=&category= Link to comment
koragg Posted September 28, 2017 Author Share Posted September 28, 2017 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now