06.12.2014, 06:36
Okay, so the title is pretty short, but the question is not.
Basically, I want to attach the player's camera inside a vehicle, but I do not want to create any timers which can then produce lag. I've tried making individual 'bots', which would then drive you around rather than having the player spectating, but the FCNPC plugin is somewhat not working with vehicle recordings (it removes the bot from the vehicle, sets a random virtual world for the vehicle and once it's finished recording it would then return the bot to the vehicle).
My first approach was to set the player as spectating, but using AttachCameraToObject(...), would just return to the coordinates: 0,0,0. Yes, the object I used was being attached successfully to the vehicle. To check, I spawned the player and placed it under OnPlayerStateChange for when the player had new states: foot -> passenger. It works fine, when the player is spawned but not spectating. Which is a massive problem! Why? Once the player is out of streaming distance, objects lose their texture, or things simply don't stream. As mentioned, I'd prefer not to have a set timer setting the player's position or what not.
Any idea? Giving rep for a working answer.
Basically, I want to attach the player's camera inside a vehicle, but I do not want to create any timers which can then produce lag. I've tried making individual 'bots', which would then drive you around rather than having the player spectating, but the FCNPC plugin is somewhat not working with vehicle recordings (it removes the bot from the vehicle, sets a random virtual world for the vehicle and once it's finished recording it would then return the bot to the vehicle).
My first approach was to set the player as spectating, but using AttachCameraToObject(...), would just return to the coordinates: 0,0,0. Yes, the object I used was being attached successfully to the vehicle. To check, I spawned the player and placed it under OnPlayerStateChange for when the player had new states: foot -> passenger. It works fine, when the player is spawned but not spectating. Which is a massive problem! Why? Once the player is out of streaming distance, objects lose their texture, or things simply don't stream. As mentioned, I'd prefer not to have a set timer setting the player's position or what not.
Any idea? Giving rep for a working answer.