NoNameSet Posted March 11, 2018 Share Posted March 11, 2018 (edited) When I create a camera and activate it, every ped accept for the player goes to the lowest level of detail, is there any way to fix this? incase you need to look at my camera class: (using RPH) using Rage;using Rage.Native;using System;namespace NoNameSet.Common{ public class CameraClass : ISpatial, IDeletable { private Camera camera; private bool active = false; private bool effectActive = false; private Vector3 _position; private Vector3 Position { get { return _position; } set { _position = value; } } private float _fOV; private float FOV { get { return _fOV; } set { _fOV = value; } } private Rotator _rotation; private Rotator Rotation { get { return _rotation; } set { _rotation = value; } } Vector3 ISpatial.Position { get => ((ISpatial)camera).Position; set => ((ISpatial)camera).Position = value; } public CameraClass(Vector3 Position, Rotator Rotation, float fov, bool disableHUD) { this._position = Position; this._rotation = Rotation; this._fOV = fov; if (disableHUD) NativeFunction.Natives.DISPLAY_HUD(disableHUD); CreateCamera(); } public CameraClass(Vector3 position, Rotator Rotaton, float fov, string timecycleModifier, bool disableHUD) { this._position = Position; this._rotation = Rotation; this._fOV = fov; if (disableHUD) NativeFunction.Natives.DISPLAY_HUD(disableHUD); WorldFunctions.SetTimecycleModifier(timecycleModifier); effectActive = true; CreateCamera(); } public void CreateCamera() { Vector3 Place = Position; try { camera = new Camera("DEFAULT_SCRIPTED_CAMERA", false); camera.Position = Position; camera.Rotation = Rotation; camera.FOV = FOV; camera.Active = true; active = true; GameFunctions.DumpLog("Created a camera"); } catch (Exception ex) { GameFunctions.DumpLog("Error trying to setup camera class, error is: " + ex.ToString()); active = false; } } public void UpdateFOV(float fov) { _fOV = fov; if (active) camera.FOV = fov; } public void Delete() { if (active) camera.Delete(); if (effectActive) WorldFunctions.ClearTimecycleModifier(); active = false; effectActive = false; } public bool IsActive() { return active; } public float DistanceTo(ISpatial target) { return Position.DistanceTo(target); } public float DistanceTo(Vector3 target) { return Position.DistanceTo(target); } public float DistanceTo2D(Vector3 target) { return Position.DistanceTo2D(target); } public float DistanceTo2D(ISpatial target) { return Position.DistanceTo2D(target); } public float TravelDistanceTo(Vector3 target) { return Position.TravelDistanceTo(target); } public float TravelDistanceTo(ISpatial target) { return Position.TravelDistanceTo(target); } }} Edited March 11, 2018 by NoNameSet Link to comment Share on other sites More sharing options...
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