#🎥┃cinemachine

1 messages · Page 7 of 1

urban apex
#

have you tried late update?

#

in my experience late update was better when I coded camera follow

amber pelican
urban apex
amber pelican
urban apex
#

that's weird

urban apex
#

when setting velocity you don't need to use fixed

#

and set the camera as lateUpdate

amber pelican
urban apex
#

really weird

amber pelican
# urban apex really weird

yeah idk i will probably leave it as it is for 6 months then come back just to find out that i still can't fix it but Thanks anyway 🖤

urban apex
#

oh and it's weird and I don't know why but when the player is selected, the movement looks laggy

#

don't forget to unselect player when you try

urban apex
opal steeple
#

That is a terrible character control script in the first place. you are mixing force simulation (which you override) with teleportation (which fights the little force simulation you have). May be worth looking into acquiring a proper controller script that is either kinematic or force simulated and doesn’t have the above issues.

stable briar
#

@umbral elbow
If you want any more code from the project or wonder about any variables you can ask.
These aren't complete by the way, so I doubt you'd want to just them without some changes :)

Camera: https://hastebin.com/share/ebofogabav.csharp
Helper Functions: https://hastebin.com/share/zudokahito.csharp

umbral elbow
umbral elbow
#

Hi, back again, I figured my previous stuff out but now I'm struggling with rotating the camera when the character is moving really fast, I can barely rotate the camera against the velocity and I don't know how to compensate that on a freelook camera

odd elk
#

Why do I get a slight stutter on my player with this script? Please help, I hate cameras lol. Mine is finally functioning perfectly except for this small stutter issue. I tried making it FixedUpdate() instead of Update() but that made it worse.


public class MyCameraScript : MonoBehaviour
{
    public Transform player;
    public float distance = 8f;
    public float minZoomDistance = 4f;
    public float maxZoomDistance = 16f;
    public float zoomSpeed = 6f;
    public float initialFOV = 70f;

    void Start()
    {
        if (player != null)
        {
            // Set the initial position of the camera
            transform.position = player.position + new Vector3(0, distance, -distance);

            // Set the initial rotation of the camera
            transform.rotation = Quaternion.Euler(45f, 0f, 0f);

            // Set the initial FOV of the camera
            GetComponent<Camera>().fieldOfView = initialFOV;
        }
    }

    void Update()
    {
        if (player == null)
            return;

        // Get the scroll wheel input
        float scrollInput = Input.GetAxis("Mouse ScrollWheel");

        // Adjust the distance based on the scroll input and zoom speed
        distance -= scrollInput * zoomSpeed;

        // Clamp the distance between the min and max zoom distances
        distance = Mathf.Clamp(distance, minZoomDistance, maxZoomDistance);

        // Set the camera position relative to the player's position
        transform.position = new Vector3(player.position.x, player.position.y + distance, player.position.z - distance);
    }
}
#

changed to lateupdate and its fixed nvm ty

ruby basalt
#

how do i disable/remove this arc while going from bottom rig to middle rig for freelook camera?

#

even if i set the spline curvature to 0, it goes down a little lineraly, i dont want it to go down

pearl atlas
#

Hey everyone.

I'm using the Cinemachine Confiner 2D along with a polygon collider 2D set as a rectangle with four points to keep the camera within the bounds of my world. But, I have a bit of a problem.

I'm trying to figure out how to trigger an event when the camera touches the bottom side of the rectangle. The plan is to move the hotbar at the top of the screen to give players a better view of the world when that happens. I'm a bit stuck on how to make this happen though, so any tips or advice would be awesome. Thanks a bunch! 🙂

surreal helm
#

question can you have like 10 cameras with their own layers and not cause the cpu to waste performance

urban apex
#

is usually better to tell your problem and ask for solution rather than finding a solution by yourself and asking about that

#

still about that ugly mf?

surreal helm
surreal helm
#

I went back to using camera to make it layered

#

it works but any object that in front of the player gets clipped by the player

urban apex
surreal helm
#

yes but i seem to found my problem

urban apex
#

what is the problem

surreal helm
#

when i set the layers i'm not counting the layer that goes in front of it so i switched it back on and it works

#

the only layer that should go though should be the oneway ground layer

urban apex
surreal helm
#

or at least when he at the air

urban apex
#

then switch it on jump state

surreal helm
#

I tired that switrching the layers cause it to overload the cpu

#

Unless if there a way to switch that setting off via code

surreal helm
#

@urban apex I actual tried what you said and it worked. I was able to turn the render feature on and off based on the states I'm in that really fixed my problem. Thanks

vestal lotus
#

how to invert cinemachine camera direction?
when i pushed my mouse upwards the cam points down and looks at ground

crude lake
#

Also, I have the camera jittering specifically when standing on top of moving platforms. I've googled for a bunch of solutions, but found no combination that doesn't make either the character or environment jitter

  • Both the player and platforms have rigidbodies (platform is kinematic) set to interpolate
  • Both of their movement is handled in FixedUpdate, not Update
  • CM brain update mode is set to late update
  • Virtual/CM camera standby update is set to always
#

Player is a dynamic rigidbody that hovers over the ground using a raycast. This is what lets it move with the platform:

royal tartan
#

Rigidbody.MovePosition should only be used in FixedUpdate

crude lake
#

Every FixedUpdate and nowhere else

cosmic fossil
#

My first time using cinemachine and I have an issue. How can I make the camera look completely or most of the way up for the bottom rig? I tried to decrease the height and add a collider to the floor but that seemed to make the collision detection to completely break. For reference, I'm trying to make it similar to Risk Of Rain 2 and their camera system.

crude lake
#

So maybe that's the issue

royal tartan
#

why not just set the velocity?

royal tartan
crude lake
#

But I guess it's worth a shot

royal tartan
crude lake
#

It doesn’t change the velocity. I’m also using MovePosition to keep the player hovering above ground and it keeps its velocity just fine

keen cedar
#

I can't find much information on the best way to do camera shake.
(I thought I would find way more up-to-date info, seeing as how common of a mechanic this is)

From one video I found, it said to use cinemachine with impulses. I think I set it up right but I can't seem to actually edit the impulse properties with a script. 🤔

I looked at the page for it but it doesn't seem to give me any additional insight.
https://docs.unity3d.com/Packages/com.unity.cinemachine@2.3/manual/CinemachineImpulseSource.html

Am I missing something or is there already a better way to do screen shake? I'm kinda lost here. UnityChanHuh

errant shard
#

You also have the option of using noise rather than impulses

ivory wraith
#

that reminds me -- I'd like to be able to turn multiple noise sources on and off. Currently, I'm just spamming impulses, but that's a very kludge-y solution

keen cedar
keen cedar
#

nvm I was doing something wrong on my end

umbral elbow
#

Anyone know how I can programmatically change the camera sensitivity on a virtual camera with a framing transposer Follow and POV LookAt? I'm using it as an orbital camera

#

Just to add on, the only way I've found on Google is something to do with Preprocessors on the input system

#

Second Problem I'm having is that if the virtual camera is in a different scene in a multi scene workflow, the camera collider does not work

amber pelican
#

Hey do you have any idea how to solve this camera-shaking issue when walking upstairs? (character controller)

errant shard
#

Also an option to allow some vertical movement with soft zones to make it even smoother

#

It really depends on how you want it to work

#

Some smooth the player's visual position with stairs so camera smoothing isn't even necessary
Or even smoothing the true position by interpolating the position between the stairs

#

Or simply using ramp colliders for the player with stairs instead of steps to sidestep the issue entirely

royal tartan
#

That last one is 👌

umbral elbow
#

Anyone know how I can programmatically change the camera sensitivity on a virtual camera with a framing transposer Follow and POV LookAt? I'm using it as an orbital camera
Just to add on, the only way I've found on Google is something to do with Preprocessors on the input system
Second Problem I'm having is that if the virtual camera is in a different scene in a multi scene workflow, the camera collider does not work

pure topaz
#

Anyone have any issues with cinemachine not following a player's transform when "apply root motion" is checked on?

royal tartan
pure topaz
royal tartan
rich prism
#

where is the library folder

#

cause im getting a compiler error and i cant find that folder to delete it

rich prism
#

Can someone help me sort out the "The type or namespace name could not be found"

errant shard
rich prism
#

Well ive tried looking on google and nothing helped

royal tartan
#

Most likely if you have compile errors in your library folder you need to update your pacakges

#

or remove unused packages

#

or update Unity

#

the library folder lives in the root directory of your project

deft shuttle
#

I want to make the camera follow the player but slightly pan depending on where the cursor is. Does anyone know how I can do this?

royal tartan
#

the members of the group should be the player and the cursor

deft shuttle
royal tartan
#

