When switching between cinemachine cameras why one of the cameras is keep stuttering for some time?

At the top of a script I have this 3 cameras :

public CinemachineFreeLook standUpCamera; public CinemachineFreeLook closeLookCamera; public CinemachineFreeLook gamePlayCamera; 

Inside Update() when loading a saved game I enable/disable the cameras in this order :

void Update()     {         // When starting a new game         if (sceneName == "Game" &&             MenuController.LoadSceneForSavedGame == false && newGameStart == false)         {               SetCamerasAxisProperties(0);               playerAnimator.Play("Stand Up");             StartCoroutine(StandingUp());               newGameStart = true;         }           // When loading a game (also when continue a game)         if(sceneName == "Game" &&            MenuController.LoadSceneForSavedGame == true && loadingGame == false)         {             newGameStart = true;               Camera.main.GetComponent<CinemachineBrain>().m_DefaultBlend.m_Time = 0.1f;               standUpCamera.enabled = false;             closeLookCamera.enabled = false;             gamePlayCamera.enabled = true;             gamePlayCamera.m_XAxis.m_MaxSpeed = 300f;               Camera.main.GetComponent<CinemachineBrain>().m_DefaultBlend.m_Time = blendingTime;               loadingGame = true;         }     } 

This is where I switch between the cameras :

standUpCamera.enabled = false; closeLookCamera.enabled = false; gamePlayCamera.enabled = true; 

For testing and find the problem if I don’t switch between the cameras the active camera is the standUpCamera and this make the stuttering it’s not the player that stuttering but the camera.

When I switch between the cameras I see that the active camera is the standUpCamera than the gamePlayCamera but it’s taking few seconds before the standUp is enabled false and the gamePlaye become enabled true.

What I tried is to change the blending time :

Camera.main.GetComponent<CinemachineBrain>().m_DefaultBlend.m_Time = 0.1f;   standUpCamera.enabled = false; closeLookCamera.enabled = false; gamePlayCamera.enabled = true; gamePlayCamera.m_XAxis.m_MaxSpeed = 300f;   Camera.main.GetComponent<CinemachineBrain>().m_DefaultBlend.m_Time = blendingTime; 

First I set the blending time to 0 than back to the default (5) But it didn’t help. I tried to set the blending also to 0.1f but it didn’t fix the problem. Still it’s taking few seconds almost 3-4 seconds before the gamePlayCamera become enabled true and the standUpCamera enabled false. or maybe the blending is taking time.

Maybe I didn’t change the blending time as it should be ?

Why Get Home Security Cameras?

Why Get Home Security Cameras?

    Home security cameras keep watch over your home from both inside and outside, acting as an extra pair of eyes and ears to monitor your property. In this guide, we’ll look at the benefits of installing indoor and outdoor security cameras, from their potential to deter criminals to other applications such as pet and baby monitors. We’ll also explore the necessary and optional features of security cameras, as well as their drawbacks. Finally, we’ll discuss some of the other ways to protect your home if you’re not sure about installing cameras.

    What Are the Benefits of Home Security Cameras?

    Peace of mind is one of the main benefits of security cameras, whether you choose to install cameras that are wired or wireless. They can increase your home security by letting you check in on your property from wherever you are, see a live feed of your home on a smartphone or computer, and get immediate alerts of any unusual activity.

    While the number of burglaries in the U.S. continued to decline recently, the value of the property stolen increased in 2018 to $2,799 (the most recent year for which this information is available). These studies indicate that although burglary rates are dropping, more valuable items are being stolen. This makes home security cameras an important tool in our home protection kit, as they can help with recovery as well as detection.

    Security cameras are recognized as an excellent deterrent to criminals. The experts we spoke with don’t recommend relying solely on cameras for security, saying a complete home security system is the best defense. However, cameras are still important. “If I had to choose, I would go with an alarm system over a camera system first,” says Jordan Frankel, vice president of security consulting firm Global Security Experts Inc. “But I do think cameras are a great addition, primarily because they’re a psychological deterrence. A bad guy sees the camera and may skip your home and move on to an easier target.”

    Research backs this up. A study of incarcerated burglars by the University of North Carolina at Charlotte’s Department of Criminal Justice and Criminology showed that indicators of increased security, such as outdoor surveillance cameras, were considered by most burglars when selecting a target.

    Home security cameras aren’t just useful for policing your property; they’re also helpful for keeping an eye on children and pets when you can’t be there. A security camera with facial recognition by your front door can send you a push notification saying, “John is at the front door,” so you know your child is home safely. Two-way audio on indoor cameras can act as an intercom, allowing you to see and talk to your family when you’re not home.

    For more on the benefits for home security cameras check out How to Buy Home Security Cameras and How Home Security Cameras Work.

    What Are the Drawbacks of Home Security Cameras?

    Privacy is a big concern when putting cameras around your home. “Whatever it records is technically on the internet forever,” says David VanWert, a home technology consultant and founder of VanWert Technology Designs Inc. “Once it’s stored in the cloud, in theory, it never goes away.” But as VanWert points out, you likely already have a number of devices in your home with cameras that can record what you’re doing, such as smartphones and computers. There are steps you can take to minimize the security and privacy risks of installing security cameras, however. If you’re concerned, consider only installing cameras on the outside of your home, and don’t put them in personal spaces such as bedrooms.

    Liability can be another drawback. “If you;re just watching your own property, you’re probably fine,” says Jeff Welch, a former corrections officer and founder of Grab The Axe security consultants LLC. “But if your neighbor believes or has evidence that you have one pointed towards his bedroom window or front door, then you have an issue on your end for liability for their privacy.”

    Also, if you record someone’s conversation without their knowledge – even on your own property – you could be breaking the law, depending on where you live. Denise Howell, an internet and technology lawyer, says that under federal law, as long as you’re a party to the conversation and you consent to it being recorded, it doesn’t matter what the other parties think. However, several states have two-party consent laws that make it illegal to record audio conversations without the consent of everyone involved. Plus, it’s almost always illegal to record a conversation if you’re not participating in it at all. A good rule of thumb is to let any visitors know when they are being recorded and consider posting notices on your property indicating it’s being surveilled by audio and video recording technology. Additionally, specific features such as facial recognition (found on Nest cameras) are illegal in some states. Check the applicable laws where you live.

    Another drawback is that home security cameras can be costly. While their prices have come down a lot in recent years, to outfit your entire property with security cameras can cost thousands of dollars. Additionally, these high-value items on the outside of your house can be a target for theft themselves.

    Are Home Security Cameras Good for Home Protection?

    A home security camera system is an excellent tool for home protection, and it can work both as a deterrent and a recovery tool. Burglars are wary of properties with visible security cameras. Plus, if a crime does occur, security cameras can help gather evidence. From property damage to potentially identifying criminals who break in, if you capture the action on camera, you’re more likely to be able to remedy it.

    If you want to be able to identify cars, people, and other moving objects, it’s worth investing in a camera with super or ultra-high definition video (2K or 4K, respectively). This technology uses more pixels in the image, meaning you can zoom in to see more detail on license plates and identify more physical characteristics. An HD or full HD camera won’t get you that type of clarity, especially at night.

    Ultimately, home security cameras work best to protect your property when they're integrated with a home security system. To save their batteries, wireless security cameras only start to record when they detect motion, which means they may not record everything you’d want them to. With a home security system, cameras, especially mini camera, can be set to start recording as soon as any part of the security system is triggered, such as a contact sensor, a glass-break sensor, or a motion sensor. This makes it more likely the cameras will record everything that’s happening on your property and not just the few seconds of motion that occurred right in front of them.

    For more on home security systems, read our guide to Best Home Security Systems of 2021.

    What Are the Most Important Home Security Camera Features?

    First, decide whether you want your home security camera to record footage continuously or based on a trigger, such as motion. Recording continuously will make sure yo don’t miss anything, but it will require a lot of Wi-Fi bandwidth and isn’t suitable for battery-powered wire-free cameras. The footage should be stored either on the camera itself or on a cloud-based server where you can access it for a period of time. The camera also should alert you to motion by sending a notification to your smartphone or tablet and quickly deliver clear, good-quality video of the event. “Any camera that can record footage at full high definition or above is going to be good,” says VanWert. “Some can record at 4 and 5 megapixels, and then you’re talking about 4K resolution. It depends on what level of detail you’re looking for, such as whether you want to be able to zoom in on your camera and see a license plate.”

    The power source is another key feature of a security camera. If you’re buying a wireless camera, look for one that’s powered by batteries or AC (which means it plugs into a wall outlet). AC power is preferable but not always available where you want to install a camera. As a result, the ability to use both allows for maximum placement flexibility.

    What Are Less Important Home Security Camera Features?

    Continuous video recording, also called 24/7 recording, is a luxury that you most likely don’t need. Unless you want to record every moment of the day on your property, you can skip this feature, which can be expensive on wireless indoor surveillance cameras and uses a lot of Wi-Fi bandwidth and internet data.

    Another feature you probably don’t need is an extremely wide field of view, which can distort the image. A 130-degree field of view is usually sufficient.

    Finally, modern Wi-Fi security IP cameras have a host of smart features to give you more detailed information about what’s going on in your home without you having to pull up the video feed. These software-based features tend to increase the price of the camera and aren’t essential, although they’re nice to have. They include features such as person detection, which allows the camera to alert you that a person is on your property, rather than just telling you motion was detected. The ability to set activity zones means the camera will only notify you about motion in a certain area of the image (ignoring, for example, a tree that frequently blows in the wind). Other nice-to-have smart features include the ability to work with smart home systems, such as Amazon’s Alexa Google’s Assistant and Apple’s HomeKit, and to integrate with smart door locks to allow for secure in-home deliveries.

    What Are the Privacy Concerns of Home Security Cameras?

    Cameras can record video all the time or when they detect motion, which means every time you or someone else walks into your garden or past your video doorbell. Before installing cameras in and around your home, make sure every member of your household knows they’re there and is comfortable with them. Cameras can be hacked, with your footage monitored or even posted to the internet. However, the measures we discuss in How to Keep Your Security Cameras Safe will reduce this risk considerably.

    We strongly recommend that you enable any built-in privacy features that the camera offers, and it can be perfect as baby monitor. For example, cameras can be turned off in the mobile app or geofencing technology can turn them off automatically when someone in your family with a smartphone is home.

    What Are Some Uses of Home Security Cameras Besides Preventing Burglary?

    Today’s home security cameras, including outdoor surveillance camera, are multifunctional and can be used for much more than just monitoring your property for intruders. Here are just a few other uses for home security cameras:

    Baby Monitor: Set up an indoor camera in your baby’s room and view a live feed wherever you are, as long as you have an internet connection. You’ll need a camera capable of recording 24/7 and it will need to be plugged in, but as long as it has two-way audio and will send alerts on sound or motion it will work as a reliable monitor.

    Pet Cam: Indoor, outdoor or other cameras can be used to keep an eye on your dogs, cats, chicken coop, or bunny hutch. Some cameras can specifically alert you to the noise of a dog barking so you can talk to your pet with a two-way talk feature.

    Wildlife Cam: Place a battery-powered camera with night vision capabilities at the end of your garden and keep an eye on destructive deer or predatory raccoons, or enjoy the sights and sounds of nocturnal nature on your property.

    Smart Home Trigger: If you have other smart home devices in your home, your camera, or action monitor, can be linked with them so they can respond automatically. For example, the motion sensor in an outdoor camera can turn smart lights inside if it detects motion in your driveway when you come home.

    What Are Some Other Ways to Prevent Burglary?

    One of the most effective ways to prevent burglary is to install a home security system with door and window sensors and a connection to a monitoring station, so the authorities can be notified even if you’re not there. Less expensive ways to prevent burglary include installing basic physical security devices such as padlocks, door and window locks, grates, bars, and bolts on any accessible entries. “If you have a limited budget, focus on physical security devices, such as a security door brace that prevents a door from being kicked, says security consultant Frankel. Another option is to apply clear security film to windows to make them shatter-resistant.

    Light is also a good deterrent. Outdoor lighting, motion-activated or programmed to come on at sunset and turn off at sunrise, can keep your home illuminated and make it harder for a thief to stay out of sight. Keeping your landscaping tidy and trimmed will help remove potential hiding spots.

    Maintaining signs of occupancy even when you are gone can help deter potential thieves. Some ways to do this include using automated shades and programmed smart lighting to simulate someone being home, and making sure to cancel any newspaper or package deliveries when you’re gone. A loud (although not necessarily large) dog is also a great deterrent.

How can I switch between cinemachine free look cameras by script?

using System.Collections; using System.Collections.Generic; using UnityEngine; using Cinemachine;  public class CamerasManager : MonoBehaviour {     public CinemachineFreeLook[] freeLookCameras;     public float timeBeforeSwitching;      // Start is called before the first frame update     void Start()     {         StartCoroutine(SwitchCameras(timeBeforeSwitching));     }      // Update is called once per frame     void Update()     {              }      IEnumerator SwitchCameras(float TimeBeforeSwitching)     {         yield return new WaitForSeconds(TimeBeforeSwitching);          for(int i = 0; i < freeLookCameras.Length; i++)         {             freeLookCameras[i].en         }     } } 

If I have two or more cameras I want that after X seconds start switching between all the cameras in the array by disabling/enable the cameras. disable the first enable the second then disable the second enable the third and so on.

How do i easily clamp my cameras rotation when using transform.rotate()

I’m making a fps controller, and I’m trying to clamp my cameras x rotation. Here’s my code so far:

using System.Collections; using System.Collections.Generic; using UnityEngine;  public class Player : MonoBehaviour {     // Start is called before the first frame update      [SerializeField] Camera cam;     [SerializeField] float camSpeed;     [SerializeField] float walkSpeed;     [SerializeField] float jumpSpeed;      float yaw;     float camPitch;     Vector3 direction;     Vector3 worldDirection;      Rigidbody myrigbody;     void Start()     {         myrigbody = GetComponent<Rigidbody>();     }      // Update is called once per frame     void Update()     {         camPitch = -Input.GetAxis("Mouse Y") * camSpeed;         cam.transform.Rotate(new Vector3(camPitch, 0, 0));         yaw = (yaw + Input.GetAxis("Mouse X") * camSpeed) % 360f;          direction = new Vector3(Input.GetAxis("Horizontal") * walkSpeed, myrigbody.velocity.y, Input.GetAxis("Vertical") * walkSpeed);         worldDirection = transform.TransformVector(direction);          if(Input.GetKeyDown(KeyCode.Space))         {             myrigbody.AddForce(new Vector3(0, jumpSpeed, 0), ForceMode.Impulse);         }     }     private void FixedUpdate()     {         myrigbody.MoveRotation(Quaternion.Euler(0, yaw, 0));         myrigbody.velocity = worldDirection;     } } 

I know that I want to clamp my cameras X rotation within a range of -89 to 89, but no matter what I try I can’t figure out how to clamp the rotation while using cam.transform.Rotate(). I don’t think I can clamp camPitch, because it is reset every frame, and I can’t figure out a way to directly clamp the cameras rotation. The cameras rotation is not resetting, so if I could somehow clamp it it would work. Is this possible, or do I need to try a different method? How do i get this to clamp correctly?

How to know when the cameras change?

I’m working on a script that uses raycasting from the camera’s perspective to see what the player is looking at. Pretty standard stuff. The only question is, how to reliably find the camera?

Everything I’ve seen says you don’t want to use Camera.main in Update() because performance, so instead you should call it once in Start() and cache it in a field. And that’s great, as long as you can guarantee that the main camera will never change. But what if it does?

What I’d like is to have some sort of OnCameraUpdated event I can subscribe to that will let me know when the main camera has changed, but I don’t see anything like that on the Camera class. Is there any good way to find this out without polling for it?

Do 4k IP security cameras with uncompressed 4k video output exist? [closed]

Are there any companies selling IP security cameras that produce uncompressed 4k RAW video output (to NVR, or even to cal sd-card)? Almost all popular brands compress using H.265 (HEVC) which works great for many reasons (network bandwidth, storage, playback, remote streaming, on and on)

However, my local network resources are not limited by bandwidth, storage, processing power and I’d really love to find a camera that, at the least, saves a lossless 4k version of the video output, maybe to internal sd-card in case of later investigation requiring higher resolution/quality version. I’ve been searching around for about a week now, in various subs here and other places like Security on StackExchange, Discord, forums, etc.

For those that are more list-oriented, I’m looking for something with the following traits:


  • 4k video output, minimum 8 MP uncompressed @ ~32Mbps bitrate (at least to internal sd-card)


  • Wired RJ45/Ethernet connection, with POE.
  • Compatibility with Home Assistant / Blue Iris software
  • Supports ONVIF protocol.
  • Decent viewing angle, but definitely not wide (e.g. not > 180 deg, etc).

I really haven’t found anything out there that meets this criteria, so any suggestions appreciated.

Why it’s never switching cameras and not moving back to the original position the transform?

using System; using System.Collections; using System.Collections.Generic; using UnityEngine;  public class OpenningScene : MonoBehaviour {     [Header("Animators")]     public Animator[] animators;      [Space(5)]     [Header("Movement Settings")]     public Transform target;     public float movingSpeed = 1f;     public bool slowDown = false;      [Space(5)]     [Header("Rotation Settings")]     public float rotationSpeed;     public DepthOfField dephOfField;     public float waitingAnimation;     public float startConversation;      [Space(5)]     [Header("Cameras")]     public Camera[] cameras;      private Vector3 targetCenter;     private bool startWaitingAnim = true;     private bool endRot = false;     private int medea_m_arrebola_index;     private List<int> soldiers_indexs;     private Vector3 originalPosition;      // Use this for initialization     void Start()     {         originalPosition = transform.position;          targetCenter = target.GetComponent<Renderer>().bounds.center;         soldiers_indexs = new List<int>();          for (int i = 0; i < animators.Length; i++)         {             animators[i].SetFloat("Walking Speed", movingSpeed);              if(animators[i].name == "medea_m_arrebola")             {                 medea_m_arrebola_index = i;             }             else             {                 soldiers_indexs.Add(i);             }         }     }      // Update is called once per frame     void Update()     {         if (dephOfField.dephOfFieldFinished == true)         {             PlayConversations.PlaySingleConversation(0);             dephOfField.dephOfFieldFinished = false;         }          float distanceFromTarget = Vector3.Distance(animators[medea_m_arrebola_index].transform.position, target.position);          if (slowDown)         {             if (distanceFromTarget < 10)             {                 float speed = (distanceFromTarget / 10);                 for (int i = 0; i < animators.Length; i++)                 {                     animators[i].SetFloat("Walking Speed", speed);                 }             }         }          if (distanceFromTarget < 5f)         {             for (int i = 0; i < animators.Length; i++)             {                 animators[i].SetBool("Idle", true);                  if (startWaitingAnim == true)                 {                     StartCoroutine(WaitForAnimation());                     startWaitingAnim = false;                 }             }              if (waitinganimation == true)             {                 animators[medea_m_arrebola_index].SetBool("Magic Pack", true);                 waitinganimation = false;                  PlayConversations.PlaySingleConversation(1);             }              if(distanceFromTarget > 10 && BeginningCutsceneTrigger.entered == true)             {                 transform.position = originalPosition;                 cameras[0].enabled = false;                 cameras[1].enabled = true;             }              for (int i = 0; i < soldiers_indexs.Count; i++)             {                 animators[soldiers_indexs[i]].SetBool("Rifle Aiming Idle", true);                 if (!endRot)                 {                     Quaternion goalRotation = Quaternion.Euler(0f, 0f, 0f);                     float angleToGoal = Quaternion.Angle(                             goalRotation,                             animators[soldiers_indexs[i]].transform.localRotation);                     float angleThisFrame = Mathf.Min(angleToGoal, rotationSpeed * Time.deltaTime);                      int index = soldiers_indexs[i];                     animators[index].transform.Rotate(index % 2 == 0 ? Vector3.up : Vector3.down, angleThisFrame);                      // We end if we rotated the remaining amount.                     endRot = (angleThisFrame == angleToGoal);                 }             }         }     }      bool waitinganimation = false;     IEnumerator WaitForAnimation()     {         yield return new WaitForSeconds(waitingAnimation);          waitinganimation = true;     } } 

Maybe the reason is that the player is not in the view range of the other characters ? If I set it to be bigger then 3 it will switch the cameras but not move the transform to it’s original position.

And I want that when the distance is bigger then 10 and the other flag is true then change the transform position and switch the cameras but it’s not working.

This is how I trigger the flag and it’s working I checked with a break point :

using System.Collections; using System.Collections.Generic; using UnityEngine;  public class BeginningCutsceneTrigger : MonoBehaviour {     public static bool entered = false;      private void OnTriggerEnter(Collider other)     {         entered = true;     } } 

which board to use to trigger and acquire data from multiple cameras [on hold]

I am searching for a convenient Board that allows me to trigger camera recording at the same time and acquire data from them at 100Hz frequency. at each 10 ms I acquire one image from each camera (we are planning using 4 cameras). should I search for a microcontroller, DSP, raspberry pi… no processing within the board is expected just switch on (trigger recording) acquire data, switch off I am looking forward to any kind of hint thanks hier a visualization of my question

Upgraded to Unity 2018.4.6f1, many cameras, some with deferred rendering, surfaces now render as white. Very baffling

We have a rather conventional set up to start with:

Main Camera (everything but UI layer, depth 0, deferred, has post-processing)     GUI Camera (only UI layer, depth-only clear, depth 1, forward) 

We also allow screen recording, so we have another pair of cameras, but with different depths:

Recording Main Camera (everything but UI layer, depth -1, deferred, has post-processing)     Recording GUI Camera (only UI layer, depth-only clear, depth -2, forward) 

Before the upgrade, everything worked great. After the upgrade:

enter image description here

We have fiddled a bunch, and results are very peculiar:

  • Turning HDR on with ANY camera will invert the white shading to black shading. enter image description here
  • Disabling any camera will return the game to its proper appearance (obviously not the main camera, since we need that to see anything!).
  • Disabling post-processing on both cameras that have it doesn’t change anything. In fact, post-processing doesn’t seem to be part of the problem at all.
  • Setting the main camera within each pair of cameras to Forward returns that view to normal.
  • Setting all cameras to deferred does not do anything.
  • Moving a pair of cameras, such as the recording camera, to another display returns the game to normal.
  • Setting the lowest-depth camera to deferred and the others as forward renders the game correctly. But putting any camera before the deferred camera causes everything to go white/black.
  • Rendering the recording camera to a render texture returns the game to normal.

It appears that deferred cameras are all sorts of janky now, especially in Unity 2019. Supposedly they have made a whole new ways to layer cameras for a future version of 2019. We wanted to upgrade to 2019.2, unfortunately, 2019 seems to have a slew of issues from rendering to DLL management, and we were unable to upgrade due those issues. 2019.2 wouldn’t have helped us in this issue anyway, because the new layer cameras functionality isn’t live yet.

We are using deferred because we have a lot of lighting effects, and deferred helps frame rate a lot in that regard. Giving up on deferred rendering is unlikely an option.

External USB cameras not working

as the title states, no usb webcams (or even the mics) that I try to use, are working. I can confirm that they do work on other machines, so that’s not the issue. When I run lsusb , they don’t show up.

The internal Webcam works (but not the stereo mics). Also, I’ve checked all of the USB ports that are on this machine with various devices, and can confirm that they themselves do in fact work.

I’ve also performed a few fresh installs. I’m currently running Ubuntu 19.04, with the XFCE desktop (Xubuntu).

If there is any information that I can provide to you, please dont hesitate to tell me. I will (as soon as I can) promptly get it to you by editing this post with the relevant information.

Kind regards, dps