#🎥┃cinemachine

1 messages · Page 2 of 1

coral ingot
#

is there a way to programmatically trigger the cinemachine framing transposer to center on the target object other than just setting the soft zone width and height to 0?

#

Mostly wondering if I can use this method

#

but like from a script attached to the camera

#

looking to center the camera on the target object as a transition but my current implementation isn't quite how i want it

#
    {
        isCentering = true;
        while (_CameraFramingTransposer.m_SoftZoneWidth > 0.005)
        {
            float speed = _CenterCameraSpeed * Time.deltaTime;
            _CameraFramingTransposer.m_SoftZoneWidth -= speed;
            _CameraFramingTransposer.m_SoftZoneHeight -= speed;
            yield return null;
        }
        _CameraFramingTransposer.m_SoftZoneWidth = 0;
        _CameraFramingTransposer.m_SoftZoneHeight = 0;
        yield return new WaitForSeconds(0.1F);
        _CameraFramingTransposer.m_SoftZoneWidth = originalSoftZoneWidth;
        _CameraFramingTransposer.m_SoftZoneHeight = originalSoftZoneHeight;
        isCentering = false;
        if (callback != null) callback();
    }```
#

you can see there is a large delay on the centering when the distance is small between the camera on target object because you need to wait for the bounds to close in before it looks like it actually centers on the target

plain escarp
#

hello guys, i wanted to ask in which situations you create a new virtual cam and in which you change existing virtual cams per script. example: in my game you can crouch, aim and change the shoulder side (third person) so i would now need a camera for each situation, there would be quite a lot, so is there another solution?

fast orchid
plain escarp
# fast orchid That's the whole idea of virtual cameras. You create one for these situations an...

So i should create now 8 gameobject with the virtual camera component?

  1. Normal | Right Shoulder | Aiming
  2. Normal | Right Shoulder | Not Aiming
  3. Normal | Left Shoulder | Aiming
  4. Normal | Left Shoulder | Not Aiming
  5. Crouching | Right Shoulder | Aiming
  6. Crouching | Right Shoulder | Not Aiming
  7. Crouching | Left Shoulder | Aiming
  8. Crouching | Left Shoulder | Not Aiming

These are the 8 combinations that i could have

fast orchid
#

Yeah, sure. Or just four and modify the values of the camera before switching it on.

plain escarp
iron sundial
#

hello, is there anyway i can change this via script?

#

I want to like create a zooming out effect.

iron sundial
loud axle
#

I have a collision impulse source component on each of my enemies that is triggered when i hit them
I don't want to trigger it through code because I want to use impact direction
The more they are, the biggest my screen shake is.

Is there a way to merge the values from the different screen shakes happening at the same time to keep the same intensity ? Because at the moment the intensity of the screen shake becomes too intense because it's additive

royal tartan
#

e.g. in your collision script have it call a method on the "ShakeManager". The ShakeManager makes sure only one shake is happening at a time.

empty nacelle
#

Can i get an Event when a timeline-director thing has stopped playing?

raven monolith
#

you subscribe to onstopped event from the playable director

civic sail
#

I'm using the cinemachine 2D camera and normal Cinemachine Confiner in 2D mode with a polygon collider, and for some reason the confiner is allowing the camera to move past the bounds but only horizontally?? (I'm using a pixel perfect if that affects anything)

#

I've also tried using the cinemachine confiner 2d and it has changed nothing

wet siren
#

is it possible that your polygon collider is too small? hard to tell from the screenshot, but perhaps enlarging it might be a worthwhile experiment

#

I'm having a different issue with the confiner, moving here from #🖼️┃2d-tools since it seems to be a better place to ask cinemachine-related questions:

I'm using a Cinemachine Confiner 2D in an ortho perspective and all is working well - except getting the _mainCamera.ScreenToWorldPoint(_inputSystemMousePos); now does not return the expected coordinates when the player is at the edges of the world, i.e. when the confiner constrains the camera.

Essentially the camera now stops at the world boundaries (expected, awesome)
... but grabbing screen coords with ScreenToWorldPoint returns a world position akin to a camera that hasn't stopped at the world boundaries (unexpected), which messes up my mouse input coordinates.

Is there an easy way to compensate for that shift?

wet siren
#

hmm, the easiest solution for me was to switch to ProCamera2D, which solves the issue out of the box (using geometry boundaries extension for constraining the camera)

shut bough
errant shard
shut bough
#

nvm i fixed it

echo siren
#

Can Cinemachine be used for 2D games? Since I need to do camera work there with Unity for our game. Specifically, basic pans to specific objects and then back to the player.

echo siren
#

Since I'm not sure where to ask for help with camera work.

coral ingot
#

I've got this weird graphical jittering motion going on with some of my models and I think it may be because cinemachine is continuining to move by tiny amounts at all times and never comes completely to a stand still even though its target object is no longer moving and is not in the dead zone. any ideas on how to fix this? Is there any way to get the cinemachine camera to come to a complete stand still with no movement?

https://streamable.com/mumup6

#

when disabling the cinemachine brain from the actual camera object this jittering behaviour stops (because the camera stops moving I suppose)

errant shard
half shuttle
#

is there a way to use the pixel perfect camera on a render texture produced from a non-pixel perfect camera?
as using a pixel perfect cam on a camera that creates a render texture has a con of not being able to easily zoom in and out

half shuttle
#

unrelated but probably easier:
when using the confiner 2d I'm trying to get my camera to try not to move vertically or horizontally when it is within the bounds, however for some reason it can move up and down freely

#

as the camera is bigger than the bounds, so it should stay in place, unless I am misunderstanding this completely

#

however when I move the lower bounds higher up, it now allows me to move the camera horizontally

rain basin
#

Is there actually a built in first person camera or not because I’ve heard there is but there’s only one tutorial on it I can’t watch because crappy internet rn

bronze moon
rain basin
#

Doesn’t do anything for me

#

I guess it’s best if I just resort to scripting one instead

bronze moon
deft junco
#

How can I rotate the camera horizontally slightly automatically when walking/movement while using Framing Transposer and POV?

cyan gull
#

when I do _virtualCamera = _brain.ActiveVirtualCamera as CinemachineVirtualCamera; I get null. even though I have a camera thats active. but if i click on a camera under my state camera and click "Solo" the LIVE turns yellow, and now when I do the above code, I get the Name of my virtual camera. How do I get that active camera without solo?

#

this virtual camera is live, but the above only seems to recognize if i solo it?

#
        protected virtual void GetCurrentCamera()
        {
            _mainCamera = Camera.main;
            #if MM_CINEMACHINE
            _brain = _mainCamera.GetComponent<CinemachineBrain>();
            if (_brain != null)
            {
                _virtualCamera = _brain.ActiveVirtualCamera as CinemachineVirtualCamera;
            }
            #endif
        }
#

hitting 'solo' the code works, no solo, no golo? 🙂

royal tartan
#

ActiveVirtualCamera returns ICinemachineCamera, which is not necessarily a CinemachineVirtualCamera

#

If it's not a CinemachineVirtualCamera you'll get null, because that's how as works

#

In fact it's probably returning your StateCamera

#

which is a CinemachineStateDrivenCamera

cyan gull
#

Ok so cast correctly etc. 🙏 thanks

#

So when I solo it’s a virtual camera

royal tartan
#

I'd say more like... Use the type you actually want

cyan gull
#

But when it’s normal it’s a state.

royal tartan
#

Can you get away with ICinemachineCamera?

cyan gull
#

Right ok thanks. I converted from a single virtual to a state

#

I’ll try it.

#

CinemachineStateDrivenCamera worked

#

because I am using .transforms below it doesn't like casting as ICinemachineCamera

#

but as CinemachineStateDrivenCamera its perfect

#

camera rotates on all my state cameras now

#

thanks boss! @royal tartan

royal tartan
#

You can use that

cyan gull
#

ah ok so you think ICC is better?

#

because then it would work with virtual and state?

#

like more universal?

cyan gull
#

k let me try that one too 🙂

#

ok thanks! that also worked, so I will use that,... that one worked with normal, and solo, and etc etc so thanks again!

knotty surge
#

hey im trying to add a 2d camera but all the options r grayed out and also there is no 2d cam 😢

#

can someone please help me and tell me how to add one?

half shuttle
tulip topaz
#

how do i make a first person camera and linking it up with a script so i can get my player rotation depending where im looking all the tutorials im watching are either 3rd person or they make it way too complicated than it needs to be

royal tartan
tulip topaz
#

maybe i said it wrong but what i meant is i think what they are doing could be simplified

lone storm
#

How can i move virtual camera, i put it into an empty but when i move empty it is not effecting the camera view]

fast orchid
#

Does the camera have a brain component? Is the virtual camera you're working with set to a higher priority than any other virtual cameras in the scene?

barren ingot
#

I am trying to have cuts in my unity timeline and it works completely fine when working on it but in game when a camera is activated it moves to the activated camera

#

how do I prevent this

royal tartan
lone storm
lone storm
royal tartan
#

the Freelook cam

#

that one is active currently

#

You can either press the "Solo" button on this camera's inspector to force it to be active in the editor, or make sure its priority is the highest among all cameras if you want it to be the active camera

fossil karma
#

I am trying to have a racing game, and I want the camera to turn a little later than the car, so the player can see the side of the car, how can I achieve this?

royal tartan
fossil karma
primal ridge
#

For some reason, all my cinemachine cameras are unable to follow moving objects

#

Specifically a moving rigidbody I’m using

#

Anyone know why?

royal tartan
# primal ridge Anyone know why?

How did you set them up to follow the object(s)?
How have you confirmed they are indeed not following the object(s) in question?

primal ridge
#

Slowly falling behind as it goes

royal tartan
primal ridge
#

It isn’t staying at the right distance

#

Or any distance at all, really

royal tartan
primal ridge
#

Default follow settings for a free look camera.

#

Dragged & dropped the object to follow in

royal tartan
#

You can't just rely on the defaults if they don't work for you

#

Also you didn't mention it was a freelook before.

primal ridge
#

Virtual cameras don’t work either

primal ridge
royal tartan
#

Without seeing any details it's hard to help

primal ridge
#

Is there a node I need to make it maintain distance or something

royal tartan
#

Also a video of the behavior you're seeing might be useful

hard umbra
#

Is there a way to control cinemachine so a camera orbits around the player when I push the right stick?

#

I know how to do the input but how do the rotating around the player part

molten palm
#

Does anyone here play Cities: Skylines? What sort of camera would you say that game is using? How does one go about achieving that with Cinemachine?

gritty tangle
#

Does anyone know why the virtual camera that is looking at a ball always rotates with it?

fast orchid
#

@gritty tangle Don't crosspost. This is the correct channel for cinemachine related questions.

gritty tangle
#

Sorry, I was using the other channel because it seemed more active so I assumed I'd get help there quicker

#

But I'd really like to know how to fix my issues because i need that to be fixed in order to properly use my other functionalities in scripts

#

Seem to have fixed it someway with a code that puts the rotation of the referenced gameobject to 0 all the time

gritty tangle
#

is there a way to lock the input from the XY Axis of the cinemachine virtual camera with another input action or any other way?

royal tartan
#

what do you mean by "lock the input from the XY Axis of the cinemachine virtual camera with another input action"?

#

Like use a button to enable/disable it?

warm verge
half shuttle
#

What is the best way to stop a virtual camera from moving in a certain direction?
As I have this invisible wall (marked in red) that I would want the view to stop on

half shuttle
#

the confiner confines it within a polygon shape, is there a way to stop it only in a single direction?

#

(unless I'm misunderstanding how the confiner works)

royal tartan
#

Just use a giant BoxCollider2D with the left edge at your invisible wall and the right edge somewhere a couple thousand units to the right

half shuttle
#

ah alright, thought there would be some more elegant solution, thank you

royal tartan
#

There might be 😛

half shuttle
#

for now this works pretty well

gritty tangle
# royal tartan Like use a button to enable/disable it?

pretty much that yea. Im making a very cheap knockoff billiard game where i have to use some really old flimsy controller (i have to due to an assignment) and its joysticks are very flimsy so id like to have a way to "stop" the camera from rotating around the object that i set it to to basically "determine" from what angle I want to push the object (in this case the white ball you hit in any other billiard game ever) from

#

i have an action map that is basically just a button with which i would love to stop the virtual camera with

royal tartan
gritty tangle
#

I am not using that input action right now, i meant that i want to use that specific input action to stop any kind of movement if that is possible around the white game ball

gritty tangle
#

Or rather, is there a way to stop it from always centering itself when i dont move the camera?

royal tartan
#

that will stop any rotatio

#

you can also disable the input provider

gritty tangle
#

Im sorry if this is getting tedious for you but i want to use that input action to make the camera rotate around 😅

#

during gameplay

#

and have some way to just stop it temporarily without having to turn off the Input Provider manually

royal tartan
#

Yeah, I've described how to do exactly that

lone storm
#

I am having this problem when i play it goes to original position any help for that.

lone storm
#

no help ?

flat radish
smoky swan
#

Hi, has anyone seen an issue using the provided 6d Shake and the normal map of sprites seems to go crazy? it doesn't stay with the sprite.

safe narwhal
#

Hey, i'm using cinemachine and have this simple script to switch between cameras based on whether the player leaves the camera collider bounds or not. however i've found that it sometimes it switches to the wrong camera or it'll keep switching between two cameras in a loop even though their colliders don't overlap. here is the script:

#
private void OnTriggerEnter2D(Collider2D collision)
    {
        thisCam.enabled = true;
    }
    private void OnTriggerExit2D(Collider2D collision)
    {
        thisCam.enabled = false;
    }
royal tartan
#

you'll want to consider and account for that case in your code

safe narwhal
#

as a sidenote ive also noticed my cameras work if i enter them in the order i created them. all the priorities are the same so is there some other value that unity considers when deciding what is the next best cam to switch too?

plain sinew
warm verge
#

Probably because it looked to straight up and that interferes with your code responsible for max look up

#

(If you have a max look up)

plain sinew
#

its just an animation (the initial look up)

#

its not vertical look up, there is an angle to it it is vertical. Let me tinker

#

yep, even with an angle its still flipping for some reason

warm verge
#

Maybe when the object is spawned in it somehow interferes with the camera movement

#

As the camera doesnt know what to focus on for a split second

plain sinew
#

I'm not really sure what the problem is, which is why i'm asking here

royal tartan
#

If not it defaults to straight up which will be a problem if you're also looking straight up

plain sinew
#

second param? i only saw m_lookAt = someTarget ultimatily i solved it by not using cinemachine lookat, and just keyframing the rotation within my Timeline

smoky swan
worldly wagon
#

Greetings my cinemachine camera is mostly working fine but in some random moments that happens very rarely it looks like my camera pulls back like by 10 units then instanlty snaps back and i cannot replicate whats causing it

#

Any ideas what this could be,using a rigidbody

royal tartan
worldly wagon
#

nope

#

tried with it on an off

sinful hawk
#

Hey, can anyone show me a decent tutorial on how to use cinemachine correctly for a 3d person combat?

#

I can set it up and use it, but I am not satisfied with the camera movement.

#

I really would love to have simple camera movement (limited orbiting), and then another correct combat camera with cinemachine.

oak bane
#

when i come out the "Kitchen" at an angle the camera also follows the player at an angle

#

i want it to always be centered to the player anyone know how to fix it?

#

btw i switch between cameras by script by enabling the gameobject or disabling it depending on if the players in the kitchen or not (2 virtual cams)

oak bane
faint axle
#

When using screenshake, is it possible to use ScreenPointToRay such that it ignores the shake?

If I could get the current shake vector I could subtract it from the ray origin and that should work.

#

I'm not sure what the difference between "raw" and "corrected" is

errant shard
tawdry olive
errant shard
errant shard
royal tartan
hard umbra
#

Hi, is it possible to have a free look camera default to high rig, every time i hit play, when I have High rig selected it defaults to mid rig every time

#

without using code or does it just default to mid rig and that's the way it is

#

Also, when I move left and right the camera starts to rotate around the character when I don't want it to

faint axle
#

I'm using the framing follow movement

#

Or do they keep moving around even when the camera is not following them?

#

Regardless that feels like a worst case scenario fix and it would break down if I was doing any blending.

royal tartan
#

to control whether they update when not active

#

It's called "Standby Update"

#

You could set yours to Always

#

but yeah

#

I don't think it's the best solution

faint axle
#

Damn there must be a way. Do you know anything about this "raw" and "corrected" position stuff? Maybe I should just ask on the forum

#

The developer seems pretty active

royal tartan
#

Yeah I'm not sure. What are you using for the shake? Impulse Listener?

faint axle
#

I don't want to start implementing it until I'm sure I can do it without disrupting gameplay.

#

Hm. Actually I could use another hack... I could child a second camera to the brain, shake it independently in local position, and toggle it on while any shake is happening.

#

But I'm not looking for hacks haha

worldly wagon
#

anyone know how i can achieve a camera setup like this with cinemachine?https://www.youtube.com/watch?v=kmOD9ia2n24&t=89s&ab_channel=IGN

IGN

Check out some tracks from the Wipeout Omega Collection running in 4K 60fps.
Watch Everything from PSX 2016 here!
https://www.youtube.com/watch?v=BVolJ3L15lM&list=PLraFbwCoisJDGNMvYoK8UTa1LlMgUhY0U&index=2

Check out our PlayStation 4 Pro Review:
https://www.youtube.com/watch?v=jfVCn8qJ690

While you're at it, catch our PlayStation VR Review her...

▶ Play video
raven monolith
#

give specifics

worldly wagon
#

when the craft goes left and right for example

#

like the camera doesent look at it but still follows it

raven monolith
#

that's damping

#

3rd person follow body setting

#

on virtual cam

worldly wagon
#

thx alot

#

will see how i can make it work for the ship

quiet kestrel
#

Has anyone experienced the CInemachine Collider script causing a ton of jitter when colliding with steep terrain, and also sometimes going through the terrain? I'm using Unity 2022.2.1f1, see attached screenshot for the problem. The camera is colliding with the terrain regardless of the camera radius.

royal tartan
#

stuff like "Preserve Camera Height" if enabled are going to cause you a lot of issues on steep terrain

lucid patrol
#

I'm having a problem with camera related stuff.

I was trying to make a headbob but then i realized this was really messy and could probably be optimized but im having to make a weapon sway on an object and then the recoil on another object and so if i keep doing this it will just look like garbage

So yeah the only thing i thought of is if Cinemachine would help with this.

Please reply so that i know someone responded. Thanks.

soft laurel
#

Hello I'm following this tuto and I don't get how to change camera?
https://youtu.be/Jv9jGyIWelU?t=167

Welcome to the Prototype Series - a group of videos that focuses on the creation of playable prototypes, showcasing how multiple features of Unity can be used to achieve game mechanics that can be used in real-world scenarios!

Is there some game mechanic that you would like us to try and prototype? Let us know in the comment section!

Download...

▶ Play video
fast orchid
#

You linked the moment where they do, by changing the priority of the camera.

candid briar
#

yooo, didnt on youtube channel they said cinemamachine 3.0 will be available from unity 2022.2 if preview bundles are turned on?

#

oh nwm, it seems they changed that it will be onlfrom 2023 X.x sadness

raven monolith
#

They said 3 would've have many new features

#

Just api variable names and workflow are changing

flat radish
#

There was a video on it - sounded like one thing that was changing is more special purpose components rather than a mega-engine. So a more "Unity-like" code base where you pick the components that do what you want, rather than mega components with different options to change how they behave.

azure cliff
#

I am having issues with the CinemachineVirtualcamera, i got the Starter Asset first person character controller, it does basically everything i need, but my camera movement has some problems, when moving the mouse slowly absolutely no cameramovement is registered, i changed the Aim mode to POV since this gave it a nice cinematic look which resolved that problem, but now my character moves in very strange ways, i don't know how to fix this and i need some help, resolving the problem with the camera not moving is a bigger priority than the cinematic look in the POV mode
edit: nvm, i found the problem, there was a threshold varaible in the controller script which blocked movement which was too slow

warm verge
#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class move : MonoBehaviour
{
public float speed = 6f;

public float jumpspeed = 8f;
public float gravity = 20f;
private Vector3 moveD = Vector3.zero;
CharacterController Cac;

// Start is called before the first frame update
void Start()
{
   Cac = GetComponent<CharacterController>(); 
}

// Update is called once per frame
void Update()
{
   if(Cac.isGrounded){
     moveD = new Vector3(Input.GetAxis("Horizontal"),0, Input.GetAxis("Vertical"));
     moveD = transform.TransformDirection(moveD);
     moveD *= speed;

     if(Input.GetButton("Jump")){
        moveD.y = jumpspeed;
     }
   } 
   moveD.y -= gravity * Time.deltaTime;
   transform.Rotate (Vector3.up *Input.GetAxis("Mouse X")*Time.deltaTime * speed * 30);

   Cac.Move(moveD*Time.deltaTime);
}

}

errant shard
#

@warm verge Please formulate a question and do not dump unformatted code

warm verge
#

i dont like when the camera turn like its not rlly smooth

errant shard
# warm verge i dont like when the camera turn like its not rlly smooth

It looks like the character is using root motion to move (or otherwise being moved independently), but its parent object is being rotated from input, so it also gets increasing translational movement when turning which the vcam struggles to keep up with
Hard to tell from the video what motion is happening and what isn't since the floor is featureless

modest venture
#

Suffering a weird glitch where, when I move my mouse Diagonally, or point a Xbox controller's analogue stick in a diagonal direction, the X value of my Freelook will jump by about 60 units in either direction. Only happens on the diagonal movement. I think it might have something to do with switching to the different rigs.

#

So, paying close attention to the X values, I notice it happens when I pass over 180 or below -180.

zenith ibex
#

am I the only one that finds cinemachine utterly baffling with all the options?

raven monolith
#

no

#

takes a while to get used to it, but once you play around with it enough it's like second nature

zenith ibex
#

I have an issue where my camera, when tracking a fast moving object, either slowly looks up or down and the target goes out of shot

#

i kinda just want it to work like an orbit camera with damping (as the target is moving with quite a bumpy motion)

zenith ibex
#

but based on what youve said ive deleted it and trying to isolate the things one by one, save during play is also a discovery

naive river
#

How to fix jittering problems on free look camera?

zenith ibex
zenith ibex
warm verge
#

I'm having some trouble installing cinemachine
I installed it from the package manager but it doesn't appear in the top bar

#

tried restarting unity but it didn't help

#

oh i haven't read what it says in the description and I deserve any insult I get

bronze moon
main jackal
#

The red guides in the game tab dont appear and "Game window guides" is checked

sick herald
#

Hi everyone, I'm wondering how does a line like this work: Camera.main.gameObject.TryGetComponent<CinemachineBrain>(out var brain);
What is considered the Camera class here?

#

Would that be in my main camera or my player object's virtual camera

errant shard
#

Vcams are not cameras and can't have the brain component

sick herald
#

Thank you! That link also showed that I had to set MainCamera as a tag

royal tartan
sick herald
#

Wonderful, thanks everyone ❤️

#

I have another question 😄

#

I'm not able to set transport here on the body of the vcam:

#

Nothing happens when I choose any of those options

royal tartan
#

wdym by "transport"?

sick herald
#

"Transposer" sorry

royal tartan
#

Do you have a follow target selected for the vCam?

#

If there's no follow target then the body setting won't do anything

sick herald
#

My game looks like this:

#

Yup

#

I have a follow and a look at at the same player object

royal tartan
#

Are you sure this vCam is the active one? Press Solo on it in the inspector to have it take over as the primary for testing

sick herald
#

I don't see solo as an option

royal tartan
sick herald
#

is that a good idea?

royal tartan
#

is that main camera even in existence in this context?

#

are we looking at a prefab here for example?

sick herald
royal tartan
#

yes that's your scene

royal tartan
#

what object is this attached to

#

looks like one of your prefabs

sick herald
#

The player object

#

So the kart

royal tartan
#

right, which isn't in the scene

sick herald
#

Yes a prefab

royal tartan
#

you'd have to pull it into the scene for now

#

to test it

sick herald
#

It's spawned with Mirror

royal tartan
#

pull it into the scene directly for the moment

sick herald
#

Ok

royal tartan
#

just to test the camera settings

sick herald
#

Pressing solo isn't doing anything

royal tartan
#

where are you looking

sick herald
royal tartan
#

ok so

#

looks like it's working fine to me

#

the camera is on the player, no?

sick herald
#

The vcam is

royal tartan
#

yes

#

so what's the issue

#

remember I can't see your project, so any additional screenshots etc to illustrate the issue will be helpful

sick herald
#

Ok, I didn't want to over flood the chat

#

I guess at this point I may just need to set the offset

#

Because currently the game is looking from under the car instead of over

royal tartan
sick herald
royal tartan
#

i don't know what you're doing

sick herald
#

I have this Kartclassic prefab, and I'm trying to add "transposer" as a body in the inspector

sick herald
#

I can't change the height of my virtual camera and it looks awkard at the moment:

#

Changing the transposer offset or damping isn't doing anything

#

The camera follows the player, MainCamera says it following the VCam, but when I click "solo" on the vcam, then the camera changes and I'm able to edit the offset values

low dove
#

Hello, I am looking for a way to create a confined camera system using cinamachine. I have got all the confinement working, but how do I snap my camera back and force between confined zones. I would prefer not to use multiple cameras for this by the way unless it's the only solution.

errant shard
low dove
hot lodge
#

Hope you guys are well.

I am getting a strange camera jitter when my character sprints? It seems to bounce from its usual spot to inside my character spontaneously. (Best visualized ~15s in the video)

royal tartan
hot lodge
#

Oh yea that was it, thank you!

#

Is there a way to use math functions when a class not derived from monobehavior?

royal tartan
#

which functions exactly?

hot lodge
#

I got it actually, thank you though

iron sundial
#

Hello, Is there any extension in cinemachine cam that allows me to turn off and on the noise? i want to add camera shake on condition

coarse elbow
#

why is my terrain like this, I've tried changing camera destance, it somehow worked but it only decreased it and still won't fully render the entire terrain

errant shard
coarse elbow
errant shard
# coarse elbow I see, thank you!

More specifically if it's a follow camera you'd add more follow distance in vcam's settings
Orthographic camera's near plane can be adjusted to determine where the near clipping happens, but obviously it can't happen behind the camera's physical location

coarse elbow
errant shard
errant shard
# coarse elbow so by manually doing it?

That depends what controls the position of your vcam in Body settings
If it's not basing its position on anything, then you'd manually move it
If it's following a character then you can change the follow distance in the Body settings

coarse elbow
zinc stream
#

hi so whenever i enable the third person camera free look it just flys at 3000km/h

coarse elbow
#

help, when I imported this model to the scene, the camera starts following it and ruined the isometric view, anyone know what's the issue?

#

oh wait I think I figured it ou

#

nvm still happening

#

OH I FIGURED IT OUT

low dove
#

Is anyone aware of a way to make a camera ledge detection system where when the player gets close to a ledge, the camera moves downward?

errant shard
#

You need to work that stuff out in design to know what kind of a ledge system you start making

#

Ledge climbing systems have to deal with similar challenges so those resources might be useful here as well

low dove
open verge
#

Hi all,

I’m making a 2d platformer where my ledge climb ability involves teleporting from the start to end point. This is causing the camera to jerk when the player changes position.

The problem can be fixed by increasing damping, but ideally I want to tell the camera where the player appears to be and move to the new location with them. I think this will feel more exciting than updating the position at the end smoothly.

Does anyone know of a way to trick the camera into following the animation’s position during the ledge climb rather than the player itself please?

Many thanks

royal tartan
open verge
royal tartan
open verge
tall rampart
errant shard
undone crow
#

Is there a way to force camera center after the target leaves the dead zone? Right now when the target leaves the dead zone the virtual camera will move the minimum to fit the target in the dead zone again. I hope my question is clear enough

#

it's more like a stepped move, the camera won't move until it's needed and when it's needed it will move enough to recenter

trail mica
#

i am tring to use the pixel perfect camera with cinemachine, someone knows why this is happening?
i am using the pixel perfect camera extension for the virtual camera
also i am using urp

trail mica
#

i had an the background set to uninitialised bruh

tall rampart
#

yeah that was it thanks, god damn sometimes using pixel art in unity feels like a checklist

errant shard
jade karma
#

Does anyone know what cause this? im using Cinemamachine and using corgi engine... with URP?

#

ooh nvm i found it, its because i set camera using SkyBox..

rough bramble
sick herald
#

My camera follows the player, but I cannot change it's damping and offset. And the main cam says it's using the vcam.

However, if I put "solo" on the vcam, then the camera changes position and I'm able to change the offset and dampness, but the camera doesn't follow the player.

#

Oh, looks like my player has a separate vcam game object for some reaosn

#

I'm not really sure why the player is spawning a separate virtual camera with the same name as a virtual camera with as the same name and is a direct child of the scene

errant shard
sick herald
#

I was thinking that

errant shard
#

A vcam is just a gameobject with a component, it doesn't have any special control over its own existence

sick herald
#

This is just a child of Mirror's NetworkManager

pliant trellis
#

I'm using cinemachine for a 2D game im making in a unity C# course, but when i added the camera and had it follow an object, it the camera followed choppily. is there any way i can make it smoother?

#

i just noticed that the enviroment around the ball that the camera is following is looks completely smooth, but the ball itself appears to move choppily.

bronze moon
pliant trellis
#

there is no code

pliant trellis
tender laurel
#

havin a horrible time trying to position this camera... its always just staring at her legs... any suggestions?

flat radish
#

Has anyone tried 2022.2 with Cinemachine 2.9.2? (I added the "3D Characters and Animation" feature set.) My problem is when I have a cinemachine camera referencing the main camera, the cinemachine camera is turning off the "physical camera" setting when Lens / Advanced / Mode Override is "none". If I set the mode to Physical, then the physical camera is turned on. This is different to 2022.1 where a Mode Override of none does not modify the physical camera checkbox. Does this seem like a bug?

final patio
#

Is it possible to freeze the Y axis on cinemachine 2d so that it follows an object but only on one axis?

pliant trellis
pliant trellis
#

im just using the follow part of the cinemachine virtual camera

bronze moon
pliant trellis
#

Alright, i just did that and now its less choppy but its still choppy

bronze moon
pliant trellis
#

sure

#

here you go

pliant trellis
bronze moon
pliant trellis
willow vapor
#

how can I get the camera to tilt in this direction?

#

basically just spinning the viewport, like this

#

rotating the Look At object doesn't work on at particular axis for some reason

bronze moon
willow vapor
#

I believe it's because these transforms are determined by the CinemachineVirtualCamera component

bronze moon
#

Look At*

willow vapor
#

as mentioned before, I have a Look At target, but rotating that object doesn't work

#

it seems that only rotating on the Y axis has an effect, but that's not the correct axis

bronze moon
willow vapor
#

that won't work, since I want the camera to be constantly rotating throughout the entire game

#

I really don't want Look At to be disabled completely

#

can I not have the rotation and Look At at the same time?

bronze moon
willow vapor
#

In case anyone else has a solution, this is simply the effect I'm trying to achieve

#

something as advanced as cinemachine surely has a feature that allows this

willow vapor
#

@bronze moon finally found it!!! It was this setting all along

bronze moon
# willow vapor <@286722279969259520> **finally** found it!!! It was this setting all along

Dutch angles are technically meant for tilt in cinema, but glad it worked out lol
https://en.wikipedia.org/wiki/Dutch_angle

The Dutch angle, also known as Dutch tilt, canted angle, or oblique angle, is a type of camera shot which involves setting the camera at an angle on its roll axis so that the shot is composed with vertical lines at an angle to the side of the frame, or so that the horizon line of the shot is not parallel with the bottom of the camera frame. This...

open terrace
#

Anyone experienced a freelook camera which doesn't rotate smoothly with mouse movement?

#

Acts like half the time it's not seeing the input

#

I don't think I have anything unique set up here.

#

It'll move a bit, pause, move a bit, pause. Or, other times, it acts like when the mouse is at the edge of the screen there's no input.

#

Seems like in the editor it isn't seeing the input unless I'm hovering the unity editor UI as I move around actually.

royal tartan
open terrace
#

Works a bit better with a fullscreen game window

#

I'll look

#

Just mouse axis inputs.

#

If this is what you mean

#

That what you're refering to @royal tartan

royal tartan
#

Sure. Have you tried messing with any of those settings?

open terrace
#

I actually think these are the defaults 🙂

red lodge
#

Hi everyone, is there a way to create a delay and smooth follow with Cinemachine please? Can't seem to find what I want on Google

#

^^"

rough bramble
#

I have a scene with a waterslide. I wish to code collision detection to keep the camera in the ideal spot while moving down the waterslide behind the playerObject.

Can anyone point me in the right direction?

Which methods to use? A video explaining how to code collision detection, etc. .

royal tartan
royal tartan
rough bramble
rough bramble
#

When im using the default cam which i think is the body worldspace setting on the regular transposer, everything moves correctly with WASD.

When using the framing transposer, WASD no longer moves the ball relative to the camera

#

Not home atm but i can make a video showing an example of what i mean in an hour or two

royal tartan
rough bramble
#

Good question. I followed a tut for the playercontroller and cameracontroller and am not at a level of understanding yet to solve these things on my own.

#

Maybe the video i upload in a little will shed more light. I am sure i am not communicating this properly.

open terrace
#

Switching toggling the game view maximization on and off seems to fix it sometimes.

red lodge
still valve
#

Hi I'm new here. I was wondering how I could adjust the Aim horizontal and Vertical damping on a CinemachineFreeLook dynamically from a script?

errant shard
#

There's a thread with instructions by Gregoryl for almost any cinemachine questions it seems!

still valve
#

Hmm, saw this but still don't see any impact. Will check my script again in a bit. 😅

Yeah Gregoryl is on almost all of them now 😄

Thank u btw

nocturne stirrup
#

Hey, I have a cinemachine camera. I would like to change the distance. I tried to put a transform further than the Z transform i had before, but it still doesn't work :/ How can I change that?

nocturne stirrup
#

i have a 2D platform game

#

i need the camera to be further

royal tartan
#

I didn't really ask what kind of game you had, I asked what distance you wanted to change

nocturne stirrup
#

of the camera

royal tartan
#

Follow distance?

nocturne stirrup
#

on Z axis yeah

royal tartan
#

Go into the follow settings for the vCam

#

and change it

nocturne stirrup
#

wait i'm gonna try it

#

Where are the follow settings?

#

The settings button just give me this

royal tartan
#

Sorry I meant "Body" settings

#

expand Body

nocturne stirrup
#

okay

#

i've already change "camera distance", but it doesn't work

#

this is the vision of game with 4 as camera distance

#

And this is when i put 30..

#

Ok i just found out, i just changed "ortho size"

warm verge
#

guys how do I get my cinemachine camera to point towards my cursor. I looked it up and it only gave me 2d answer I need 3d answers.

royal tartan
#

pointing camera towards the cursor doesn't make a lot of sense because turning the camera then also moves where the cursor is in the world and so on

warm verge
#

yes I just want my player to point in the direction of my cursor which I have setup but I dont know how to make my camera point towards cursor

#

im making a fps game its my first ever game so Im pretty clueless rn

royal tartan
#

Again, can you elaborate?

#

Ok you're making a fps game

#

that has nothing to do with cinemachine really

#

you'd basically set your vCam to do nothing

warm verge
#

ok someone said to use cinemachine idk what it does

royal tartan
#

just follow any existing FPS tutorial

#

there's hundreds of them

warm verge
#

ok

pastel wagon
#

How to even use that ? I really want to make real time cutscenes

#

But i dont know how to activate a camera for a cutscene

rough bramble
#

How? Idk. I do know that you can do that tho

#

I think theres youtube vids

rough bramble
#

Can anyone give me a hint at how to make the camera swing behind my ball when i look around with the mouse instead of what it is doing in the video?

royal tartan
rough bramble
#

got someone to figure it out and explain it to me

rough bramble
royal tartan
#

no idea because IDK how you set that up in the first place

errant shard
#

There's countless ways to smooth a change of position over time

rough bramble
errant shard
# rough bramble marvelous. whats the best one to instantiate in the case of a roll-y ball physic...

What's "best" depends on how you want it and what challenges there are
For the pipe in particular you could utilize damping the position change, interpolating it, extrapolating it and/or normalizing the distance to the follow target
Many of those variables can be used together, but I'm assuming here that you can't improve that jittery following
Ideally you would just have a less jumpy collision detection to minimize the need for fancy smoothing

rough bramble
#

with some tweaking of the knobs given by the cinemachine plugins I achieved a pretty OK result shown in this video, the only remaining issue would be that big jerk around sharp corners.

summer pulsar
#

I know you can create a virtual camera where your editor camera is, but can you do the reverse? can i set my editor cam to a virtual cam perspective i already have

royal tartan
slender plank
#

Emmmmm, is there any problems with unity 2022.2.2 and cinema machine? as after update stuff went mental. Even cinema machine examples became like this:

Which does not mean anything good 😄 I would understand that changes which will be in 2023 would be active that would be noticable, but now it is bit weird

#

And it forces to remake every single virtual camera O.o

worldly wagon
#

I am 2022.2 with cine no probs here

nocturne badge
#

hi guys, i need some help with cinemachine as ive added what i need to and have my player set up correctly, everytime i add my player to the look at and follow tab the camera is wayyy off where i need it to look, the image is what its doing atm

#

okayyy i see what went wrong

main jackal
#

Can I lower the camera smoothing in cinemachine? (2D)

errant shard
main jackal
#

Oh,thx

#

Is it in the brain or in the cam?

#

I can't see it

errant shard
rough bramble
#

How do i specify which is which in the GetComponent method to make sure the variables are assigned correctly?

errant shard
rough bramble
#

that is what i ended up doing. thank you

final terrace
#

for some reason after adding cinemachine to my project my code is no longer getting the right mouse to world position, anyone know how to deal with this?

#

it seems off by a lot when above the center of the screen

#

on the left or right its more accurate

final terrace
covert pumice
#

I'm not sure what is causing it, I have tried making a new vcam as well and the problem still persists

hushed garden
#

When transitioning between cameras, How do I make it change both rotation and position at the same time instead of moving then rotating?

stark nimbus
#

im trying to create a camera controller that is top down, but the more you zoom in the more vertical it becomes anyone know how??
or any tips to get me started

errant shard
stark nimbus
#

the mixing camera?

stark nimbus
#

ok ill have a look thanks

stark nimbus
#

nvm i found it

#

ok im confused

#

how th do i use mixing camera to slide into a horizontal perspective

errant shard
stark nimbus
#

not a single smigin

#

did chat gpt tell me what to do correctly

#

Im new to coding as a whole just trying to make a similar camera to supreme commander forged alliance

errant shard
stark nimbus
#

k

errant shard
stark nimbus
#

im moving my vcams'

#

but its moving my actual cam

#

wth

errant shard
# stark nimbus wth

Which is why you need to read the docs to understand why it works as it does

stark nimbus
#

those docs just confused me

errant shard
#

Then it won't help if I tell you the exact same things as in the docs

stark nimbus
#

alr theres 1 way u can help me

stark nimbus
#

ik using smoothdamp() i can make the merge between but rn i just wanna get it to insta switch then ill add the smoothness

#

wait

#

im dumb

#

weights

errant shard
#

I really don't want to help anyone who insists on using chatbots instead of reading the docs so best of luck to you

stark nimbus
#

whatever man ai is the future

stark nimbus
#

like whats the link

stark nimbus
#

i added them to a targetgroup now how th do i change their weight

short frost
#

https://www.youtube.com/watch?v=yu89OznvmhQ idk where to put this as idk what type of camera this uses and while i could ask the person for some ideas, maybe there already some answers out there, but how would one replicate this style of camera movement with cinemachine? (if possible) maybe it's even vr atp due to how smoothly it moves

c y

https://can-talat-yakan.itch.io/backrooms-vhs/devlog/387089/roadmap

For more info you can look into my itch.io page
This is the continuation of my previous attempt of the Backrooms VHS.

I am fairly done with the gameplay and look/ feel and can now start building up the world.

https://discord.gg/6wv5wV8CEQ

▶ Play video
astral turtle
stark nimbus
#

come here for help and for what you guys suck

astral turtle
stark nimbus
#

i said the future not present

#

and if you look at what i was sent it was literally the docs on the basics and im not gunna help someone using ai so just shut up if ur not gonna help then leave

slender plank
#

Well this movement for gameplay is just asking for people to have motion sickness ;D but you can get this movement creating script where you add movement to your camera with noise * movement speed ( or camera velocity).

But you found really interesting method which also really nice and more realistic I think. More calculations but more realistic indeed. ;D

#

But as person who uses ChatGPT constantly. AI is the future, but not yet 😄 You need to take its answers with a grain of salt. It is nice with simple questions, but it is common it to give "imaginative " answers, which is created from multiple answers and combined in one which is not correct at all. Sometimes it is because of difference versions, sometimes it is absolutely created out of blue. So take the answers of AI more like ideas and keywords wich will help you to find correct info, and always double check the information.

In chatGPT defense, if you will tell it it is wrong, in most cases it will correct it self, but you need to know that it was wrong.

crisp zodiac
#

İs there way to blend a camera to itself?

errant shard
crisp zodiac
#

İ change confiner of the vcam and its position changes instantly, i dont want the create the same camera for just blending.

royal tartan
#

multiple cameras for blending is kind of one of the main points of Cinemachine

onyx magnet
#

Regarding the cinemachine confiner

#

Is there a way to check when the confiner has hit a boundary?

#

Via code?

#

I have a camera mover script which moves the camera, and the camera also has a confiner 2d

#

If I continue moving the camera, the transform moves, but the virtual camera stays within the confines

onyx magnet
#

Does the cinemachine virtual camera have an internal position?

#

Outside of the transform?

civic grove
#

is it normal that the freelook camera top rig is slightly rotated nvm fixed it

cursive cedar
#

what do i use instead?

cursive cedar
#

Im not.and do i need to install pixel perfect to then have the cinemachine pixel perfect extension?

patent hound
#

how do i make it so the player camera doesnt start where the first virtual camera is but where the player is

royal tartan
patent hound
#

alr tyy

queen sail
#

So...

#

Where do I begin

#

I currently have an issue rn where I am trying to add in a function to reset the camera position in the Third Person template back to be behind the player

#

and while it does work

#

it only does if I pressed and held the Camera Reset input action

#

just releasing the input is enough to revert the changes

#

Like look at this:

#

This is me pressing the Input action for the Camera Reset

#

and every time that action is released

#

it just defaults back

#

to the prior position

queen sail
trim karma
#

Hi, can someone explain to me why Clearshot changes camera when the player comes too close to the camera?

#

Nvm, i found it.

half lantern
#

how do I make sure the camera stays on the background?

royal tartan
half lantern
#

i just dont want the camera to move out of bounds

#

the camera is following the player

royal tartan
half lantern
#

thx lemme find a tutorial

half lantern
#

oh thanks

warm verge
#

Hey guys, if i change between 2 camera with cinemachine cam, it changes smoothly, can i remove the transition and how ?

warm verge
#

or make it faster

warm verge
#

nah

#

i found it

queen sail
queen sail
royal fjord
#

Don’t know if this is the right thread, but I have a video player with render texture and the video has a ton of color banding 😦
If anyone has any tips please tell me!!

candid hare
#

Can anyone tell me how you can set up an Over the Shoulder camera?

errant shard
candid hare
hexed heron
#

hey i want to use the pov option for the aim but i am in 2d and don't want the camera to rotate along the x or y axis, i just want the camera to follow the mouse smoothly

verbal reef
hexed heron
verbal reef
#

then you can set up a a CinemachineTargetGroup with the player, and the mouse follow game object

#

you can even adjust the weighting so it favors the mouse or player, or keep it even

#

then you set your "follow" to the game object with the CinemachineTargetGroup component on it

sharp tapir
#

Hello guys, so I have this target that I want to follow but at a specific position on the screen which I set before I start the game but the problem is once the scene restarts it defaults back to the normal following posiiton, is there a way to not have that?

#

Here, I'll demonstrate

royal tartan
sharp tapir
#

Ooh alright thx

sharp tapir
#

Yeah, it's so weird, it doesn't remember its values at all

#

I'm just gonna set the values manually, how do I access the x offset in code for cinemachine?

#

omg I think i found it

#

nevermind, what the hell

royal tartan
sharp tapir
toxic birch
#

Hello , i wanted to ask , what values do u guys use for camera shake intensity and its fade in and fade out time for simple 2d mobile games , I am experimenting with those values but not really getting a fun result .
^^ Thanks in Advance

rotund patrol
#

Hi, can anyone tell me how to lock the camera from fps starter assets to a y position? cuz when i move the cam up and down the cam position also goes up and down and its a bit annoying

#

ty in advice

south scarab
#

How to change the Cinemachine Confiner2D within code?

south scarab
#

The issue persists in a simpler context

errant shard
#

@south scarab the confiner is a CinemachineExtension, not a CinemachineComponent so I assume you'd get them with getcomponent instead
Could take a look at scripting examples of other extensions if there are none out there for the confiner

verbal reef
#

Hey all, i have a camera looking down at a 45 degree angle with the player as the target. I want it's height off the ground to stay 100% consistent (lets say 10 units up) with locked rotation. when the character moves quickly away, or toward the camera, the interpolation makes the camera zoom in or out in a weird way.. Adding a ton of dampening to the translate Z field helped but makes the motion strange. if anyone has any thoughts i'd love to hear them!

thick quartz
#

how can I freeze a position such as when my player jumps i dont want the camera to move with the player but if they move up a slope or stairs i want the Y camera to move

verbal reef
#

Or when jumping switch to a camera that has a large Y dead zone

white crater
#

I have a platformer movement script and when I jump and hold down forwards while jumping, when I land, cinemachine jitters back a bit

#

Not sure how to fix it

#

Any help would be greatly appreciated

thick quartz
#

how can I make my player rotate with my camera

brittle dagger
#

how could i change the sensitivity with a slider while the game is active?

brittle dagger
#

ask brackeys

#

also

#

you can use cinemachines free look camera

brittle dagger
#

thats for a 3d game though

thick quartz
brittle dagger
#

wait

#

Ohhh

#

you said player

#

umm

#

i would say

#

make the player a child of the camera

#

that would be the easiest way

#

but it wouldnt look too good

#

im new to unity

thick quartz
brittle dagger
#

oof

#

i dont know then

iron sundial
#

I am trying to make my camera rotate towards the direction the player is moving towards. Was using cinemachine but the camera isn't rotating completely as you see in below vid. How to solve this?

short cove
#

How do i make cam freeze on y axis?

#

Im using a Vcam btw

austere thicket
#

however i have not been able to get it to work, i want to know if i'm missing any intermediary steps

royal tartan
thick quartz
austere thicket
thick quartz
# austere thicket i dont completely understand this. can you send some footage from any game that ...

I can’t supply footage but let me explain here. I have my player and my cinemachine free look camera follows them. I want the player to rotate with my camera instead of the camera just rotating around them and the game I want a look it is: https://en.m.wikipedia.org/wiki/SpongeBob_SquarePants:_Battle_for_Bikini_Bottom for the GameCube

SpongeBob SquarePants: Battle for Bikini Bottom is a platform video game based on the Nickelodeon animated series SpongeBob SquarePants, developed by Heavy Iron Studios and published by THQ for the PlayStation 2, Xbox, and GameCube. Separate versions, developed by AWE Games and Vicarious Visions respectively, were released for Microsoft Windows ...

#

Well I’m trying to replicate movement

austere thicket
thick quartz
#

I see

#

But for movement how can I replicate that if you have a video or some documentation

austere thicket
#

do you have a specific camera controller script

#

or are you aiming to make a script yourself

thick quartz
#

I have one but it’s just a basic wasd movement using transform.translate

#

So nothing advanced

austere thicket
#

i'm not really sure, you should try looking into different cinemachine cam controllers

thick quartz
#

what is the best freelook settings for a third person game

errant shard
thick quartz
fast orchid
#

The default settings?

short cove
velvet coyote
#

how do I stop my camera dragging behind my object

#

when I move forward it goes furthur back than it should

errant shard
errant shard
velvet coyote
errant shard
#

What is your vcam's Body type set to?

velvet coyote
#

im guessing this is it?

#

i cant change it

errant shard
#

Orbital Transposer is locked in for a FreeLook camera, but it should have damping settings nonetheless

velvet coyote
#

it does

#

it worked

pine pollen
#

Hi, I have this problem where if I put the 3rd player offset camera within the main character as a child, the cinemachine spins out of control according to the mouse inputs

#

I want to be able to place the CM 3rdPersonNormal within the ragdoll, but when I do it just makes the camera spin

royal tartan
#

not a child of the target object

#

unless you're doing like a POV/first person thing

pine pollen
royal tartan
pine pollen
#

Oh shoot, how do I do that? like the offsets where you're seeing slightly higher and right of the character right?

royal tartan
#

Any offset you want

#

Just set up the follow settings as you wish

#

As for including it in the prefab that's not a problem. Just make the player and the camera rig separate child objects of the prefab root

pine pollen
#

Oh, I thought about that, but since I'm using mirror, the player spawner only takes single prefab game objects

pine pollen
#

I tried it and it didn't work because the requirement was for game object, unless I did it wrong

#

I notice that free look works with being as the child fine though, am I able to add offsets to that and use it?

royal tartan
velvet coyote
#

Anyone know why this happens?

#

it seems to only happen when I add the cinemachine collider

errant shard
velvet coyote
#

@errant shard

#

i fixed it by adding the player tag to the eyes

errant shard
velvet coyote
#

thank you

long creek
#

Hi there, I need some quick help for a game jam. I have two cinemachine camera's, the problem I got is that when the second one gets spawned the first camera also switches to that camera. This happens automatically without any code and I want to know if I can disable the live camera switch

royal tartan
#

So either make sure your desired virtual camera has the highest priority or that any others are disabled/deactivated

long creek
#

That was my solutions indeed, higher priority. Thank you for the answer

candid hare
#

I'm trying to set up over the shoulder camera movement

#

does anyone have any idea how to make it work? I've been trying to set this up for like a week now

royal tartan
candid hare
#

I found a way to make it semi-work

#
    private void OverTheShoulderCamera()
    {
        float mouseMovement = Input.GetAxis("Mouse X");
        player.forward = new Vector3(player.forward.x + mouseMovement * rotSpeed, player.forward.y, player.forward.z);
        playerObj.forward = player.forward;
    }
#

this only works from -90 to 90, can't do a 360 turn yet

#

i dont really understand why

sharp elbow
#

With Cinemachine, is there an easy way to implement a "Don't let the camera view port look outside of the bounds given?" I know I could code it, but figured I'd check if its built into Cinemachine as is.

#

Looks like what I want is called the Confiner, however, it doesn't do what I want it to do with Perspective cameras.... So... That sucks.

sharp elbow
#

Rigidbody solution sounds kinda...bad?

I can just raycast from each corner, and make sure its still within the bounding box.

errant shard
whole dune
#

hey trying to do cinemachine first person camera with rigidbody movement but it sometimes jolts down or up and don't know why tried a lot of things

royal tartan
#

so you'd have to show how you set things up and what your code looks like

whole dune
#

oh was using input provider with the body set to hard lock to target and aim set to pov did not know you can't do it like that might be why

mystic cloak
#

why is an impulse in cinemachine sometimes permanently altering the camera position? how do i make it so it goes back to its original position?

mystic cloak
#

for some reason it only happens with transposer, in 3rd person mode follow mode its fine?

#

why does this happen?

royal tartan
#

what happens if you actually give a LookAt / aim settings

dusty valve
#

How can I change which live camera is used?

#

I need multiple cameras for splitscreen

royal tartan
mystic cloak
thick quartz
#

How can I use my cinemachine camera for a controller

thick quartz
#

specifically a gamecube controller

potent fable
#

Using a cinemachineTargetGroup Whenever you remove a member it really quickly transitions the camera to where it should be is their a way to make this slower so its more smooth?

pastel glen
#

Not ideal, but...

solid steeple
#

Hi everyone, I am trying to do a Aim Camera when I press the right button of mouse.

I did it, but It's very slow, someone know how can I improve the speed?

#

oh! I solved my problem.

#

I just changed the Default Blend

thick quartz
#

How can I use cinemachines input provider with axis and not vector? As my GameCube controller C (right) stick has 2 axis inputs but there not vector2 like the left stick

#

And cinemachine gives me and error trying to use them

#

Cinemachine just throws the error that it needs a vector2 but I don’t know how to combine those into a vector2

thick quartz
#

Currently for camera I’m using the dpad

thick quartz
#

Please help asap

frigid trellis
#

Hello. I'm trying to use cinemachine but I have some problems. I would like to follow a golf ball like this: https://www.youtube.com/watch?v=PCmsb6xtdU0&t=1038s
But I don't find a way to do this. At start the camera moves left, then go right to get back to the ball (I don't understand why). Then, depending on the Body and Aim values, the camera rotates when the ball rotates. Could you please tell me what is the correct configuration to follow the ball like in the video ? Thanks.

short sable
#

Hello, I would to ask about the recentering feature in cinemachine, Is it only available for free look camera, how can I achieve this in a virtual camera?

royal tartan
subtle flume
#

Heyy guyys I was wondering if you guys know how to fix the outframe particle from the cinemachine camera??

#

I want to make the "speed lines" particle effect to follow the camera not to outframe, do you know how to fix this?? thx

errant shard
#

The vcam with the particles has no aim properties so it's not actually rotating at any point, so neither will the particles
I assume you're rotating the camera directly instead of the vcams
Probably also solved by attaching the particles to the real camera

subtle flume
#

umm srry u mean create the particle in the camera itself?

#

becuz Ive put the particle in the camera but its still the same :0

errant shard
# subtle flume

That's not the camera, that's a virtual camera
I mean parent the particle system gameobject under the main camera

#

Doesn't matter how well the particle system is attached to a virtual camera if the virtual camera never rotates

subtle flume
#

ooohh okayy it workks!!

velvet gulch
#

Am trying out v3, is it normal for an orbital follow cam to rotate really slowly when you near its vertical axis range on either side? For example, if I have the range set to -80/80, I'll be able to get to around 60 either way before rotation suddenly becomes really slow in that direction and I need to push a lot harder to get the camera to move

prime sun
#

uh, i think i have to reinstall cinemachine, or am i missing something

#

what am i doing wrong

#

i'm confused

royal tartan
#

If you're looking for the "Cinemachine" menu item, it has been removed in recent versions.

#

You can create Cinemachine things from the normal GameObject - Create menu

signal brook
#

Hi. I recently updated my project to Unity 2022.2 and my cinemachine based prefab now has errors in it. I did not upgrade the CM package (latest non pre is 2.9.5, still on 2.7.9)
Virtual Cameras ( which are still a thing in this version) throw errors with a CM child object ( which seems to be created in the newer version...), but the prefab does not have such objects ( although, I do see them pop up at runtime.
I've tried recreated the prefab from scratch, and saving it, which works fine, but as soon as I open the prefab, all those errors are back...

errant shard
signal brook
#

yeah. i saw the docs on CM 3, that's why I didn't want to upgrade 😛

#

But I guess I'll give it a go on 3 and recreate my setup. Edit: Welp, upgrading to CM3 is a complete bust. sigh.

haughty flower
#

why i cant get access of Camera.main function when i applied cinemachine

haughty flower
errant shard
haughty flower
#

Idk what problem is when disable cinemachine its work but when enable its doesn't

#

I check the tag in camera

shut jungle
#

Currently I can move my player around, and rotate my player based on mouse input on the x axis.

I would also like mouse input on the y axis, however only to move the camera not the player, but its a cinemachine follow camera so im not entirely sure how I would go about doing that?

How I rotate my player

turnInput = Input.GetAxis("Mouse X");

transform.Rotate(Vector3.up * turnInput * Time.deltaTime * sensitivity);
shut jungle
#

Finally got it, by instead using framing transposer and POV

thick quartz
#

if anyone has an answer

errant shard
thick quartz
#

I can understand that but I’ve tried a few things what should I then do if I have to be patient fine be it

errant shard
# thick quartz I can understand that but I’ve tried a few things what should I then do if I hav...

A reason why nobody knows about your issue might be that it seems to be "how to set up input for a specific controller" which is not a Cinemachine question at all, but rather related to what specific input provider your project is using which you didn't mention
To my knowledge Cinemachine doesn't uses standard input from Input Manager or Input System, and by extension any controller set up to work with them

thick quartz
errant shard
#

If you want people more eager to help you, show the effort that you're making even when reposting questions, such as what you've tried since and what docs you've been looking into

#

Even if you're making effort it's a red flag for many to see someone just repeating questions with no change for days

thick quartz
#

Okay well I will replace the question and thank you for your help.

sharp elbow
royal tartan
sharp elbow
royal tartan
#

Or the body settings

sharp elbow
crimson cloud
#

@warm verge continue here. First, you should tell us, you are using cinemachine 😉 So, is your cinemachine maybe part of your players object? So it is getting moved by the players physics but also by cinemachine?

warm verge
#

unless the rb is set to Interpolate

#

but when I set all other rb objects to Interpolate to stop them from jittering it would be good for the performance

crimson cloud
warm verge
crimson cloud
#

So I am using cinemachine with no interpolate option selected and there is no jittering. Update method is set to Smart Update and blend update is set to late

warm verge
#

and what does smart do?

crimson cloud
warm verge
#

I can still make a screencap from late or smart if you want

crimson cloud
#

It just sounds like something else is wrong and not your cinemachine settings. How do you move your player in script?

crimson cloud
#

Can you paste the code real quick, just to be sure its used correctly

warm verge
#

Is this enough?
void FixedUpdate() { float move = Input.GetAxis("Horizontal"); rb.AddForce(new Vector3(0f, 0f, move) * moveSpeed * Time.deltaTime, ForceMode.Impulse); }

#

but it should be this script cuz its happening to other rb objects that dont even have a script too

runic topaz
#

hey guys im learning unity and i tried using cinemachine camera follow my player in a 2d topdown game, but somehow it still stutters. I used cinemachine 2d camera and also tried adding the pixel perfect but it's still stuttering and looks choppy. messing with the settings didnt work either, so im not sure what to do.

#

here's a video of it happening

errant shard
#

On top of that since moving sprites often have sub-pixel offsets as well, the pixel snapping will become very unstable

#

Can't quite confirm it from the video, but if you mean the player is choppy that'd be because the camera is always lagging a nonspecific distance behind, so camera's velocity and their relative distance are always rubberbanding back and forth

#

When the player is stopped you can see the as the camera slides into final position, the rate at which the sprites snap to a next pixel slows down, as the distance of the snap logically can't

#

Basically if the camera and characters are snapping to pixels at irregular intervals, off sync or at different frequencies, it will appear as jitter

#

Even old natively pixel perfect games suffered from this to some degree if they tried to add smooth camera motion, but for the most part the problem didn't exist there because the pixel grid was the coordinate grid so sub-pixel positions weren't possible

runic topaz
errant shard
runic topaz
#

ok lol that worked perfectly

#

tysm! would there be anything i should be wary of in the future if i set all the damping values to 0?

#

or is it just preference

errant shard
# runic topaz or is it just preference

You'll get no smooth movement but it's just preferential
Not using damping removes many potential problems, but note that the vcam will still inherit any possible movement weirdness from the target as it is fixed to it

#

There used to be a problem with there still being stutter, maybe because the camera position might update before the pixel perfect snapping takes place, which doesn't happen when parenting a normal camera instead, but it's been months since I saw it so it may have been fixed

runic topaz
#

got it, i'll keep that in mind

#

so far its not jittery so im liking it

errant shard
#

There are ways to make a smooth pixel perfect camera motion but I imagine it involves a system where you restrict the camera speeds to specific stable "pixel" speeds, like x,y 1,1 or 1,2 or 2,3 and so on

#

And to steps that happen and specific rates so things don't move off-sync

#

But that's overkill for most things
Just remember to use linear blends when blending between cameras and you should be fine

thick quartz
#

How can I make my camera not go through walls because the collider component isnt working

#

it just clips through walls like it did before

thick quartz
#

yup

thick quartz
#

oh wait

#

it collides but if i keep moving it goes through

#

@royal tartan

royal tartan
#

and a Strategy

#

it can only do so much

thick quartz
thick quartz
#

@royal tartan

errant shard
#

@thick quartz We probably don't have settings ready to give you, but if you want to compare to an official example remember that the package manager lets you import examples under Cinemachine which include collision among other things

#

I don't recall common issues personally with the collision not working so maybe you missed some step

thick quartz
fallen python
#

Hey , i don’t know if it’s the good place for my problem. I work on a project where i have to record different video but i want a specific fps so i want to do it not in real time like in cinema . If somebody have an idea i am thankful

fallen python
#

Thank you 😎 !

thick quartz
thick quartz
thick quartz
#

@errant shard if you want to test it there’s the prefab I got it straight from the cinemachine samples and it doesn’t work as expected. I’ve even changed many settings controls and camera types but nothing changed

faint fiber
#

So I'm making a game that mixes 2D with 3D environments, say I want to make a cutscene that has 2D animation playing over 3D backgrounds (the levels ingame), how would I go about that? Would I have a sprite animation play in 3D space, etc.

quasi current
#

I dont know which channel to ask so, I apologize. I've been trying to figure this "clipping" or "Bounding box" thing and I looked everywhere for that bounding box area but I can't find it.. even looked in the "body" inside CM.. Whats the thing I am missing? I noticed it only disappears when the object is on the left of the camera?

quasi current
faint fiber
#

I see, and Cinemachine can control when the animation starts and ends?

quasi current
#

idk if cinemachine can do that, (but maybe you can add a script inside the cm to do it)
you can control the animation clip by adding a script and do some simple play and pause in the script. You may need an animator controller and reference that in the script
animator.SetBool("start", true);

#

Idk if we are talking about the same "2d animation" but i hope i helped

quasi current
#

im stressing so much about this its taken me days

#

In some position of the camera, it doesnt cull.. only on certain places..

#

OMG ITS THE FREAKING CULLING MASK BEING OVERLAPPED

#

:(

#

ITS THE LAYERS >:((((((

errant shard
quasi current
#

ty

wintry atlas
#

Whats the easiest way to have a camera follow the rotation of another object with its all of its rotation and then also be able to add player input to the rotation (like as in a first person vehicle)

drifting stream
#

there's no 3rd person camera here

#

can anyone help me please

errant shard
#

It might be worth trying the FreeLook camera if you just want a 3rd person camera, instead of the Body setting specifically

royal tartan
drifting stream
drifting stream
smoky prairie
#

Hey guys i got a freelook camera, as a 3rd person in my game, it uses cinemachine collider extension, I want to make the camera not go through walls, the camera stops on the walls but only stops when its already inside of them, which causes the camera to be inside of the wall, which i dont like, Ive already tried raising the Radius variable of the the collider but the result stills the same, maybe shuld i put a collider between the camea and the wall? Honestly at this point i dont know what to make to config it right.

knotty fractal
#

hey i have addded a cinemachine to my pixel 2d topdown and when i move the pixels from the player look very messy. i already added the CinemachinePixelPerfect. someone knows how to fix that ?

errant shard
knotty fractal
#

Like blurry while moving to left or right

errant shard
#

It's a fundamental quirk of rendering things that are snapped to pixels and cameras moving relative to them, rather than just a simple problem with one fix

rain heath
#

For some reason my camera can go through the ground

#

But not further than the screenshot

errant shard
#

Some reason is probably the cause

rain heath
#

I think it's because of my camera FOV being pretty high

#

but I don't know if there's anything I can do about it

#

Seems to happen once Camera Fov > 40

#

but 40 makes me want to take my brain out of my head

#

it looks really bad

royal tartan
rain heath
#

I am not

#

just clamping via script

royal tartan
#

then there's not really anything preventing you from going underground is there

#

assuming the ground is within your clamped angle tolerance

rain heath
#

As an available Component

royal tartan
#

not a regular component

#

you add it to the cinemachine virtual camera inspector

rain heath
royal tartan
#

not to the brain

#

the vCam

rain heath
#

🤷‍♂️

#

oooh as an extension

#

Never really noticed that existing before

royal tartan
errant shard
#

Usually camera colliders prevent a camera from getting too close to any surface, or the camera near plane will cut off geometry in front of it

rain heath
#

well applesauce

warm verge
#

How to make the camera follow the player? In 2d game do i need a code for that? Or sticking the camera on the player works?

#

Also what about the gun he’s holding? Do i just stick it to player aswell?

royal tartan
warm verge
#

O oki ty

mystic cloak
#

how can i switch cinemachine targets? so instead of it following character it follows an enemy or something? or like halfway between two objects?

#

also, is there a way for me to have a smooth transition between the two?

royal tartan
errant shard
tranquil osprey
#

I have a game object with collisions and triggers both but i want the impulse source to only be triggered with a trigger is there any way?

scenic cairn
#

Hey guys, I have this weird issue with Cinemachine where if I hover my mouse over the game view, or scroll, it enlarges my pixels

#

I've never had this issue with other projects, I tried restarting the program but no luck

charred laurel
#

Hi 👋 does someone already encounter this behaviour where your camera is shaking on y axis while following a target ? I tried every update method possible on my cinemachine brain, some mode are getting worse than others but the problem persist, I also train manually updating at different stage of the update stack but nothing change
I'm using cinemachine with dots but I dont think this has any with the issue

dire mural
#

Does anyone know of a method of making it so the framing transposer only moves right? I want it to track the player vertically and only move to the right when the player moves right, similar to how super mario bros 1 does it

royal tartan
dire mural
royal tartan
#

i tried to do this exact method on the TargetGroup and it didn't work
How?

#

I would imagine for multiple players you do what I mentioned above, just have multiple of those empty objects and use the empties as the transforms in the target group

dire mural
#
public class CinemachineTargetGroupRestrictor : MonoBehaviour {
        [SerializeField] float x;

        void LateUpdate() {
            Vector3 pos = transform.position;
            pos.x = x;
            transform.position = pos;
        }
    }
dire mural
royal tartan
#

so in my mind that means you need to be tracking that state yourself

#

but I could be wrong

willow turtle
#

How can you set a LookAt Target for a Cinemachine FreeLookCamera via script? Didn't find anything useful in the documentation.

dire mural
royal tartan
willow turtle
# royal tartan CinemachineVirtualCameraBase has a LookAt property
          public Transform playerTargetTransform;
          public CinemachineFreeLook camera;
          public Animator npcAnimator;

        void Start()
        {
        camera = GetComponent<CinemachineFreeLook>();
        ...
         }

          if (inReach == true)
          {
                npcAnimator.SetBool("isTarget", true);
                camera.LookAt = npcTargetTransform;
           }```
#

I currently have something like this, but I get a Null Reference Exception.

mellow hazel
#

Is there a call back or any other way to know when the blend from one camera to another is complete?

umbral delta
mystic cloak
#

im using cinemachine impulse sources, but for some reason in the editor the shaking looks fine, but in the build it looks more wavy than shaky, how can i fix this?

tranquil osprey