you need an object that is at the world space position of the cursor

#

make an empty object and move it in your code along with the cursor

#

also the LookAt needs to point at the target group

#

not the cursor

#

the target group should not go on the camera itself either

deft shuttle
royal tartan
#

no

#

make it point at the target grgoup

deft shuttle
#

The cinemachine vcam is parented to the player. Is that an issue?

deft shuttle
deft shuttle
#

This is how I've got my CursorWorldObject following my cursor. Is this correct?

deft shuttle
#

These are my current settings, but it's causing the camera to move on the Z axis, breaking it into 3D. What am I doing wrong?

royal tartan
#
Vector3 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
mousePos.z = 0;
WorldSpaceCursor.transform.position = mousePos;```
#

I guess but it's ugly and weird and will break if and when your camera position changes

royal tartan
#

Magic numbers are never a good idea

deft shuttle
#

Not sure how to fix it

royal tartan
#

in the body settings

#

and leave "Do Nothing" for the Aim settings

deft shuttle
#

The camera ends up rotating tho, not sure why

#

It's not looking straight on

royal tartan
deft shuttle
royal tartan
#

Follow should be the TargetGroup

#

not the player

#

and you can remove the Look At

deft shuttle
#

It moved below the player when I changed the body to Framing Transposer

#

Follow is "TargetGroup (transform)"
Look at is nothing.

But it still starts at a rotation

#

It seems like removing the TargetGroup and then reapplying it to the Follow has somehow fixed it

#

Thank you

royal tartan
#

so it's like the average of the mosue obj and the player

deft shuttle
#

How can I limit how much the camera moves with the cursor?

royal tartan
#

change the weights in the target group?

#

but also your code that moves the cursor object can limit the distance from the player

deft shuttle
#

Thanks for all the help!

rich prism
rich prism
#

i updated unity and it just deleted my entire project

royal tartan
#

It doesn't do that

unkempt forge
rich prism
#

no i dont think so

#

theres nothing in the hierarchy or the scene

unkempt forge
rich prism
#

no1 i did save because i opened it yesterday and everything was there

#

how can i check if it is a different scene

royal tartan
#

just open the scene you want to open

rich prism
#

cheers

#

it worked

#

i just didnt know where the scen was

errant shard
#

I'm failing to set a vcam's lens fov with animator keyframes
No time to troubleshoot it much so I'm just wondering if there's some trick to it
The keyframes are saved in the clip, but ignored at runtime and in editor after swapping once to another animation
2021.3.34f1

worldly wagon
errant shard
umbral elbow
#

anyone know why the cinemachine collider doesn't work in a multi scene workflow? I have my camera in a bootstrapper scene so that it persists through scene load and a manager attached to it, unfortunately the collider doesn't seem to recognize collidrs in the environment scene even if they are in the correct layer

umbral elbow
#

Or am I just dumb and missed a setting cuz I can't find it on the documentation or the inspector

royal tartan
umbral elbow
#

excuse the green it's my play mode tint

umbral elbow
#

I know the player reference isn't working because they're in different scenes and I know how to fix that, it's just really weird as even if I drag the whole camera controller into the same scene, the collider doesn't seem to work

#

ok so after a little more testing, it is working to an extent, it seems to depend on the thickness as my 1 unit thick ground will only slightly resist the camera before it eventually passes through

ionic geyser
#

Ive started on a game using pixel perfect camera.
The "problem" is that the Lens isnt very fine tuned. I can only zoom in and out at a very big numbers. To solve this problem I ended up fiddling with the reference/game pixel ratio. It ended up being something like 704 * 424 (ish).

Is this "okay" or will this lead problem further along the game? Should I stick to more traditional resolution settings?

errant shard
#

Or setting a reference resolution that's easier to zoom in multiples of 2

ionic geyser
# errant shard So you're using reference resolution _as_ zoom?

I want my character to be at a certain size compared to the screens height.

Im not quite sure how to think when it comes to character size compared to screen/camera height from the get go.

I have tiles 6464. I divide em to 3232 in Unity. And I want my 6464 character to remain 6464 in Unity for quality/resolution.

Problem is, when I zoom in and out with the Lens which only have like 3 steps I dont get the player to screen height ratio Im looking for.

So I end up fiddiling with the screen resolution instead to solve the "problem"

#

Does that make sense?

errant shard
#

As long as a reference resolution is valid for upscaling, it should work the same as any other reference resolution
Due to the nature of monitor resolutions, you'll still need to set rules for how it would scale to monitors of a different size from your own

ionic geyser
#

it has a 16:9 ratio but with a not very traditional resolution in pixels

errant shard
errant shard
split flicker
#

Hey! Making a third person camera with Free look camera:
It has the least amount of coding needed to actually get rotation working around the player, however I can't seem to offset the cameras to a over the shoulder feel like The Last of us or Resident evil (Remakes)

#

or should I look at a different camera like the thirdPersonFollow and implement my own rotation logic ?

errant shard
#

I expect you want to player normally face the movement direction, but face the camera direction when you swap to aiming vcam

#

(rather than having the aiming camera rotate with the player)

#

Cinemachine's importable examples might include an example of over the shoulder aiming but I do not recall precisely

#

Unless I misunderstand and you're not talking about swapping to over the shoulder view but simply giving the follow camera a sideways offset

split flicker
#

I just need a camera to rotate around the cahracter

#

and I am not sure if I should just use the 3rdPersonFollow or FreeLook with the 3 rigs

#

as I am having an issue offsetting the FreeLook rig to have the character to the left

#

instead of actually moving to the left or right, it pans the camera

slate cargo
#

So I want to switch to Cinemachine from a script I made to sort of follow the marble in a rather smooth way, but I have no idea how I could get similar results.

royal tartan
#

youi want the camera to stay behind the direction the ball is rolling in?

slate cargo
#

Similar to how the script makes it work

#

Yea

royal tartan
slate cargo
#

Okay that did add a bit of functionality, but the camera cannot keep up

#

it doesnt really rotate behind it until it makes a great distance

#

or turns enough

royal tartan
#

basically whatever your old script was doing - use that to move an empty object to the desired camera position.

#

You can set that empty object as the Follow target

slate cargo
#

Hmm alright, my only problem was that sometimes, for terrain reasons... if the ball had even a tiny little bounce or drop, because I was using lookat it would make it jitter which I highly hated, and I still couldnt really fix that issue

royal tartan
#

WIth cinemachine you can then add damping etc on top

#

from the transposer settings

slate cargo
#

Can I do camera offset from object? So I dont have to manually try adding it

Okay I can

#

I still find it a bit confusing how adding a virtual camera changes stuff

#

should both the camera (with the cinemachinebrain) and the virtual camera be on the same object like this?

royal tartan
#

neither of them should be children of the player

#

and they should be separate from one another too

slate cargo
#

the player is just an empty, not sure if that changes stuff

slate cargo
royal tartan
#

as in not parents or children of each other

slate cargo
#

not sure why but now the marbles seem to be doing rubber banding tech 💀

#

I added back the old script and it doesnt seem to occur there

#

Either im tripping or Cinemachine aint liking my script

royal tartan
# slate cargo not sure why but now the marbles seem to be doing rubber banding tech 💀

I thought about this for a little bit. I think maybe the easiest thing here is to put a script like this on an empty child object of the marble:

public class OrientationHelper : MonoBehaviour {
    private Rigidbody rb;

    Vector3 lastKnownDirection;

    void Awake() {
      rb = GetComponentInParent<Rigidbody>();
    }

    void Start() {
      lastKnownDirection = transform.forward;
    }

    void LateUpdate() {
      Vector3 velocity = rb.velocity;
      Vector3 flattened = Vector3.ProjectOnPlane(velocity, Vector3.up);

      if (flattened.magnitude > 0.01f) {
        lastKnownDirection = flattened.normalized;
      }

      transform.rotation = Quaternion.LookRotation(lastKnownDirection);
    }
}```
Then you can set that empty child as the Follow and LookAt targets, and for the Body settings use     "Lock To Target With World Up"
#

disable all damping to start with

slate cargo
#

so I guess inside the marble prefab?

royal tartan
#

yes as a child of the object that has the Rigidbody

slate cargo
#

rubber banding still occurs

#

im not sure if its actually occuring and I just cannot seem to notice it while using the custom script

royal tartan
# slate cargo

well for one can you turn on Interpolation for the Rigibody?

#

That should smooth things out a lot

slate cargo
#

that also causes rubber banding

#

💀 since I calculate in fixedupdate that might just be it

it did not belong in update either

#

do you want me to send in the script? I tried adding useful comments to it

royal tartan
#

I was just trying to help you work out a solution using cinemachine tbh

slate cargo
#

oh yea it does work there

#

