#🎥┃cinemachine
1 messages · Page 7 of 1
does also stutter (sourrounding objects) but what is weird is that it somehow depends on the camera angle
is your players rigidboyd interplate?
yes
that's weird
can you try setting the velocity in update instead of fixedUpdate?
when setting velocity you don't need to use fixed
and set the camera as lateUpdate
actually its even worse then
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 🖤
sometimes the build is not same with the editor
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
it might be the reason that was worse? maybe the player was selected?
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.
@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
I actually found you can override the World up on the cinemachine brain
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
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
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
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! 🙂
question can you have like 10 cameras with their own layers and not cause the cpu to waste performance
why would you do that
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?
I been explaining my problem but it not the right solution
pretty much
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
don't you just need to show the player in front of the platform while jumping?
yes but i seem to found my problem
what is the problem
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
why don't you just use urp render features?
Because it goes though some parts of the stage plus I only need it to be though when he jumps
or at least when he at the air
then switch it on jump state
I tired that switrching the layers cause it to overload the cpu
Unless if there a way to switch that setting off via code
@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
how to invert cinemachine camera direction?
when i pushed my mouse upwards the cam points down and looks at ground
Assuming you're using a Cinemachine input provider component, set the Y axis gain to the opposite of what it is
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:
When and where are you running this code?
Rigidbody.MovePosition should only be used in FixedUpdate
Every FixedUpdate and nowhere else
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.
Though I was told on Reddit that MovePosition only does interpolation on kinematic rigidbodies
So maybe that's the issue
Why use MovePosition
why not just set the velocity?
Looking at it in slow motion, this checks out
Where the camera looks is based on the Aim settings of the vCam (the rig)
Then I would have to separate and recombine the base and platform velocity all the time, and I worry that would be annoying to work with
But I guess it's worth a shot
I don't really understand what you mean by this. If you were using MovePosition that would be completely overriding any velocity you had anyway
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
Thank you :D
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. 
That page is a bit outdated
https://docs.unity3d.com/Packages/com.unity.cinemachine@2.9/manual/CinemachineImpulseSource.html
You can find an example of impulse sources in Cinemachine's importable examples
I think you would rather have a variety of different impulse sources rather than editing the properties of one in a script
You also have the option of using noise rather than impulses
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
I can't seem to get it to work with just noise, are there some extra steps required with this method?
nvm I was doing something wrong on my end
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
Hey do you have any idea how to solve this camera-shaking issue when walking upstairs? (character controller)
Some vertical Body damping might be enough to solve that
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
That last one is 👌
thanks 🙂
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
Anyone have any issues with cinemachine not following a player's transform when "apply root motion" is checked on?
I don't think cinemachine really cares about animators. I've not seen that.
Hmm I see the reason I suspected that was because disabling root motion was an immediate fix but I'll continue to troubleshoot for other causes, ty
I would guess that whatever you did with the animator resulted in the object the vCam was following not moving
where is the library folder
cause im getting a compiler error and i cant find that folder to delete it
Can someone help me sort out the "The type or namespace name could not be found"
You already have instructions, something wrong with them?
Repeating the question isn't going to yield more information than you were given
Well ive tried looking on google and nothing helped
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
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?
use a cinemachine target group
the members of the group should be the player and the cursor
Am I doing something wrong? Nothing's changed
you can't use the ui element as the second target
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
How can I get it to point at the target group? By making it point at the player?
The cinemachine vcam is parented to the player. Is that an issue?
How though? Should the target group be a seperate object?
It should not be
yes
that's what I said
follow the instructions: https://docs.unity3d.com/Packages/com.unity.cinemachine@2.10/manual/CinemachineTargetGroup.html
This is how I've got my CursorWorldObject following my cursor. Is this correct?
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?
not quite
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
Yeah, I noticed
Magic numbers are never a good idea
Okay, but the camera is rotating like this when it shouldn't
Not sure how to fix it
For 2D you should be using a framing transposer
in the body settings
and leave "Do Nothing" for the Aim settings
show your virtual camera settings
and the Transform for this thing?
Follow should be the TargetGroup
not the player
and you can remove the Look At
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
yes it now should be following the target group
so it's like the average of the mosue obj and the player
How can I limit how much the camera moves with the cursor?
change the weights in the target group?
but also your code that moves the cursor object can limit the distance from the player
Thanks for all the help!
i have done all of these and i still have the error
i updated unity and it just deleted my entire project
It doesn't do that
Are you in the wrong scene?
Then either it is a different project, different scene, you never saved, or something like that.
Updating unity will not remove and assets or content
no1 i did save because i opened it yesterday and everything was there
how can i check if it is a different scene
just open the scene you want to open
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
Have you tried doing it through code?
No, but it works now when trying it again, even though I tried restarting the editor the first time
A mystery for the grave, I guess
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
Or am I just dumb and missed a setting cuz I can't find it on the documentation or the inspector
It shouldn't have a problem... maybe share some screenshots of your setup?
sorry it took me so long, here are my settings and what my hierarchy looks like and my CameraManager script (do note I am refactoring what was a game jam so some parts may not make sense)
excuse the green it's my play mode tint
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
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?
I'm using 64*64 tiles
So you're using reference resolution as zoom?
Or setting a reference resolution that's easier to zoom in multiples of 2
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?
It's expected that you don't have many zoom levels because to maintain pixel-perfectness fine zoom steps are not possible
It's not precisely obvious to me how a specific reference resoslution "solves" this problem, but I'm glad it seems to do so
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
it has a 16:9 ratio but with a not very traditional resolution in pixels
I don't know of any technical reason to stick to traditional reference resolutions specifically
thanks for respons.
Let me know if any weirdness seems to appear because of it, in any case
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 ?
Cinemachine's workflow is to have you swap between vcams
You should have one for rotation and another for over-the-shoulder
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
You are right
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
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.
the first question is "how do you want it to work"?
youi want the camera to stay behind the direction the ball is rolling in?
Try "Simple FOllow WIth World Up" for the transposer binding mode?
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
in this case it may be worth adding your own custom script here then
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
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
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?
definitely not
neither of them should be children of the player
and they should be separate from one another too
the player is just an empty, not sure if that changes stuff
separated in what way?
as in not parents or children of each other
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
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
so I guess inside the marble prefab?
yes as a child of the object that has the Rigidbody
rubber banding still occurs
im not sure if its actually occuring and I just cannot seem to notice it while using the custom script
well for one can you turn on Interpolation for the Rigibody?
That should smooth things out a lot
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
I was just trying to help you work out a solution using cinemachine tbh
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 💀
reduce damping
Hey it's cinemachine avaible for unity 5.6.7?
I believe the earliest editor you can get a supported version for is 2017.1.
Before that I think it used to be an independent asset which is no longer available
Yeah, was originally made for the Homeworld prequel and unity bought it
So there isn't any package similar but avaible for unity 5.6?
Why Unity 5.6?
Not that I remember. You would have to write it yourself
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
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)?
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
why not show the actual body and aim settings and the position in the scene where the Follow target is
show this in the scene (when the camera is in the ground)
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
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
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,
This just looks like you haven't properly positioned the objects inside PlayerArmature
They are tho.
it works when i dont have a player follow camera. But when i add one it doesnt
Your PlayerCameraRoot object is the thing moving
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
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
A new what? Do you know precisely which of the involved systems is causing the issue
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"
A new first person controller without cinemachine
Cinemachine is just a holder for the camera, as mentioned it does not affect how your player moves
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
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.
Was the PlayerCameraRoot also in correct position?
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.
Okay i got it now
Where do I get it
No idea how the package manager works in 2017 unity, or if it has one
Why are you looking at ancient versions anyway?
Because I'm modding an old game and I don't want the graphics to be affected so much
It doesn't have one
It's the same as unity 5
hi! How could I put a background in the cinemachine camera?
What components are you using for your "background", how is it meant to appear and what do you mean by "in"
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
This has nothing to do with Cinemachine
Oh... sorry then thought it could have an option for that (totally new with the component)
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
oh, thank you
Cinemachine is just for moving and rotating your camera
got it, thanks!
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
Iirc there's an example implementation in Cinemachine's samples importable from the package manager
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.
Might be
I can't find any info in the docs about it supporting more than one target
Could ask in the forum though, the developers might see it and they have often good advice to give
Aye
can anyone help make fixed camera angles
they trigger and work but dont switch angles
what do you mean by "they trigger and work"?
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
what do you mean by triggering a camera
can you share specifics of how you set things up?
like is there a way i can show you
hello, i know my question is wierd but is there a way of ussing occulusion with Cinemachine camera
What type of occlusion?
occulusion culling
Cinemachine moves the camera and changes its properties
It doesn't have anything to do with rendering related systems
then how do you not render so many object at a time
Occlusion culling is one option, sure. It just doesn't have anything to do with Cinemachine
how else can you optimize game fps
lots of ways
the first step is to use the profiler and see what your bottlenecks are
according to my profiler materials are my main problem
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.
maybe the unity Channel on youtube could help
since its has a playlist dedicated to cinimachine @opaque vault
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
What do you mean by being unable to configure the settings?
Can't you change all the things in the inspector right there?
No. If I change the position, it reverts to the former.
So set Y to 2, it goes to 10494
Are you making changes in play mode or something
nope, play mode is off
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
oh, interesting.
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?
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
gotcha
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)
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.
The virtual camera and the actual camera should never be the same object
The manual for Cinemachine explains how to do multi camera setups:
https://docs.unity3d.com/Packages/com.unity.cinemachine@2.10/manual/CinemachineMultipleCameras.html
Thanks for your response. I change that but the problem continue. I don't know if maybe is because the polygon collider look that is compose for three colliders, but I also try using a CompositeCollider to make the collider just be one but then the Camera stop following the player (maybe cause the Rigid Body but i don't know)
I make now some tests and I can ensure is something with the collider, because if I make a simple figure as a square it doesn't happend, but I would like to have a Polygon Collider for an accurate limit
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;
}
Fixed!
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 ?
Freelook wasn't designed for this. I wouldn't use it
What should I use then ? So that I can still use inputs to rotate the cam etc...
Write your own logic to simply rotate the object for your vCam to follow
Orbit camera is pretty simple
Ok thanks !
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?
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.
i don't seem to have the output channel checkbox on my cinemachine version (?)
i'm using version 2.10.0 from March 4th 2024. Is it the last one?
ah, it's different in 2.x
2.x uses culling masks
you create layers that will hold nothing but the virtual cameras
well this looks like a downgrade (?)
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
i had that going on. i must've deleted the script without even realizing when porting to multiplayer i'll see how this looks!
also, do you mean syncing the transform of the cinemachine virtual camera(s)?
i'm a little confused by your problem
i synced the transform of the aimPoint of the camera
cinemachine automatically switching to use last connected client camera and can't simply disable it for non owners since i need to have both the host and the client camera active in the same screen
i made it work! thank you sm
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:
Update : Maybe you already knew but I'm telling you just in case, you can now set a transform which overrides the current world's up. I set it as my player so now the horizontal axis is the same at all time.
Oh about time
Pixel Perfect Camera belongs on the actual camera.
Cinemachine Pixel Perfect goes on your virtual cameras. It makes the virtual camera set its ortho size properly.
Why is it when I am using Cinemachine, Camera.main.transform.position always returns Vector3.zero?
cinemachine doesn't cause that to happen
unless it positions the main camera at the origin, of course
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 🤷♂️
is the camera actually at [0,0,0] ?
nope, its position on my player's head. editor shows real position
i want to see where this is being run (Update/LateUpdate/etc.)
Update
the main camera should not be parented to anything
Its not. the virtualcamera is on my players head
ah, ok
making the cameras posiition at my head
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
ahh I think youre right. thanks
i've gotten pranked by that kind of issue a few times
looks fine in the scene view, but not so much in Update!
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.
It should be in Unity Registry
Has anyone seen this video from Guinxu? It's in spanish, but it touches an interesting theme
🎮 Añade Adventure Forge a tu Wishlist: https://bit.ly/Guinxu_AdventureForgeSNF
Usa el código GUINXU24 en https://adventureforge.games/home para acceder a la beta.
Las cinemáticas de mi juego Flatworld, usaban un sistema horrible. Lo podía refactorizar, o crear un nuevo editor con nodos en Unity con GraphView. Además creé muchas tools / utilidad...
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
it's some kind of visual scripting system
you can, presumably, do the exact same thing in C#
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...
Sounds and looks like you have no camera
Virtual cameras are not cameras
Reading the first couple of chapters of the docs is critical to understanding how Cinemachine is meant to be used
https://docs.unity3d.com/Packages/com.unity.cinemachine@2.9/manual/index.html
ohhhh ok thank you!!
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?
That's something I need to figure out properly
I currently just do that, yeah
but it's challenging to control
For prolonged impulse you're maybe better off using noise instead
thanks!
I do like the set up ease of the impulse source and listener combo though. Rather convenient
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& usingfreeLookCam.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.
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
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. 🙂
You don't call it on a specific camera
CinemachineCore.OnTargetObjectWarped is static
and nice (:
You will need to tell OnTargetObjectWarped how much the transform moved by.
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
I'm not sure how to call that from inside the coroutine, as it's telling me it doesn't exist.
What doesn't exist? CinemachineCore?
Sorry, the 'ResetCameraState()' funciton
bah, it's a CM 3.0 thing
Ah, that would explain it. 
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();
}
I'm currently using Cinemachine 2.9.5
That's all it does, and it looks like everything in there is public
the names might have changed though
I'll give that a shot, then. 🙂
why is my cinemachine camera so zoomed in
how do i zoom it out
im on the 3.0 version
change the ortho size on the cinemachine camera
I am sorry for the misconsception
you won't be changing anything on the Cinemachine Brain
okay
i cant find a size parameter
you mean the cinemachine 2d platformer camera component?
With Cinemachine you always move Virtual Cameras with your scripts or otherwise
The real Camera should not be moved by anything except the Brain
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.
Hey, why when I link the cinemachine camera and press play mode does it unlink?
You have other code changing the field presumably
Maybe in Start or Awake
is it possible to use it in multiple scripts?
i need the main cam reference to use the look at function in another script
sure
just don't set the reference back to null in your code, which is presumably what's happening here
In Start you are
GetComponent returns null here
Since that component is not on the same object
Oh yeah, thanks for the help
I didn't know GetComponent return to null
I can't see Dolly Track's Waypoints as gizmos and there are not much properties to change what should I do
Enable gizmos in scene view
I enabled them but cant see cinemachine ones
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
yeah i fixed it now
do you know how can i test virtual camera
it is little complicated
i made 2 path but camera doesnt move
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
I'm sorry to pester you again with this but I'm struggling to resolve several of the reference issues with the ResetCameraState() function you suggested. Any further input would be highly appriciated. 
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
In order to get Cinemachine Core, do I need to bring that in from a serialized field?
no, that's a static class
oh right, it's not a static class :p
CinemachineCore.Instance
it is a singleton.
Ok. So, the last two issues seem to be ActiveBrain-adjacent.
same deal: ActiveBrainCount is on CinemachineCore
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.
would cinemachine work for a mobile game, or it dosent really matter which platform
the platform doesn't matter
hm, you could try setting the ActiveBlend property on the brain
(to null)
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.
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?
I'm only using a freeLookCamera
Then again, that could just be me misunderstanding Cinemachine, alltogether...
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
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.
That's all correct.
Ok. Just wanted to ensure I didn't botch something further back in time. TwT
This is the code where I call the ResetCameraState:
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
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
well, what's line 86?
It's the 2nd for loop. Commenting this out results in it working exactly like I wanted it to.