but why is that

#

I dont quite get it

slate cargo
#

It did significantly help and works rather similar, thank you!
I wonder how I could make it so it doesn't stray too far away in case the marble speeds up

#

I also dont understand why it jitters on the bottom turn but not on the upper one 💀

bright pasture
#

Hey it's cinemachine avaible for unity 5.6.7?

errant shard
#

Before that I think it used to be an independent asset which is no longer available

pastel glen
#

Yeah, was originally made for the Homeworld prequel and unity bought it

bright pasture
#

So there isn't any package similar but avaible for unity 5.6?

unkempt forge
slate cargo
# royal tartan reduce damping

In the end I settled with Framing Transposer as it seems to give the most options.
I'm still experimenting with some numbers, but now its doing a better than the script. While I still have some things I want to smooth out, the main issues of vertical and horizontal jitter seem to barely occur (I still have some trouble with some wall collisions causing a camera jitter, but the harsh ones are smoothed out, and I don't think this fix should result in the map having way too many verticies)
So yeah, rn main focus is to ease out the wall jitter a bit more, after that comes probably not allowing the camera to go through walls

neon peak
#

I'm making a game where the player is flying in a tunnel and they can control the tunnel's path in real-time, e.g pressing D will make the tunnel turn to the right. Can I use cinemachine to create a camera that goes along a bezier curve (that can be extended)?

somber pilot
#

Anyone know why my cinemachine virtual camera loads on the ground?
the script works for saving and loading, Because when i delete the PlayerFollowCamera, it is right, But i cant use the mouse look unless i use the playerfollowcamera,
Let me know if i need to provide anything else.

#

im using the unity starter asset first person

royal tartan
# somber pilot

why not show the actual body and aim settings and the position in the scene where the Follow target is

somber pilot
royal tartan
#

the numbers themselves mean little to me

#

Also you need to set this to Pivot

#

otherwise it's impossible to tell where your objects actually are in the scene

#

And BTW best practice is really for the virtual camera and the main camera to not be children of anything

somber pilot
#

Yeah i saw that and i switched it

royal tartan
# somber pilot

ok looks like your PlayerCameraRoot object is in the ground

#

so that explains things

#

looks like your whole player is halfway underground in fact

#

so is this really a camera issue?

#

Doesn't seem like it

somber pilot
#

Well it wasnt doing that at first, i changed stuff and now half my player is in the ground

#

I dont get why those, i have a ground set at 0

#

Either way tho my main casple is not,

royal tartan
#

This just looks like you haven't properly positioned the objects inside PlayerArmature

somber pilot
#

They are tho.

#

it works when i dont have a player follow camera. But when i add one it doesnt

royal tartan
#

you need to figure out why that is moving

#

it has nothing to do with cinemachine

#

that's just the object your cinemachine camera is following

somber pilot
#

could it be gravity? because its dropping to the floor it seems like. i dont see what would be giving it gravity tho

#

fuck it ima just make a new one instead of using unitys

#

that was my mistake in the first place

errant shard
ivory wraith
#

it sounds like you don't understand the problem you are having, and are thus not in a position to fix it by "doing it yourself"

somber pilot
errant shard
#

You could disable every virtual camera and I expect the problem persists
In fact that's a good practice for isolating the issue so you know what to fix

somber pilot
#

I did that, i didnt use the cinemachinevirtualcamera, and when i loaded the game the camera was in the correct position. the only issue i had with that was i was not able to look around with the mouse, i was able to move the player tho.

errant shard
somber pilot
#

i didnt check that time cause i didnt think thats where the problem was

#

I tried it again jus now, and no it still does the same.

somber pilot
#

Okay i got it now

errant shard
#

No idea how the package manager works in 2017 unity, or if it has one
Why are you looking at ancient versions anyway?

bright pasture
#

Because I'm modding an old game and I don't want the graphics to be affected so much

bright pasture
#

It's the same as unity 5

slim sundial
#

hi! How could I put a background in the cinemachine camera?

errant shard
slim sundial
#

the idea is having a fixed image, like a cave

#

when the player moves, the image would move with him (emulating a still background)

#

the problem is that, since the cinemachine camera follows the player in every coordinates, if I puti the image inside the camera object as a children the image also moves vertically

royal tartan
slim sundial
#

Oh... sorry then thought it could have an option for that (totally new with the component)

royal tartan
#

Add a UI canvas to your scene in screen space - camera mode and set the plane distance to 1000

#

Then add your image as a UI Image on that canvas

slim sundial
#

oh, thank you

royal tartan
#

Cinemachine is just for moving and rotating your camera

slim sundial
#

got it, thanks!

open terrace
#

Is there a trick to using the Deoccluder? I've put it on a virtual camera which uses a framing transposer, I don't see any effect though.

#

Well I got a result, but it was the camera continuously flying around and rotating like it was drunk.

#

XD

errant shard
open terrace
#

I took a look, but it seems they've set it up about the same as I have.

#

I'm thinking mixing target group framing and the deoccluder isn't supported or something.

errant shard
open terrace
#

Aye

opaque vault
#

can anyone help make fixed camera angles

#

they trigger and work but dont switch angles

royal tartan
#

what do you mean by "they trigger and work"?

opaque vault
#

like player walks into the first camera can see the player but then i turn to the next area and trigger it the camera triggers but the angle doesn't change

royal tartan
#

what do you mean by triggering a camera

#

can you share specifics of how you set things up?

opaque vault
#

like is there a way i can show you

royal tartan
#

screenshots

#

words

#

videos

#

maybe make a thread

gilded night
#

hello, i know my question is wierd but is there a way of ussing occulusion with Cinemachine camera

gilded night
#

occulusion culling

errant shard
gilded night
#

then how do you not render so many object at a time

royal tartan
#

Occlusion culling is one option, sure. It just doesn't have anything to do with Cinemachine

gilded night
#

how else can you optimize game fps

royal tartan
#

lots of ways

#

the first step is to use the profiler and see what your bottlenecks are

gilded night
#

according to my profiler materials are my main problem

opaque vault
#

Does anyone know a good site or a youtube that can teach cinema machine use because I'm trying to make camera angles and I have nothing working.

gilded night
#

maybe the unity Channel on youtube could help

#

since its has a playlist dedicated to cinimachine @opaque vault

green steeple
#

Trying to make multiple Cinemachine Camera angles in my game so that each planet has a camera that follows it. Current problem is that whenever I make a new virtual camera, I can't configure any of its settings. Its all based on the previous cam fromt he looks of it

#

Its like, no matter what, if I add a Virtual Camera, it will force them to have the same values no matter what objects I set it to follow or lookat

royal tartan
#

Can't you change all the things in the inspector right there?

green steeple
#

So set Y to 2, it goes to 10494

royal tartan
#

Are you making changes in play mode or something

green steeple
#

nope, play mode is off

royal tartan
#

Oh you mean you're trying to change the Transform? Yeah of course that won't work

#

The position is determined by the framing transposer you have set up

#

You need to be making changes to the actual virtual camera settings

#

Not the Transform

green steeple
#

oh, interesting.

green steeple
#

Ideally I'd like the virtual cam to orbit 360 around the object while the object is moving. Can't seem to figure out how to get this done? Any tips on this?

royal tartan
#

Certainly not with a Framing Transposer

#

Probably would set Body to Do Nothing and just write the orbital motion manually, it's just circular motion which is quite simple

green steeple
#

gotcha

fickle cape
#

Hey everyone.
I've got a "Flight Sim" type game, and I work with a cinemachine freelook Camera that follows the player aircraft around. I've added an input provider, that reads a Vector2 input from the controllers right stick to rotate the camera around the aircraft when desired.

So far, so good.

Problem:
Whenever I maneuver the plane and pitch up or down (Left stick down or up), the input provider somehow reads values that are not 0 and rotates (left when pitching down, right when pitching up) although it is supposed to stay straight.

Are there any experts out there that could provide some help? :S

#

(When I disable the input provider, the "unwanted rotation" does not occur, so it must have to do with where the input provider gets its values from)

vagrant imp
#

Hi, I'm very new with Cinemachine and I have seen some tutorials but they only explain the basics. I just want a Camera that follows my 2D Top-Down player with a limit or a border. The VirtualCamera object needs also a classic Camera component since I have to set a TargetTexture to show my game on a RawImage inside my canvas. I have a problem and I don't know how to solve it, where my camera eventually jumps as shown on the video like changing from zone. The limits are set with a Cofiner and a Polygon Border 2D. The CineMachineBrain has to be on my virtualCamera, otherway the cofiner doesn't work or I don't know how.
As far as I tested I think is some problem with the Cofiner (I try the Cofiner and the Cofiner 2D but I don't know the difference), because if I uncheck the "Confine Border Edges" this problem with the jump doesn't wxits but also the limits of the Cofiner doen't work.

royal tartan
vagrant imp
vagrant imp
split flicker
#

SO the Aim camera will not stay in sync with the 3rd person camera. The main thing is, the forward looking direaciton needs to remain the same so there is not this jarring effect when transition to and from the aim and 3rd person camera

the aim camera needs to reset to the 3rdPerson camera positions but my code does not seem to work

      private void SyncCameras()
        {
            // Get references to both cameras
            CinemachineVirtualCamera thirdPersonCamera = VirtualCameraManager.Instance.thirdPersonCamera;
            CinemachineVirtualCamera aimCamera = VirtualCameraManager.Instance.aimCamera;

            // Sync the aim camera to match the third person camera direction
            aimCamera.transform.position = thirdPersonCamera.transform.position;
            aimCamera.transform.rotation = thirdPersonCamera.transform.rotation;
        }
split flicker
#

Fixed!

hoary crypt
#

Hi everyone! I'm making a small prototype for a future game with a Mario Galaxy like gravity, so sometimes the player will run on a round planet and be upside down. Maybe I'm doing it wrong (probably the case lol) but I want the horizontal axis of my Freelook camera to always be the same as my player's so the ground appears "flat". For instance I want to avoid the case that you can see in my video and that the camera continues to follow without being locked. If anyone has an idea ?

royal tartan
hoary crypt
#

What should I use then ? So that I can still use inputs to rotate the cam etc...

royal tartan
#

Write your own logic to simply rotate the object for your vCam to follow

#

Orbit camera is pretty simple

hoary crypt
#

Ok thanks !

plucky mesa
#

i'm going through kind of a weird problem. I'm using cinemachine for a split screen networked game, so i need to have both the host and the client cam active at the same time. I kinda got something working by syncing the transform of the camera over the network, but cinemachine still tries to force-blend and it will use the last connected player cam for both host and client and the only fix i found was to manually change the priority in code from 10 to 9 and back again to 10, and that weirdly fixes the issue. I already tested and it works well with a normal camera, but i would love to be able to use cinemachine anyway. Any fix not to get the cameras mixed up without having to disable them for each client?

ivory wraith
#

if you need multiple cinemachine cameras to be enabled in the same instance of the game at the same time, you need to configure them so that they don't affect the wrong CinemachineBrain.

plucky mesa
plucky mesa
ivory wraith
#

ah, it's different in 2.x

#

2.x uses culling masks

#

you create layers that will hold nothing but the virtual cameras

plucky mesa
#

well this looks like a downgrade (?)

ivory wraith
#

then you configure the culling masks on the cameras to exclude the layers they shouldn't be affected by

#

it's less convenient, yes, but it's still pretty simple

plucky mesa
ivory wraith
#

i'm a little confused by your problem

plucky mesa
plucky mesa
plucky mesa
tawny palm
#

I'm going to use cinemachine and have added a Cinemachine Targeted 2D Camera to my scene (and have the default main camera already in there as well) I want it to be 2D Pixel perfect so I added that extension in the virtual camera that I added. Now I didnt see a location for the reference/target resolution in any of the component settings. Am I supposed to have the unity Pixel Perfct Camera Component added to the Main Camera or the virtual camera?

The documentation suggests I add this as well but dont know to what, exactly:

hoary crypt
errant shard
#

Oh about time

ivory wraith
#

Cinemachine Pixel Perfect goes on your virtual cameras. It makes the virtual camera set its ortho size properly.

lusty peak
#

Why is it when I am using Cinemachine, Camera.main.transform.position always returns Vector3.zero?

ivory wraith
#

cinemachine doesn't cause that to happen

#

unless it positions the main camera at the origin, of course

lusty peak
# ivory wraith show the relevant code

there isnt any, I'm blocked from this lol.

Debug.Log($"{CinemachineCore.Instance.GetActiveBrain(0).transform.position}");
Debug.Log($"{Camera.main.transform.position}");

both are returning vector3.zero and this is happening only after adding a cinemachine brain to the camera 🤷‍♂️

ivory wraith
#

is the camera actually at [0,0,0] ?

lusty peak
ivory wraith
ivory wraith
lusty peak
ivory wraith
#

ah, ok

lusty peak
#

making the cameras posiition at my head

ivory wraith
#

It sounds like you have something that's setting the camera's position in Update

#

Cinemachine runs in either LateUpdate or FixedUpdate

#

it should be in LateUpdate here

lusty peak
ivory wraith
#

i've gotten pranked by that kind of issue a few times

#

looks fine in the scene view, but not so much in Update!

ivory hare
#

Im unable to add cinemachine to ym project, i went to Package Manager and checked packages in Built in,Registrey and my assets and Cinemachine isnt there also tried to enable pre release packages and nothin

#

After restarting it showed up.

royal tartan
nova tulip
#

Has anyone seen this video from Guinxu? It's in spanish, but it touches an interesting theme

#

Creating your own system of cinematics? How is that possible?

#

In the video there's nothing really explaining how to do it. Only how it's done

#

It's in graphs, so I'm wondering how it's possible

ivory wraith
#

it's some kind of visual scripting system

#

you can, presumably, do the exact same thing in C#

bitter mango
#

heyy everyone, I'm an absolute beginner and i'm trying to follow this tutorial ( https://www.youtube.com/watch?v=OEMk8xVDk2I&ab_channel=Hennejoe ) to make a simple scene with fixed cameras but when i press play I get "Display 1 no cameras rendering" anyone know if maybe there's just a step that wasn't shown in the video or something? I checked the code multiple times. here's my hierarchy

This is my second ever tutorial video about how to create Fixed Camera seen in Classic Resident Evil games - I'm sure there are more optimised ways to achieve this but I found this way to be simple and works well!

Music by:
https://soundcloud.com/octonyte

Tank Controls Code: https://answers.unity.com/questions/122786/simple-tank-controller.h...

▶ Play video
errant shard
vapid wagon
#

yo! using the cinemachine impulse source and reciever stuff

how do you guys handle rumbling. Like a prolonged impulse? Do you just call GenerateImpulse() at designated intervals based on how long the duration of each impulse is?

ivory wraith
#

That's something I need to figure out properly

#

I currently just do that, yeah

#

but it's challenging to control

vapid wagon
#

I do like the set up ease of the impulse source and listener combo though. Rather convenient

gleaming harbor
#

Quick question; I'm trying to force-update the camera position via a script but nothing I try works. The issue is that, the player teleports (ie. the Rigidbodys position is re-assigned) but the camera takes so long to return to the expected position behind the player and needs to just be force-assigned. I've tried...

  • Exclusively using the freeLookCam.ForceCameraPosition() to assign the FreeLookCameras position (didn't work).
  • Setting the PreviousStateIsValid = false & using freeLookCam.ForceCameraPosition() to assign the FreeLookCameras position (didn't work).
  • Setting the PreviousStateIsValid = false & manually assigning the FreeLookCamera transform to where the player respawns. (didn't work).
  • Every conceivable combination of enabling/disabling the FreeLookCamera component, to try and have it recognize that it's not where it should be.
  • Ignoring the Cinemachine camera all together, and just manually assigning the actual camera. (didn't work).

Any advice is honestly helpful, at this point. Thanks in advance.

ivory wraith
#

have you looked at CinemachineCore.OnTargetObjectWarped?

#

you tell it about the transform that warped and how much it moved

#

I have not used this before, but that looks appropriate

#

Since you're using a Rigidbody, you may need to wait until after the next fixed update

#

since the transform doesn't actually go anywhere until the physics update

#

also, if the rigidbody is set to Interpolate, it could be more complicated

#

I forget if setting Rigidbody.position interpolates or not

gleaming harbor
#

So, that might work. I'll see if I can't find the docs for that function. That said, I'd need to see how to use that on the FreeLookCamera. Also, the death sequence is being performed in a Coroutine:

public void killPlayer() { StartCoroutine( playerDeathSequence() ); }

IEnumerator playerDeathSequence() {
  playerMovement.enterStaticState();
  yield return new WaitForSeconds(1.0f);
  fadeManager.Fade(true, 1.0f);
  yield return new WaitForSeconds(4.0f);
  playerMovement.GetComponent<Rigidbody>().velocity = Vector3.zero;
  playerMovement.GetComponent<Rigidbody>().position = checkpoint.position;
  fadeManager.Fade(false, 1.0f);
  yield return new WaitForSeconds(1.0f);
  playerMovement.exitStaticState();
}

Also, side-note; your FadeComponent solution from yesterday did what I wanted it to do. Thank you again for your help with that. 🙂

ivory wraith
#

You don't call it on a specific camera

#

CinemachineCore.OnTargetObjectWarped is static

#

and nice (:

ivory wraith
#

So I think you will want to do this

#
Vector3 oldPosition = playerMovement.transform.position;
// set position, etc.
yield return new WaitForFixedUpdate();
yield return null;
CinemachineCore.OnTargetObjectWarped(playerMovement.transform, playerMovement.transform.position - oldPosition);
#

you need to tell it about the object that it's following or tracking

#

so if it's looking at something else, you need to get that transform

#

Actually...

#

CinemachineCore.ResetCameraState might be even easier

#

It tells every camera that its previous state is invalid and resets all CinemachineBrains' state

#

The docs suggest using that when restarting a level

gleaming harbor
#

I'm not sure how to call that from inside the coroutine, as it's telling me it doesn't exist.

ivory wraith
#

What doesn't exist? CinemachineCore?

gleaming harbor
#

Sorry, the 'ResetCameraState()' funciton

ivory wraith
#

bah, it's a CM 3.0 thing

gleaming harbor
#

Ah, that would explain it. queenk4TwT

ivory wraith
#

You can recreate it pretty easily, though

#
        public static void ResetCameraState()
        {
            var numVcams = CameraUpdateManager.VirtualCameraCount;
            for (int i = 0; i < numVcams; ++i)
                GetVirtualCamera(i).PreviousStateIsValid = false;
            int numBrains = CinemachineBrain.ActiveBrainCount;
            for (int i = 0; i < numBrains; ++i)
                CinemachineBrain.GetActiveBrain(i).ResetState();
        }
gleaming harbor
#

I'm currently using Cinemachine 2.9.5

ivory wraith
#

That's all it does, and it looks like everything in there is public

#

the names might have changed though

gleaming harbor
#

I'll give that a shot, then. 🙂

plucky juniper
#

why is my cinemachine camera so zoomed in
how do i zoom it out
im on the 3.0 version

ivory wraith
#

change the ortho size on the cinemachine camera

warm verge
#

I am sorry for the misconsception

ivory wraith
plucky juniper
#

i cant find a size parameter

#

you mean the cinemachine 2d platformer camera component?

ivory wraith
#

No.

#

look at the cinemachine (virtual) camera component

plucky juniper
#

nevermind i just fixed it

#

thanks for your help

errant shard
slate crane
#

when i install cinemachine, there is no tab for it at the top so i cant actually make the camera that i need

#

nvm i figured that out

#

my bad

#

but now i need to know how to make the background move with the camera.

last briar
#

Hey, why when I link the cinemachine camera and press play mode does it unlink?

royal tartan
#

Maybe in Start or Awake

last briar
#

i need the main cam reference to use the look at function in another script

ivory wraith
#

sure

#

just don't set the reference back to null in your code, which is presumably what's happening here

last briar
#

i don't referencing back to null i think

royal tartan
#

GetComponent returns null here

#

Since that component is not on the same object

last briar
#

I didn't know GetComponent return to null

sharp tree
#

I can't see Dolly Track's Waypoints as gizmos and there are not much properties to change what should I do

sharp tree
sharp tree
#

why i am unlucky in everywhere, all kind of weird problems come to me

#

almost every error get is different unique kind of

#

my pc is not even that bad

#

oh i fixed

royal tartan
#

YOu must enable gizmos to see gizmos

sharp tree
#

do you know how can i test virtual camera

#

it is little complicated

#

i made 2 path but camera doesnt move

sharp tree
#

goddamn almost no tutorial explained you need to make Animation for dolly for with path positions even if you create dollytrack

#

i thought it would added automatically

gleaming harbor
ivory wraith
#

it looks like a bunch of stuff got moved around in the 2.0 -> 3.0 transition

#

VirtualCameraCount is a property of CinemachineCore there

#

GetVirtualCamera should also be called on CinemachineCore

gleaming harbor
#

In order to get Cinemachine Core, do I need to bring that in from a serialized field?

ivory wraith
#

no, that's a static class

#

oh right, it's not a static class :p

#

CinemachineCore.Instance

#

it is a singleton.

gleaming harbor
#

Ok. So, the last two issues seem to be ActiveBrain-adjacent.

ivory wraith
#

same deal: ActiveBrainCount is on CinemachineCore

gleaming harbor
#

AH!

#

So, ActiveBrainCount wasn't a value that it had so I selected the closest one; BrainCount.
The only other issue now is that ResetState() doesn't exist and I'm not seeing anything comperable in the list of intelle-sense options.

eternal raptor
#

would cinemachine work for a mobile game, or it dosent really matter which platform

ivory wraith
#

the platform doesn't matter

ivory wraith
#

(to null)

gleaming harbor
#

Well, the errors stopped but, despite those changes, the camera still doesn't return to the player immediately, when the players position is re-assigned.

ivory wraith
#

hm, setting the previous state to be invalid should cause the virtual camera that follows the player to immediately jump to the player

#

since that'll stop all damping

#

i wonder if you're simultaneously switching which virtual camera is active?

gleaming harbor
#

I'm only using a freeLookCamera

#

Then again, that could just be me misunderstanding Cinemachine, alltogether...

ivory wraith
#

oh, right, one important thing: you're updating the rigidbody's position, right?

#

i think we talked about this but i forget

#

show me where you call ResetCameraState

gleaming harbor
#

I only have 2 camera-adjacent objects; 1 main camera game object & 1 Third-Person Freelook Camera.
The main Camera has the brain on it, while the 3rd person camera has the FreeLook cam & Cinemacine Collider.

ivory wraith
#

That's all correct.

gleaming harbor
#

Ok. Just wanted to ensure I didn't botch something further back in time. TwT
This is the code where I call the ResetCameraState:

ivory wraith
#

You're calling ResetCameraState too soon

#

The player isn't actually moving until the next fixed update

#

add a yield return new WaitForFixedUpdate(); before you reset the camera state and see if that changes the behavior

gleaming harbor
#

Ok. :3 I'll try that now

#

Well, now I'm getting an error once the screen fades out & doesn't fade back in. XD

ivory wraith
#

well, what's line 86?

gleaming harbor
#

It's the 2nd for loop. Commenting this out results in it working exactly like I wanted it to.

ivory wraith
#

okay, but what's line 86? :p

gleaming harbor
#

*With the yield return in place

ivory wraith
#

presumably it's the line that assigned a duration

#

because the active blend was actually null

gleaming harbor
#

cmCore.GetActiveBrain(i).ActiveBlend.Duration = 0.0f;

#

That's at 86

#

I had tried swapping it before and forgot to undo it. Let me put back the other code block and test again...

#

So, I put the line within the 2nd for-loop back to cmCore.GetActiveBrain(i).ActiveBlend = null; and there's no change in the desired behavior. I think I might just remove that 2nd for-loop, unless there's some reason having it would be required?

#

So, funny thing; Out of a sense of curiosity, I tried handing the monobehavior the CinemachineFreelook Camera as a serialized parameter and ONLY setting the PreviouStateIsValid=false after the WaitForFixedUpdate() without callling the ResetCameraState() function and it also works. :T
The WaitForFixedUpdate() was the solution and I'm grateful for your help. ❤️ That said, sorry we took the long way to get here.

fiery spear
#

does cinemachine block curor input?

unkempt forge
#

Depends on what you mean exactly though

fiery spear
#

well I'm trying to make a trigger when you click a gameobject but I'm not sure if cinemachine is blocking the input or not

unkempt forge
#

It would not

fiery spear
#

okay thank you

tropic falcon
#

my cinemachine camera has not got the body options
where do i get them?

royal tartan
wary patrol
#

so i want to create simple turntable record, and what i did was create track and hope for the best that the shape is goint to be perfect circle, is there anyway to make perfect circle? like some preset shape for the cinemachine track? i mean sure i can just turn the character around but i want to try using cinemachine

royal tartan
wary patrol
snow lintel
royal tartan
#

Only that prefab that's a child of the player

#

(sibling of the follow target)

untold folio
#

why is my camera constantly spinning

snow lintel
royal tartan
snow lintel
royal tartan
#

So the root object is actually moving

untold folio
snow lintel
untold folio
#

its spinning even when i dont set the target

#

im using urp

#

if that has anything to do with it

#

anyone please?

royal tartan
#

Basically I don't think the virtual camera you have selected is being used

#

And wait you have Transposer and composer settings for it without a target?

untold folio
#

it works

golden stag
#

Hello ! I would like to display a vfx above a button(the button will be invisible) but I struggle a lot.
technically this is what I got
But when I make this button spawn (it a simple dialog box) everything spawn except the vfx or lets say it spawn because I found it in the hierarchy but the camera don't render it.

#

And I use cinemachine for the camera and feel a little lost even if I guess I have to have a specific camera with a specific layer to display it (it don't work)

ivory wraith
#

Cinemachine decides where the Camera goes. It doesn't really control what gets rendered

snow lintel
crimson widget
#

hi finding it very hard to get a result I'm after - thought this was a relatively simple scenario but the camera just won't behave. perhaps someone can suggest a set up that might work.
I've currently got a Clear shot setup with a Main (red) and Above (blue) camera (positioned at highest potential point) but it's not working, the camera occasionally moves closer when blocked etc. and also yaw rotation (how do I limit rotation to only one axis? the damping set to full still doesn't stop it)
Here's a diagram of what I'm after:

  • The camera should only pitch, no yaw or roll (well tiny amount for the Framing Transposer delay). Works mostly - I need the pitch rotation mainly so can't turn off the Aim.
  • The camera should ALWAYS remain on the z axis it's set on (it should attempt to climb the Y to get the shot ONLY- if it can't see then too bad, it's blocked). I can not get this to work - the priority to 'get it in shot' overrides every attempt to stop the camera moving forward. I've tried the 2D and 3D confiner (a flat 3D collider seems better than a 2D one..). Every setting to Preserve Camera Distance. Camera Distance set everywhere. But it will still move forward to get the shot. Adding a Aim Hard Look At and a Confiner makes the camera spin uncontrollably and also move outside of the confiner....actually bascially any Aim makes it spin.
  • The camera should use the Framing Transposer so the softzone moves the camera when in it either X or Y - it should 'mainly' be parallel on the y and z axis, offset to a FIXED z axis.
  • When the view is blocked the camera should give up gracefully not jitter like a mad dog
  • A Dolly track doesn't move up and down the Y and it also yaw rotates - alos note that the 'ball' can go below the y =0 to below etc so camera needs full freedom on Y axis.
    Any pointers would be appreciated of how to break this down into components. I thought even a single Virtual Camera should be able to handle this situation but yea nah.
odd pendant
#

i'm confused, Main camera is in the middle, why are there dots around the left camera and lines around the right camera. Also when I play it shows the right camera even if the main one has priority

royal tartan
#

Those don't look like Cinemachine virtual cameras

odd pendant
#

yes, they are the unity default cameras. I didnt know where to talk about my issue

royal tartan
odd pendant
#

thanks

obtuse swan
#

Can someone help me understand why the camera zooms in on the characters butt when the character starts moving, i feel like it has something to do with the height of the terrain because it doesnt happen as often when the character is on flat terrain...

royal tartan
obtuse swan
royal tartan
#

that's what actually determines the camera position and rotation

obtuse swan
royal tartan
obtuse swan
#

could be..let me check, thanks in advance for answering👏❤️

#

I changed the bottom rig radius to 1 and its happening less, I also tried putting the avatar again into the follow and look at sectors just so see if anything changed, and now its definitely happening less but when it does it zooms in on the characters feet.. hahah

dreamy river
#

The camera thinks that the model is blocking its view of the target transform and is trying to course correct by pulling closer to the target since the collision behavior is set to 'Pull Camera Forward'

brisk pike
#

Hey,
I'm combining Transposer Body and POV Aim for achieving looking at the target and can look around in specific range. The issue is, camera is not rotated to the target and it always on specific rotation which is set on Aim Horizontal and Vertical.

#

Is it possible to achieve with Cinemachine or I should set the camera rotation myself on the script ?

fossil vector
#

hey,
when implementing cinremachione to my camera i started to go in al directions when trying to move anyone else has had this problem and maybe knows how to fix it ?

alpine prawn
#

Could anyone help me creating Furi's camera in Unity? https://youtu.be/hYb-_O0UA64?si=ovqJ7JellFkCONRZ&t=427

I don't want it to rotate and I want camera to move closer if I get closer to the target and vice versa.

I've tried setting body to framing transposer and aim to composer and tinkered some options but I can't get it working...

errant shard
#

Or Framing Transposer

#

Or Group Composer with Target Group
I'm not precisely sure which is the exact match but there's an abundance of good options

ivory wraith
#

good

#

so yeah, this'll be a Target Group

alpine prawn
#

I kind of got it similar with Furi using target group, world space transposer and a composer

#

still needs some work but for now its okay I guess

raven sluice
#

hey guys im stuck with an issue where when cinemachine activates , any script thats referring to camera.main doest get stuck to last position and rotation
how to solve this
im unable to do any thing properly due to this
Camera.main.WorldToScreenPoint this gives wrong value due to this please help

split flicker
split flicker
#

Found the issue. The actual issue was that I gave the follow and Look At Target the Actual player mesh. The issue was that if the player mesh updates it's position, and because the follow and look at target focuses on the origin point or Pivot of the actua lmesh, it cases the weird stuttering. Adding a Player Focus point game object fixes the issue. Now the camera focuses n the focus point that is now a child of the main player game object.

#

super weird but it works

deep wolf
#

Hello
so i have finally setup the cinemachine BUT the rendering of the 2 cameras is in the same place 😦 . how do I make my second VirtualCamera go to the left?

deep wolf
#

ty

deep wolf
#

(My virtual Camera is at Layer P1 too)

royal tartan
#

You can set the culling mask to everything EXCEPT P2

#

don't make it ONLY P1

deep wolf
#

i will try

deep wolf
sharp cairn
#

My camera keeps going to the back of the player when it's moving forward.

main parrot
#

I feel bad for even asking this, it should be easily googleable, but for some reason I’m not getting any good results, so here we go:

How do I get my cinemachine 3rd person camera to zoom properly? Do I adjust the orbit radius? That seems to result in a weird motion.. any suggestions/links appreciated

errant shard
main parrot
# errant shard Properly? What's the weird motion you refer to?

€dit: might found my problem.. when using the sphere instead of the 3 rings the result seems to be a lot better 🙂

Well.. i'm using the three ring setup and when I got my camera between the middle and the top ring (as most players would probably) and I adjust the zoom the camera keeps the player character in the center resulting in the camera "looking from the top onto the characters head from above" when zoomed in entirely

#

So this would be my "normal" (or at least the correct angle)

#

And this is "zoomed" aka middle orbit radius decreased

#

Additionally this part seems to not have any impact for some reason:
When I zoom using my Mousewheel the "Input value flickers to some value" but nothing happens, tried multiple values for gain, player index, etc.

fossil vector
#

can someone help me so when i when i look around using the unity input system i can see in the scene view my player is looking around but you can see that the player body is like moving a bit to where i am looking but not fully so when i am moving forward affter looking in a certain direction my player just goes in a random direction can anyone help me ?

royal tartan
mystic cloak
ivory wraith
#

Do all of the virtual cameras involved have the same priority?

#

Although, that should only affect which vcam starts out live: if you enable a camera with the same priority as the current live vcam, it will become live

mystic cloak
ivory wraith
#

I noticed that the camera is still switching in the build

#

it's just in the wrong position

weak osprey
#

How do i enable the window thing?

#

Like these blue red lines

royal tartan
#

possibly you have to enable some gizmos or something along those lines

weak osprey
#

I have the Game Window Guides enabled tho

#

What's gizmos?

royal tartan
mystic cloak
#

this sdoesnt happen in the editor too, its strange

full sinew
#

question deleted:)

royal tartan
#

They all seem unrelated

full sinew
royal tartan
#

But, this doesn't really have anything to do with Cinemachine

full sinew
#

you're right i should've wrote this to animation channel notlikethis or modeling or somethn

#

thank you though 😄

mystic cloak
cosmic jasper
#

Ok so my follow target flips when My character is Upsidown, I need to rotate the main object because its physics. How can I keep the follow target pointing the same direction before flip, I tried code but it was wonky.. The issue isn't there is the follow mode is no long Lock but then when player turns it doesn't stay behind the shoulders. Any ideas how I might solve this ?

#

You can see here a bit better, the camera stays locked behind shoulders but flip problem is there, if I switch to simple follow now it doesnt stay directly behind the shoulders but it nice and smooth doing a flip , so yeah the the problems are in contrast the camera cannot stay behind shoulders if its gonna flip shoulders point other way makes sense.. I see the problem but no idea how to solve it.
It

#

or maybe in Simple follow Binding mode is there a way to make it go back to behind the shoulders?

#

I tried switching binding mode through code when its flipped but looks jarring

mystic cloak
mystic cloak
#

im not getting any errors in the build either

ivory wraith
#

Do other camera blends behave?

sand panther
#

ok, I'm dealing with a bit of a problem, my cinemachine tends to go wild sometimes

#

what do I mean by that? I'm using it to make a third person view, and sometimes the mouse controls properly

#

but sometimes the sensibility goes to 100

#

and then sometimes go to 0.1

#

and I can't find a pattern on why this is happening

royal tartan
sand panther
#

I don't think so, already tested removing every part of the code that reference the cinemachine

#

with exception the one that make transition from aiming to normal

royal tartan
#

so how are you rotating your camera?

sand panther
#

the only part that seem to be changing is the input value axis

royal tartan
sand panther
royal tartan
# sand panther

show the configuration of the action itself. This is the pointer binding

sand panther
#

you mean the input provider?

royal tartan
#

No I mean the Look input action

#

click on that

#

and show the screenshot

sand panther
royal tartan
# sand panther

hmm not too sure. See if anything changes if you remove the other bindings for example

sand panther
#

nop

#

but I think it might have something either with the update or with the transitions, either from location or from camera to camera

#

I found something

#

this erro is not happening when the display is small

#

but when I make him bigger, this inconcistence starts

royal tartan
sand panther
#

but what, I don't know

#

found the problem

#

update mode on the cinemachine brain

#

forgot this existed

#

thanks for the help

sudden furnace
#

hello im trying to make a fps game and i want to make the camera shake when walking and moving but for some unknown reason it wont let me do so if anyone could dm me and help me out with this thank you

royal tartan
#

Show what you tried and what happened when you tried it

viral burrow
#

Hey there! I could really, really use some help with my Freelook camera. The camera works as expected in the editor but is way to sensitive in the build.

#

Any help would be appreciated!

surreal sail
#

For the first time im trying to use Impulse Listener/Source, which seem to be very straight forward to set up according to documentation, but whatever I do I cant make it work. I have Listener on my currently active virtual camera, I have source on some game object, I hit "Invoke" button or try to use GenerateImpulse() through code, and no matter what settings I have (tried almost every one) literally nothing happens. Am I missing something crucial?

sudden furnace
surreal sail
#

I have tested in clean environment and impulse works just as it should, but in environment when I want to use it it does not work, like something is disrupting it there. Im Trying to delete every custom script on main camera one by one (there are a fiew) to see if its their fault, but nope... stil doesnt work. What can interrupt it or how to find it?

royal tartan
tacit tree
#

I need some help, following this tutorial but give different result after changing strategy to pull camera forward

surreal sail
#

but now I have a serious issue. I have 2 cameras with diffirent look at targets, and blending bewtween them is a mess... it should do ease in out but when I attached some script to debug where lerped look at target is during a blend, it appears that it is clearno not an ease in out. Camera position is lerped correctly, but this look at target goes crazy...

#

to be clear, this is my simple debug:
transform.position = brain.ActiveBlend.State.ReferenceLookAt;

#

correction: this video actually had settings with linear blend and not ease in out, but clearly its not linear either

surreal sail
#

I came to a conclusion that this happens only with this camera, so I just need to figure out what can influence lerping look at target position, but I dont have any idea, anyway it is read only so I doubt that someone is overiding it in code or something...

surreal sail
#

remaking whole camera from scratch and pasting all the values in fixed it. I ended up with exactly the same setup but working, so maybe some legacy stuff were serialized in it that broke blending or something, idk... but yeah, seems like unaccesable serialized data or some other meta garbage coused the problem

slim jewel
#

Guys why the post process volume component doesn't affect my scene 💔

opaque wigeon
#

is there any way to add multiple FreeLooks to a camera? i want to flipflop between them depending on the current controller scheme but i get this

#

is there perhaps a better way to do what i want

#

right now im setting the properties through code, but it gets messy and bit hardcoded

#

would be a lot nicer to just use the editor they already have laid out through FreeLook

#

and to just create two components

royal tartan
opaque wigeon
#

oh how come

royal tartan
#

virtual cameras (including freelook) should be their own independent objects

#

separate from the actual Unity camera

opaque wigeon
#

ah i see so the main camera only has the brain and that decides which virtual camera to use?

royal tartan
#

yes

past flint
#

for some reason, when i try to use cinemachine, i dont have the option for a virtual camera, anyone know why this is the case? am using HDRP project and unity version 6 preview

warm verge
#

can anyone tell me how to properly zoom out without having your sprites all that much pixelated? i use hand drawn 256x256 sprites

#

when standing still its even more pixelated, when moving its fine

warm verge
#

for some reason i can not change ortho size in any options when having pixel perfect cam
i also tried to have the extension added at the virtual camera, dont work

please someone 😦 i only need to change size now! 😦

royal tartan
#

if you're using cinemachine

#

it's under "Lens" settings

warm verge
ivory wraith
#

e.g. it's just CinemachineCamera now

past flint
#

then i had issues with all dolly tracks going at the same time so that was a bit shit

#

i made multiple dolly tracks

#

but they all went at the same time

#

ot should i have done one dolly with multiple tracks?

ivory wraith
past flint
#

they woul all start at the same time

ivory wraith
#

do you mean you had multiple Cinemachine Spline Cart components, and that they had "Automatic Dolly" checked?

#

If not, you need to show me exactly what you're talking about

past flint
ivory wraith
#

You can turn that on and off via script

#

or change the speed

past flint
#

how would i do that? i cant find it online

sand wyvern
#

Hey guys when I add a free look cinemachine its just black.?

#

Also where am I suppose to put cinemachine brain

#

Can I put it on an empty game object

#

Normal cam works ifne

#

Nvm I got it

#

Is there a way to move my free look camera across the rigs

#

In scene view / pre play

upbeat linden
#

Hello. How can I not return to the starting virtual cinemachine camera after playing the cutscene?

royal tartan
upbeat linden
#

Thank you

errant shard
sand wyvern
lavish notch
#

Hello, I am using a FreeLook Camera on a faster moving player. My problem is that when the player moves towards the camera, the camera follows too slow to adapt to the player so the player just gets too close to the camera? Is there anyway to speed up the following camera?

#

so TLDR, anyway to increase the follow speed of my camera?

errant shard
#

You can even blend to a vcam with different settings dynamically based on player speed

lavish notch
lavish notch
#

I set my damping values to 0 and the problem still occurs?

#

oh there are more damping values under Body

#

ok I fixed it by editing my dampening values thank you very much for your advice !

sterile oasis
#

Hey - Have anyone here gotten world space UI to work with cinemachine cameras? I have a world space button that works with one virtual camera, but doesn't when switching to a camera from a different angle.

errant shard
fading falcon
#

my cinemachine isn't working i guess, i created a free look camera and tried it but it says its not rendering

errant shard
#

Even just the first few pages

fading falcon
#

got it to work, thx

tawny surge
tropic marlin
#

hey, how can I use cinemachine to make the camera follow two players but in online Multiplayer (I can't drag the player prefabs into the target group object)

royal tartan
#

add players to the group when they join

#

remove them when they leave

tropic marlin
#

but how xD

#

I tried it with a tag but its a bit hard

royal tartan
#

presumably your network framework has callbacks for players joining and leaving the game

#

you also could do it in the OnEnable/OnDisable for the player objects

tropic marlin
#

I mean I tried to find the spawned play using its tag and then adding it "to the script"

royal tartan
#

I'm going to be honest here

royal tartan
#

it sounds like you're a very early beginner to Unity

tropic marlin
#

I am xD

royal tartan
#

in which case, it's probably not the best idea to be trying to make a networked multiplayer game

#

that's a very advanced topic

tropic marlin
#

I have been told that maaaaaany times but I have spent so much time now, I have to finish it xD

#

but thank you very much for your help 😄

royal tartan
#

you should at least go learn the basics

tropic marlin
#

oh I am working on another project at the same time so I learn them

#

could you recommend a youtube tutorial or something similar?

#

*do you

royal tartan
#

!learn

marble yachtBOT
#

:teacher: Unity Learn ↗

Over 750 hours of free live and on-demand learning content for all levels of experience!

tropic marlin
#

ohhhhh, thank you very much 🙂

peak gyro
#

Is it possible to implement in cinemachine to apply post processing to specific items rather than everything being rendered? I have a stacked camera system that does this--main cam renders normally and an effects cam that renders the effects with bloom.

royal tartan
#

it only positions and rotates the camera

loud umbra
#

im following a yt video. im trying to find the cinemachine.axisstate but im getting errors

#

did the script change?

loud umbra
# royal tartan Share the actual errors

Okay i understood the problem this is the video uses the old input system. Now im using the new input system. I wanna control my camera movement using the mouse however i cant figure that out

#

i have check and it says to use the new cinemachine input provider however there is a message that says that the script is deprecated

#

what should i use?

royal tartan
#

Anyway it depends on which version of Cinemachine you have installed

loud umbra
royal tartan
vestal goblet
#

i have this code in the camera

#

when i run the game the z values of the ship and camera match

#

so i dont see anything

#

someone told me to use cinemachine

royal tartan
#

Using cinemachine would mean deleting your script and using Cinemachine instead.

vestal goblet
#

yea how do i use it

#

is it a component or what

#

im a beginner

royal tartan
vestal goblet
#

tysm

raw turret
#

Hi, I'm using Cinemachine and I implemented a mechanic where the camera rotates around a point by pressing E/Q.

The problem I find is that when xDamp is > 0, the rotation is affected and looks bad.

How do you handle this mechanic with Cinemachine?

royal tartan
loud umbra
#

should i still use it

#

i have tried using the inputaxiscontroller

#

however it requies another component called cinemachineorbitfollow

#

but the problem is

#

that the component does not work

#

im confused now what to use

royal tartan
tawny surge
verbal meteor
tawny surge
verbal meteor
tawny surge
verbal meteor
verbal meteor
#

but now if your game is third person like mine then you'll run into the same issue with zooming in while the camera is against a wall xD

tawny surge
timid igloo
#

Bruh, I'm using the newest unity 6 cinemachine and I can't even change FOV, how?

royal tartan
timid igloo
rough tinsel
errant shard
royal tartan
rough tinsel
# errant shard It would be best to explain what you refer to

Yes. I'll try to explain what I want: I have a player that the camera should be watching. But the player appears at a certain button, that is, initially he is not in the scene. I press a button and the player appears in the scene and the camera should be working and watching him.

In general, to make it convenient, we consider the camera at the GTA 5

errant shard
rough tinsel
#

yes

errant shard
#

It cannot follow a player that exists outside of your scene in your project assets

rough tinsel
#

if the object was in the scene, then everything would be fine, but it exists as a prefab

#

and object wasn't in the scene

errant shard
#

They're not the same object

rough tinsel
#

That is, if the object is a prefab, then it will not work out?

errant shard
#

You could have any number of player instances in your scene, but none of them are the prefab asset

#

When the player appears in the scene, you would then assign that instance as the targets of the vcam

rough tinsel
#

Yes...

#

Can this be done with Cinemachine?

fast orchid
#

Yes, you can set the properties of the cinemachine component at runtime. When you spawn your player in, you can set the follow/lookat targets of the virtual camera to the player with code.

rough tinsel
#

Can you help with that, please?

rough scaffold
#

Might be a silly question, but I'm still learning to get comfortable with Unity - is there a way to unassign the Look At property here?

#

nvm I somhow didn't see the top of this menu lol

errant shard
warm verge
#

I am trying to create a fade-in-out effect while switching scenes. Therefore, I am in a challange where i must not use UI (Any canvas component counted as UI).
I thought of using Cinemachine Volume Settings in Cinemachine Camera extensions to control the brightness of whole screen by a weight. But how do i control multiple volume profiles at the same time? This only accepts single volume settings in a single Cinemachine Camera. For example, i could want some health low effect if i had a chance to add second Cinemachine Volume Settings
Oh! I realized the Volume component has a weight option too. Okay i believe i found my answer

royal tartan
warm verge
rough tinsel
errant shard
rough tinsel
errant shard
rough tinsel
#

What I need is to give a link to the prefab, which is not in the scene

#

Remember?

errant shard
rough tinsel
#

Okay... Thank you 🙂

balmy bay
#

Hey so I'd made this cameracontroller way back, it sort of orbits around the car when moving the mouse, but also follows the car. It has a constant distance to the car that can be changed by scrolling (zoom)

I've tried so many things and searched so much to get this exact same functionality, but with cinemachine, but I can't figure it out. Does anyone know how I can replicate this with cinemachine?

royal tartan
balmy bay
#

Wait so I can just reuse the script I already have for the Cinemachine camera?

royal tartan
#

I have no idea what script you have

#

but yes you can use any script you want for a vCam and just set the vCam itself to do nothing

balmy bay
#

nice that's really good to know

#

thank you

lilac hatch
#

Hi guys, I was directed here. Hope it's a good place for my question

#

I've got a few orthographic cameras side-by side that I'd ideally like to clear to transparent, and put a singular background behind them i.e. a skybox cam.

#

Do I have to render the ortho cams to a rendertexture or something in order to match the viewport rect of the background cam?

ivory umbra
#

Sup guys. I'm trying to make a first-person cam, but I can't figure out how to rotate my player based on the where the cinemachine virtual camera is looking?
How to go about this? Please tag me with your response, thanks!

loud umbra
#

Hi i have the latest version of cinemachine 3.1.1 and i want to access the value for the vertical axis of the orbit follow for the cinemachinefreelook camera. Many scripts used in youtube tutorials are outdated. Can i get some help

loud umbra
#

the class is deprecated what should i use then

errant shard
loud umbra
#

so now i have to use CinemachineCamera

#

but now i have problem with accessing the properties

#

how should i access the value for the horizontal axis in the orbit follow

loud umbra
#

no i wanna control the axis for the camera make it move

#

for someone using the old version the m_XAxis is used to control the X axis

#

now for the new version

#

what should be used

errant shard
#

There's many ways to move a vcam in that situation though, either modifying the rig orbits, their values or value ranges, blending with a vcam of a different rotation, or maybe altering the input signal between the input provider and the vcam

#

All have kind kind of a different effect and feel

loud umbra
gleaming harbor
#

I hope someone might be able to assist me with this; I'm hard-reassigning my players position ( ie. teleport ) but my cinemachine camera refuses to accept trying to hard-assign it (I need this to work). How can I wrangle in the Cinemachine camera to force this to allow immediate position re-assignment?

gleaming harbor
#

So, the camera still follows after the player once they teleport but it interpolates across the distance the player teleports, instead of just 'being teleported' via position re-assignment.

#

And I can't just go cinemachineCamera.transform.position = player.transform.position because it just doesn't work

errant shard
gleaming harbor
#

I tried using the following to try to fix it but it hasn't resolved anything:

#

So, I'm using Cinemachine 2.9.5 so that wont work

errant shard
#

Another suggested option is to disable the vcam, move it, then re-enable

gleaming harbor
#

Oh, wait

#

Ignore my previous statement. Let me give that a shot

gleaming harbor
#

Still no success with that, sadly.

gleaming harbor
#

So, I'm running into an issue with trying to use that function. It's giving me an error :

Vector3 teleportLocation = GameObject.Find("Checkpoint_" + teleportValue).transform.position;
Vector3 teleportDelta = rb.position - teleportLocation;
rb.transform.position = teleportLocation;
Cinemachine.ICinemachineCamera.OnTargetObjectWarped(rb.transform, teleportDelta);

I'm trying to give the OnTargetObjectWarped the players transform but it's rejecting it with the following error:
"An object reference is required for the non-static field, method, or property"

I also can't use serializedField to obtain access to any of the information I need, as those objects exist in different scenes.

gleaming harbor
#

Ignore what I had said previously, that was the solution, I was just using it incorrectly.

Vector3 teleportLocation = GameObject.Find("Checkpoint_" + teleportValue).transform.position;
Vector3 teleportDelta = teleportLocation - rb.position;
rb.position = teleportLocation;
cmFreeLook.OnTargetObjectWarped(rb.transform, teleportDelta);

Thank you very much for your assistance, Spazi. queenk4KazmaExcite queenk4Bread

errant shard
ivory umbra
#

Hi, I'm trying to make a first-person cam, but I can't figure out how to rotate my player based on the POV of a cinemachine virtual cam.
How to go about this? Please tag me with your response, thanks!

velvet gulch
#

Has the ability to set separate target offsets for each ring in a Freelook camera/rotation composer been removed in Cinemachine 3? Can't seem to figure it out after upgrading :(

royal tartan
#

Add a modifier for distance or composition

#

Depending on what you're going for

velvet gulch
#

doesn't seem quiteee the same unfortunately, but i think i can make it work, thank you :)

sudden isle
#

so i have a 2d rpg game and when my player rotates the cinemachine camera rotates with it

royal tartan
#

Change it by changing the aim settings

royal tartan
#

You can't unify it. Mice in particular have drastically different sensitivity for each person which is determined by the operating system settings as well as your mouse hardware

#

So even if you unified it for your particular setup, it will be different for someone else

#

The best thing to do is just have a sensitivity slider in the settings

sudden isle
#

wait i think it works now

#

nah not well

#

i tried switching body to frame transposer

#

now its weird

royal tartan
#

show your setup and explain what you want

sudden isle
#

i will show u the problem

#

my player rotates 180 degrees on y but the camera for some reasons goes from z position 10 to -10

royal tartan
sudden isle
#

when i turn

royal tartan
#

this is much less useful than a screenshot of your virtual camera inspector with Body and Aim expanded

sudden isle
royal tartan
sudden isle
#

and same problem occurs

royal tartan