okay, but what's line 86? :p
*With the yield return in place
presumably it's the line that assigned a duration
because the active blend was actually null
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.
does cinemachine block curor input?
No
Depends on what you mean exactly though
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
It would not
okay thank you
my cinemachine camera has not got the body options
where do i get them?
You need to assign a Follow target then you will have options for the body dropdown
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
Do you need dolly track behavior? Could you not just have an empty object you rotate, and set the camera as a child of it at an offset, producing a circular motion?
oh i already fix it, i just ask chatgpt to spawn doly trak position 😅
HI guys I was using cinemachine freelook camera
I want it to follow the character but the camera is not following character
even after setting player for follow field
My guess is your player isn't actually moving
Only that prefab that's a child of the player
(sibling of the follow target)
But the character is moving
And if I use the player game object for follow field
Sure but that's not the thing you're following
Any solutions
Ok
is this because the object im following has a rigidbody?
its spinning even when i dont set the target
im using urp
if that has anything to do with it
anyone please?
Is it a child of the object it's trying to follow?
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?
i just re added it
it works
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)
Cinemachine decides where the Camera goes. It doesn't really control what gets rendered
I want the character to rotate as the camera rotates
But the character is not rotating properly
can anyone tell me what is wrong
I am also providing the code which takes an empty gameobject as ref
i am rotating the empty gameobject to rotate the camera as the camera is focused on it
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.
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
Do you have multiple Unity cameras?
Those don't look like Cinemachine virtual cameras
yes, they are the unity default cameras. I didnt know where to talk about my issue
thanks
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...
not without seeing how you set up the cinemachine settings
makes sense hahhaha
You'd have to show your virtual cameras...
that's what actually determines the camera position and rotation
Yeah, sorry I realised the minute i sent it, this is for the freelock camera that actually follows the character hihi
You'd want to play with the settings in the FreeLook. The bottom rig radius is 3, is that the problem?
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
I know its been a few days, but you need to have your player character's mesh on a separate layer from your terrain when you're using the Cinemachine Collider component
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'
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 ?
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 ?
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...
Target Group component is doing most of the work there
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
Furi fan detected
good
so yeah, this'll be a Target Group
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
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
I need a little help please.
This is a POV camera that stutters when the player moves forward.
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
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?
It depends on your version of cinemachine but...
https://docs.unity3d.com/Packages/com.unity.cinemachine@3.1/manual/CinemachineMultipleCameras.html
https://docs.unity3d.com/Packages/com.unity.cinemachine@2.6/manual/CinemachineMultipleCameras.html
Pick the one depending on your CM version^
dont work 😦
(My virtual Camera is at Layer P1 too)
what's not working? Looks like the two cameras are in different places
You can set the culling mask to everything EXCEPT P2
don't make it ONLY P1
i will try
YAY thanks 🙂
My camera keeps going to the back of the player when it's moving forward.
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
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.
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 ?
Doesn't sound related to Cinemachine. Seems like a problem with your movement code or your looking around code.
why does the blend not work as expected in the build?
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
They shouldn't. All the ult cameras start with prio 0 and the priorities switch when the ult goes off
I noticed that the camera is still switching in the build
it's just in the wrong position
This should do it
possibly you have to enable some gizmos or something along those lines
I imported Cinemachine, via package manager, to a brand new project.
It's working perfectly but the gizmos for the dead zone, (blue) soft zone and...
its not switching as fast for some reason.
this sdoesnt happen in the editor too, its strange
question deleted:)
I can't figure out if you're asking a question about Cinemachine, Netcode, or animation here
They all seem unrelated
My main question is whether I should use a single body model for everyone (including the client) or a combination of one body model for other clients and a separate set of arms that only the client-self can see. or is this even important and im overthinking
Usually you want separate model for first person view for various reasons
But, this doesn't really have anything to do with Cinemachine
you're right i should've wrote this to animation channel
or modeling or somethn
thank you though 😄
anyone knows why this might be happening?
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
Just Upgraded to CM3 and nothing has changed. could using "any camera" mess things up somehow?
not using any camera doesnt fix it either. no idea what to do from here
im not getting any errors in the build either
Do other camera blends behave?
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
Do you have your own code involved?
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
so how are you rotating your camera?
how did you configure your Player/Look input action
show the configuration of the action itself. This is the pointer binding
you mean the input provider?
hmm not too sure. See if anything changes if you remove the other bindings for example
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
that is a sure sign that something in your game is framerate dependent
but what, I don't know
found the problem
update mode on the cinemachine brain
forgot this existed
thanks for the help
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
What do you mean by "it won't let me do so".
Show what you tried and what happened when you tried it
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.
THis is a demonstration in the build: https://gyazo.com/706412105d7ea01455d4993e7ac8c5e9
And this in the editor: https://gyazo.com/706412105d7ea01455d4993e7ac8c5e9
Any help would be appreciated!
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?
well it wont move the camera around as noise when i put it on i watched a channel on how but it still didnt work
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?
You'd have to show what you tried
I need some help, following this tutorial but give different result after changing strategy to pull camera forward
nvm, somebody else made a bug in project and time scale was 0 despite game not indicating it X__X
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
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...
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
Guys why the post process volume component doesn't affect my scene 💔
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
You should never even add one CinemachineFreeLook to the main camera object
oh how come
virtual cameras (including freelook) should be their own independent objects
separate from the actual Unity camera
ah i see so the main camera only has the brain and that decides which virtual camera to use?
yes
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
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
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! 😦
you need to change the orthographic size on the virtual camera
if you're using cinemachine
it's under "Lens" settings
i do that, but the further i zoom out the more pixelated it gets
the drawing is also somehow more pixelated when standing still, while moving it works
If you're using Cinemachine 3.0, the classes were renamed a bit
e.g. it's just CinemachineCamera now
ah thank you. eventually i was able to figure this out :)
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?
I don't know what "going at the same time" means
they woul all start at the same time
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
yeah they do have that checked, i dont know how to make them move otherwise
how would i do that? i cant find it online
the documentation reveals all!
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
Hello. How can I not return to the starting virtual cinemachine camera after playing the cutscene?
Set whatever the desired camera is priority higher
Thank you
Not afaik, but cinemachine vcam properties can be set to save when edited in play mode
I tested around and I can just use bias
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?
Reduce damping values
You can even blend to a vcam with different settings dynamically based on player speed
So I need to reduce my camera damping when my player is moving towards the camera?
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 !
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.
Cinemachine and Canvas are systems that don't interact in this case
Cinemachine moves the real camera between its virtual cameras
Canvas only cares where the real camera is
my cinemachine isn't working i guess, i created a free look camera and tried it but it says its not rendering
You need to manual to understand how cinemachine is meant to be used
https://docs.unity3d.com/Packages/com.unity.cinemachine@3.0/manual/index.html
Even just the first few pages
got it to work, thx
anybody here knows how to make the collider actually work and collide with walls? I tried every single youtube tutorial but it doesn't work
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)
Use a cinemachine target group
add players to the group when they join
remove them when they leave
what do tags have to do with anything
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
I mean I tried to find the spawned play using its tag and then adding it "to the script"
I'm going to be honest here
Oh thanks 🙂
it sounds like you're a very early beginner to Unity
I am xD
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
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 😄
you should at least go learn the basics
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
!learn
:teacher: Unity Learn ↗
Over 750 hours of free live and on-demand learning content for all levels of experience!
ohhhhh, thank you very much 🙂
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.
cinemachine has nothing to do with rendering
it only positions and rotates the camera
your question is for #archived-urp and/or #💥┃post-processing
im following a yt video. im trying to find the cinemachine.axisstate but im getting errors
did the script change?
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?
That doesn't sound related to the error in your screenshot to be honest
Anyway it depends on which version of Cinemachine you have installed
The code is suppose to be use to control the free look of the camera however when i type the code the class doesn't exist cinemachine.axisstate
- You haven't een shared the error message yet
- What to use will depend on which version of Cinemachine you are using, so sharing your cinemachine version is essential
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
Using cinemachine would mean deleting your script and using Cinemachine instead.
Watch this video in context on the official Unity learn pages -
https://unity3d.com/learn/tutorials/topics/animation/using-cinemachine-getting-started
Learn how we can use Cinemachine to keep a camera focused on a Transform and follow it as it moves around in our scene.
tysm
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?
my cinemachine version is 3.1.1
Then as I mentioned hours ago/yesterday you can't use what you're trying to use. You have to use the new stuff #🎥┃cinemachine message
im trying to implement the new input system to move my thrid person camera cinemachine however the script they wanted us to use which is the input provider now displays a message that says the component is deprecated
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
What type of camera are you trying to use it with
anybody here knows how to deal with this problem ?
I'm pretty sure it worked basically by default for me, these are my settings, there's nothing else special on the CinemachineVirtualCamera, the walls are simply objects with the layer "Environment" and some kind of a collider.
I did the same as your settings and it didn't work out for me, I think it might be because of the cinemachine freelook probably
oh, yeah i don't think i was able to get the freelook one working, i had to use virtualcamera
turns out the cinemachine camera offset was the problem when I turned it off, gonna have to adjust the camera offset without using the cinemachine offset somehow
ah yes, i briefly tried the cinemachine offset but I have set my camera 10m away by default and then increased and decreased my "cameraDistance" value with my mouse scroll and at the end of the calculation used this to access the "m_CameraDistance" and set it to update with my "cameraDistance" value
that's perfect actually 👌
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
actually it's third person, I think I'm cooked now xdd
Bruh, I'm using the newest unity 6 cinemachine and I can't even change FOV, how?
It's in the lens settings on the virtual camera
I mean through scripts.
Hi guys. There's a problem in the game. Explain it or will you understand it yourself? 🙂
It would be best to explain what you refer to
Same answer, lens settings on the virtual camera
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
I assume you've set the targets as the player prefab, not any instance of the prefab
yes
It cannot follow a player that exists outside of your scene in your project assets
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
They're not the same object
That is, if the object is a prefab, then it will not work out?
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
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.
Can you help with that, please?
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
You can also click a reference field so it's highlighted blue and hit delete to clear it
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
Why can't you use UI exactly?
It is a game jam with this challange
Somebody can help me, please? The problem is still hanging
"How to get a reference at runtime to an instantiated object" is a very general problem with many different solutions
You could ask in #💻┃code-beginner but make sure to how you've tried to solve the problem so far and what point you're stuck in
Do you remember how it all started?
How what started?
That's exactly what I was talking about just now
Okay... Thank you 🙂
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?
I would:
- Make an empty object with a PositionConstraint component to follow the car.
- Make a vCam that's a child of the empty object, with an offset position pointing at the empty object.
- Write a script that just rotates the empty pivot object according to mouse input, and moves the camera localPosition according to scroll input. You can have the vCam itself Do Nothing
Wait so I can just reuse the script I already have for the Cinemachine camera?
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
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?
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!
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
If you search for that class in the newest version's docs you would find this page that explains it
https://docs.unity3d.com/Packages/com.unity.cinemachine@3.1/api/Unity.Cinemachine.CinemachineFreeLook.html
i did some reserch and i found out they changed some things in the cinemachine version 3
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
this is used to change the values for the orbit
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
I don't know exactly, but the property path of horizontal axis is now HorizontalAxis.Value, maybe that helps
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
its not working
Wait i figured it out u were right to some extend u see ur information wasnt complele. First we had to initiate the variable by calling orbitfollow what i did was i called cinemachinecamera
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?
"Refuses" in what way?
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
https://docs.unity3d.com/Packages/com.unity.cinemachine@3.0/api/Unity.Cinemachine.CinemachineFollow.OnTargetObjectWarped.html
This seems to be the method intended for that situation
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
Another suggested option is to disable the vcam, move it, then re-enable
I tried that but it doesn't work
Oh, wait
Ignore my previous statement. Let me give that a shot
Still no success with that, sadly.
Which one?
And doing it how exactly
OnTargetObjectWarped can be found before 3.0
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.
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.


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!
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 :(
Looks like it's all under this now
https://docs.unity3d.com/Packages/com.unity.cinemachine@3.1/manual/CinemachineFreeLookModifier.html
Add a modifier for distance or composition
Depending on what you're going for
doesn't seem quiteee the same unfortunately, but i think i can make it work, thank you :)
so i have a 2d rpg game and when my player rotates the cinemachine camera rotates with it
Rotation of the camera is controlled by the Aim settings you set up on the virtual camera.
Change it by changing the aim settings
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
i want it to simply freez the z position i dont want the z position to be change
wait i think it works now
nah not well
i tried switching body to frame transposer
now its weird
first you talked about rotation now you say position
show your setup and explain what you want
i got mixed up at the start
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
normal
show your virtual camera setup
when i turn
this is much less useful than a screenshot of your virtual camera inspector with Body and Aim expanded
Body: Framing Transposer
Aim: Do Nothing
still z position changes
and same problem occurs
show the inspector after you do that