#🎥┃cinemachine

1 messages · Page 6 of 1

oak sluice
#

Ill try this tonight

#

Im still on basics i think i will be done with basics somewhere around this night

#

I still dont know how to do this for exampl

zinc notch
#

Hey guys got a simple script, works fine while the player moves really smooth but when idle the camera jitters a bunch

#

the orientation is the player model so the player model rotates along with the camera

royal tartan
#

FixedUpdate is not synchronized to the game's framerate.

#

Update is

zinc notch
#

It works fine when i move my character tho, all my movement is in fixedupdate

#

would i have to move everything over too update ?

#

and then *time.deltatime on everything xD

royal tartan
#

no

royal tartan
zinc notch
#

correct

royal tartan
#

rigidbody interpolation

#

which isn't going to happen for your FixedUpdate code here because you're not rotating an interpolated rigidbody via proper means

#

which object is Orientation and what components are on it

zinc notch
#

Orientation is the player model

#

thats whats on the Player

#

everything else has no scripts or anything added

royal tartan
#

I would say you want this:

void LateUpdate() {
  // your existing cinemachine stuff

  playerRigidbody.rotation = Quaternion.Euler(0, mouseY, 0);
}```
#

note that playerRigidbody is the Rigidbody, not the Transform

zinc notch
#

ill give it a shot

royal tartan
#

You might also just be able to do it with the Orientation Transform

#

But i think it's odd to not rotate the parent on the Y axis

zinc notch
#

yea i changed that theres still the jittering, its weird if i put it in fixed update then theres no jittering when the player is moving, but theres jitter when the players idle. And then if i put it in update theres no jittering when idle but jittering while moving.

#

I could just detect when the player is idle to switch between update and fixed update which works but its not rlly a proper fix

royal tartan
#

show your code

zinc notch
zinc notch
royal tartan
#

Also did you try the Rigidbody version?

deft shuttle
#

I'm using CineMachine and I want to make it so that the camera slightly moves in the position that the cursor is in? So, if I move the cursor to the left, the camera with pan to the left slightly, allowing the player to view the left side more. I've tried making it work myself but I can't figure out how to do it

#

This is my current game. The camera pans with the camera movement, not the cursor

oak sluice
#

do you know why my ship is behaving strangely?

#

ship move codes:

#

camera follow codes:

#

this happens more especially in higher forward (speed) values

oak sluice
#

I just learned how to fix it. 👍 no need for answers

tranquil berry
# oak sluice ship move codes:

You are moving a non-kinematic rigidbody directly via its transform. That is in direct conflict with the physics system and I wouldn't be surprised if it jittered like you see

oak sluice
#

ill still look into that transform thing. its what ive learned in tutorial but i guess itx not very efficient

oak sluice
#

why so slow is this camera

#

i know its because the objects so big but how do i turn it off ?

#

like you do in blender

#

holding down alt mouse doesnt work

#

tried these

rain basin
#

I don't think you can go much faster than that

#

Its kind of bad to have big objects too as you have to worry about the floating point more (if stuff is intended to go super far) and stuff like max shadow distance will be weird

#

You can hold shift while moving the camera

#

The longer you move the camera the faster it'll move

#

Anyone know why the target group camera's FOV doesn't actually change the FOV?

#

The lens' field of view is at 40 but no matter what the camera's is always at 3

royal tartan
#

or double click an object in the inspector

rain basin
#

Oh yeah that exists too

oak sluice
#

i need to get close to it (inside) so i can put my camera there

rain basin
#

F brings your camera to the object nearly instantly so I don't see how its slow as well

oak sluice
#

here

rain basin
#

You need to press it twice sorry

#

If you double tap F it brings you close

oak sluice
#

worked 👍

#

thanks

rain basin
#

No worries good luck

rain basin
rain basin
oak sluice
#

I just found out a really good thing. if you x100 scale your object and if you have a following player camera you multiply vector3s by x100 too 🙂

void flame
#

Does anybody know how to prevent the lookahead feature from triggering when moving the player in the z axis?
I'm just looking for it to happen when the player moves left or right ;

#

Doesn't seem to be an option for that by default so I guess it's time for custom scripting

oak sluice
#

I need some help with my cameras Im about to lose my mind

#

ive been trying to position them right and make them act like the way I want but I ccant

#

its been 4 hours 😄

#

first person camera position:

#

second person camera position:

#

kamera parent object

#

first person camera follower script:

#

second person camera follower script:

#

what my first person camera looks like:

#

what second person camera looks like

#

I know its been a long postI tried to give as many details as possible

jovial harbor
#

do I need to keep Pixel Perfect component on a brain camera to make some changes in corresponding extension of virtual camera? because I can't see any parameters here, so I don't know where to set my assets resolutions, reference screen size, etc.
or I'm doing something wrong?

jovial harbor
royal tartan
oak sluice
#

and I deleted follow camera scripts

#

also deleted everything related to cameras

#

then made a cinemachine virtual camera then attached it to main camera then attached virtual camera to cockpit camera

#

so everythings great except for the fact that its jittery and laggy. i changed virtual cameras update to late update it got better to an extent then changed spaceship's rigidbody interpolation to interpolate

#

but it still feels not smooth at all

#

also I want to add this little detail I found out

#

even when not in camera/game view and in scene view navigating

#

its still jittery

errant shard
# oak sluice

This is a floating point accuracy error caused by objects being too far away from the scene origin

#

All coordinates are affected, including transforms and vertices of mesh renderers, not just cameras

oak sluice
#

i reset the positions before

oak sluice
#

its -0.007247... for x -0.0263874... for y -2.960... for z

#

almost zero

errant shard
errant shard
oak sluice
#

al cameras here

errant shard
#

Remember that every transform position is inherited

#

To know where CM V1 is you'd have to read its world position, or add to its transform position the positions of CockPitCamera, Cockpit3_WithInterior and Spaceship

#

More than an issue with camera position, it's an issue with your ship position

oak sluice
#

ship at 0 0 0

errant shard
# oak sluice ship at 0 0 0

Additionally the problem is not expected to happen when the ship is at 0,0,0 but only when it moves far away from it, starting at 1000 units or so

#

Very often a problem when people try to make space games to scale

oak sluice
#

its speed is 2 meters a second

oak sluice
errant shard
#

It can also happen at smaller distances if the size of your ship is small

#

Transform scale is only a multiplier to size so it doesn't tell you the real dimensions of the ship

oak sluice
#

how do I know

#

the real scale

errant shard
# oak sluice how do I know

One way is to create a new default cube with no parent, it'll be the size of one unit which corresponds to one metre
For reference most humans are a little less than two meters tall
You can also reset its position, then select both that and the ship, hit F over scene view and see if there is distance between them

oak sluice
#

okay

#

its like 5 meters tall

#

12 meters wide

errant shard
#

Nothing unusual there, if the cubes also have confirmed the position is right

oak sluice
#

😩

errant shard
#

It's very important that they have no parent, as all transforms are inherited

oak sluice
#

then whats the problem Ive spent my yesterday just on this and couldnt fix it

errant shard
#

I have not seen anything except floating point coordinate inaccuracies cause this, so I'm struggling to come up with more ideas

errant shard
# oak sluice

The most telling sign in this video is that the circular dial when wobbling is also deforming like jelly
That is from the vertices jittering relative to each other

oak sluice
#

no problem. i think this project might have been cursed because i oncee set earth size to trillion or something then set ship size to million then moved its z to 60 thousand or something then i reseet them all but i think the curse remains

errant shard
#

There is one more cause now that I think about it

oak sluice
#

vertices jittering relative to each other,

#

okay

errant shard
#

The difference between camera's near and far clipping planes must not be too big, or you lose coordinate accuracy the same way

oak sluice
#

let me send you vertices

errant shard
#

It's not a property of the vertices themselves but the way they are rendered

oak sluice
#

and one note to add: I didnt have any problems like jittering even though the ship was at 60 thousand at z axis and scale was 1 million

#

when i was using main camera as follow camera

#

when i switched to cinecmera everything changed

errant shard
#

There are only a finite number of depth steps that are possible to represent when rendering everything in camera's view
Those steps are stretched between the near plane and the far plane

#

Cinemachine I think does override the near and far clipping planes

oak sluice
#

near plane far plane

#

so what should i do

errant shard
#

The settings are under vcam Lens field

oak sluice
#

i really want to use cinecamera since its much easier

errant shard
#

That said 0.3 to 1000 is not really weird either

errant shard
oak sluice
#

thanks for info will keep that in mind in future projects thanks for sparing time to try to help still I think Ill ditch this project now and conunie with junior programming courses projects. i think this project is cursed that may be all

errant shard
#

Almost every space game seems to run into both these issues
You'd usually be traveling at least multiple kilometers, and you'd have to see objects a ludicrous distance away, but also the very nearby parts inside the ship

oak sluice
#

and now that you said it usually happens around 1000 meters away from origin im thinking my life choices now

errant shard
#

Games that try to do real space scales invariably split the rendering of the objects across different cameras or spatially into chunks

oak sluice
#

how am I supposed to simulate space if only 1 kilometer away from origin this issue happens

errant shard
#

Using many technical workarounds

#

There's probably breakdowns how other games such as Kerbal Space Program and No Man's Sky have succeeded

oak sluice
#

you played outer wilds?

#

there are like many different planets and suns there but they are very close to origin

#

maybe i may do something like that if the technical side of fixing it would be too much for me

oak sluice
#

i may check it right now

#

i dont even know what to google for that

errant shard
#

Not at hand

oak sluice
#

damn

#

I think I found it

#

you just use multiple cameras

#

your right

ivory wraith
#

to answer the question about orbits:

#

asusming this is Cinemachine 2.0, you want to change the "Binding Mode" option

terse vessel
#

Also, is it possible to change the whole Cinemachine orbits ? Like instead of being world reference, it related to the player or an input, and if I click it, the orbits rotate too ? Like if I was changing referencial

ivory wraith
#

The default is "Lock To Target With World Up"

#

which, unsurprisingly, uses the world up vector

#

You probably just want Lock To Target With No Roll

#

but try the different options out

#

Although, this may just affect how the camera gets tilted. I don't recall if it also changes how the orbits are arranged

terse vessel
#

I tried it but the movement of my character freaks out if I change it, maybe because the movement function use the camera angle

#

I'll retry

terse vessel
#

The thing is that I get the orientation that I want using LockToTarget, but know if I move my character I can't "see his back". Like I want to have the LockToTarget orientation as the WorldSpace default global orientation, so the WorldSpace movement type

tender lintel
#

Does anyone know if there is an easy way to override the lock on the Y axis (yaw) for a virtual camera that has the binding mode set to world space based on certain input?

terse vessel
vernal plume
#

Okay so is it best to use Cinemachine as a camera system for 3rd person viewing games?
If so, then why won't my cinemachine Virtual Camera connect to my Main Camera, when I installed the Cinemachine Brain component to the Main Camera?

#

Its not allowing any Live Camera inputs

ivory wraith
#

you don't manually touch CinemachineBrain at all

#

it just needs to exist on the main camera

#

I'd remove the CinemachineBrain and add a new vcam to the scene

#

this will automatically attach a brain to the main camera

vernal plume
#

Alright thank you

#

Ill try that

vernal plume
#

And it still remains

#

as there being none in the Live Camera slot

ivory wraith
#

show me the inspector for your virtual camera

vernal plume
#

I havent set an object to the follow and look at

#

But when i do it changes nothing

vernal plume
ivory wraith
#

What happens when you hit Solo on the camera?

woven osprey
#

anyone know how to make it smoother when using transform?

#

it looks very. bland and robotic.

#

searched for tutorials could only find some for follow

#

im tryna use transform

woven osprey
#

@errant shard sorry for doing this to you. but i know you are extremely helpful and i could use your advice here.

errant shard
woven osprey
errant shard
woven osprey
#

Ohhhh thats what noise does... i was trying to replicate that manually...

#

😭

woven osprey
#

you can see a few like. squares that just look bad.

woven osprey
errant steeple
#

Can someone tell me why this isn't working???

#

Did I do something wrong? In the cinemachine set up? or download?

ivory wraith
#

If you aren't using Cinemachine 3.0, then this should be fine.

#

(and you'd know if you were doing that)

#

go to Preferences, then External Tools, and hit "Regenerate project files"

#

and reopen your code editor

unkempt forge
errant steeple
runic grove
#

Is it possible to use Cinemachine Impulse Listener and Source for shaking other objects?

candid glacier
#

So I have the basic FP movement script along with its camera setup on a model, but I am having a problem that the player's body can be seen as somewhat see-through when the player walks/runs. I have tried adjusting the position of the camera as well as the near clip plane, but in doing so I cannot see the arms swinging back and forth. Is there something else I can do?

pine zodiac
#

guys i downlaoded cinemachine for my2d game im learning , but when i add a virtual 2d camera it keeps moving and rotating weirdly on its own , can someone help me please i have no idea whats going on\

#

nvm i fixed it

#

in case any one ever faces the same issue , dont set the virtual camera as a child of the main camera

royal tartan
amber pelican
#

hey does anyone know why my cinemachine 2d camera is lagging (idk if this matters but the player is being moved by Rigidbody.MovePosition() in the FixedUpdate Method)

amber pelican
#

i think this solved it

acoustic geode
acoustic geode
#

what are you doing with 4 browser lmao 😂 anyway...

pine zodiac
pine zodiac
errant shard
acoustic geode
#

also there may be some problems whenyou do that

#

thats not an issse in normal main camera

#

like especially if you set it as child or something

#

but I think the follow player option of cinemachine was nice in 2d

lavish pulsar
#

i'm experiencing some weird ghosting effect while the camera is following the player, i would send a recording but for some reason it isn't noticeable in video

errant shard
#

If you're using sprites, are you also using the pixel perfect camera component?

lavish pulsar
#

i tried changing my nonitor refresh rate to 60 and it fixed it, 120 dosn't work neither 144

#

ok pixel perfect fixed it thanks

errant shard
lavish pulsar
#

mhhh it seem to be going on / off, i didn't change anything and it's back

errant shard
#

Another common cause is moving the camera and character in different Update methods
For example a rigidbody with no interpolation has its position updated 50 times per second, but the camera may be updated much more often with a high framerate

#

That can also cause the problem to be concealed when lowering your monitor's refresh rate or recording a video that's not of a very high framerate

lavish pulsar
#

if i start the game it's fine, i click the inspector, back on the game and it's ghosting

lavish pulsar
errant shard
lavish pulsar
#

yes the player has a sprite renderer and it's fisics works with rigidbody2d

errant shard
lavish pulsar
#

seems to be fixed but as i said the bug was pretty inconsistent, thanks a lot anyways <3

errant shard
# lavish pulsar seems to be fixed but as i said the bug was pretty inconsistent, thanks a lot an...

The bug itself is consistent, but it can be easily concealed, or compounded by other problems with similar symptoms
For example if performance in the editor drops and your framerate is lowered as a result
Testing a build is the most effective way to know
But note also that editor and build may have different VSync settings which again in turn affect the framerate
VSync is usually best be enabled in both build and editor

mental rapids
#

How do you freeze the X axis on a cinemachine camera in 2d unity? (So that no matter what the camera doesnt move on the X axis)

royal tartan
mental rapids
#

Ah I found it thanks bud

supple blade
#

how to rotate free cam?

tranquil berry
supple blade
#

axis is setup

#

something not working in code

tranquil berry
#

If it's not rotating when you move your mouse, then I can only guess there's errors you're ignoring

supple blade
#

im taking touch input

errant shard
# supple blade im taking touch input

Getting input from a device, be it touch screen or mouse, and having virtual cameras utilize that input are two separate systems
Troubleshoot them separately

supple blade
#
 if (Input.touchCount > 0)
        {
            Touch touch = Input.GetTouch(0);

            // Log touch input values for debugging
            Debug.Log("Touch Delta X: " + touch.deltaPosition.x + ", Touch Delta Y: " + touch.deltaPosition.y);
errant shard
supple blade
#

ikr

errant shard
#

But I think Cinemachine's importable examples on the package manager do include a touch screen demo
If not, the Starter Assets asset certainly does and that one also utilizes Cinemachine

supple blade
verbal pier
#

Hello, I'm trying to make something where if you enter a volume, the camera is slightly displaced to another location (e.g when the player gets on the edge of something, the camera should pan down slightly so that we can see what's below.)
I'm currently doing it this way: When we enter the volume, create and setup a target group (with the player transform and the other point). Then, change the VCam's Follow transform to be the target group. When we exit the volume, remove the target group and make the vcam's follow transform to be only the player.
I'm also lerping the weight to try and get a blend, but this part doesn't work.
The few problems are :

  • When the two points are close, the camera zooms. I don't want that (I tried setting a big radius on the other point but then it doesn't displace the camera a lot)
  • Maybe it's because of pixel perfect (Im in 2D btw), but the blending just doesn't work at all. The camera still instantly snaps to include both points or only the player. It looks like it does so when the other point's weight reaches 0 or 1.
    Is there a way to fix this?
errant shard
verbal pier
#

that's clever. I'll try that. Thanks

errant shard
# verbal pier that's clever. I'll try that. Thanks

Not merely clever, the officially recommended way to use Cinemachine is to prefer multiple VCams and switching or blending between them rather than modifying their settings
The docs are well written and contain a lot of real world useful advice so it's best to make sure you've read at least the first few chapters

verbal pier
#

yeah I'll read the docs. That's something I should do more often tbh. Thanks

fallen forum
#

How to change camera tilt with virtual camera in 3D project?

royal tartan
#

if you have "Aim" set to "Do Nothing", then you can just tilt the camera via the Transform like any other GameObject in Unity.

worn canyon
#

how do I change camera position over the character's shoulder?

royal tartan
worn canyon
#

wdym lol (welp 🙏 )

royal tartan
#

It's unclear what you're asking

#

What do you mean "change camera position"?

#

Like... is it already positioned there and you want to ...change it in some way?

#

Are you asking how to transition the camera from some other configuration into an over-the-shoulder one?

#

What are you asking?

royal tartan
#

the position of the virtual camera is determined entirely by the Body settings in the virtual camera

worn canyon
#

And how could I change the settings,I know nothing about unity

#

The settings are in the inspector of the character?

royal tartan
#

btw FPS games do not use over-the-shoulder camera

#

they are first person

#

they use a camera inside the player, as if seeing from the players' eyes

worn canyon
royal tartan
worn canyon
#

1 sec ima go search for it

#

this is all I found

#

in the Hierarchy I found nothing

royal tartan
#

things in your scene do not appear here

#

things in the scene are in the hierarchy window

#

you may not have found it, but that doesn't mean it's not there

worn canyon
#

how do I search?

#

u fr got no sleep lol

royal tartan
#

it should be pretty obvious, it'll be part of the player or the camera

worn canyon
#

u've been online for 14 hours dang

royal tartan
#

pretty sure it's a FreeLook

#

so you could do t: CinemachineFreeLook in the hierarchy

worn canyon
#

even by searching Cinemacine I got nothing

royal tartan
#

well searching "Cinemacine" isn't going to find anything

worn canyon
#

oh wait found smth]

#

Cinemachine Free Look Mono Script and another script called the same

#

first one got a imagine w a camera the second got the default script image

royal tartan
#

again sounds like you're looking at the project window

worn canyon
#

yh cuz I find nothing in the hierarchy

royal tartan
#

Based on this screenshot from the asset youtube intro, it looks like the MainCamera object is what you want

#

you can see the cinemachine logo there

#

or wait

#

it's probably the PlayerFollowCamera

#

that will likely have the vcam on it

worn canyon
#

PlayerFollowCamera got something in the inspector called "CinemachineVirtualCamera" this is it?

royal tartan
worn canyon
#

and where's the position?

#

at Body?

royal tartan
#

as I said much earlier, you want to look in the Body settings

worn canyon
#

tysm man

#

uh im such a idiot that I don't know where is the verical movement of the camera.I only managed to move it closer and a little to the right

royal tartan
#

shoulder offset I assume?

worn canyon
#

That was it,thank you very much!

terse vessel
silver token
#

should i use cinemachine on a first persson controller or stick to the regular camera also is it easy to switch from regular to cinemachine later on?

royal tartan
silver token
#

thanks

worn canyon
#

when I move my third person camera to a wall it goes thru it and when I try with a object its the same,how can I fix it?

#

and how do I make it so when im moving the camera on vertical axis it doesnt go more far away than when at the middle of the character

errant shard
#

@worn canyon Look up Cinemachine Collider extension and Free Look vcam on the Cinemachine documentation
Both of those questions will be answered

worn canyon
#

ty

#

it still clips thru walls

#

I can still move the camera thru walls but when the camera is at the edge of the object it brings it closer to the character

#

@errant shard welp

solid topaz
#

Hello ! Someone know a way to make cinemachine brain following freelook by layer even if the brain doesnt have camera component ?

#

(please ping me for the any reply)

errant shard
#

They should include both types of cameras

worn canyon
#

ty

wary totem
#

has anyone managed to get the timeline to stop without cinemachine reseting the position of the camera? I'm trying to make it so I can stop a playable director and cut immediately to the virtual camera at the highest priority, but for some reason every time I do this it flickers for one frame. My code isn't running in a coroutine and I've even tried manually updating the cinemachine brain when I change it to no avail. It seems to continue even when I disable the playable director. I'm kinda at a loss for what you're meant to do here.

#

im pretty sure the single frame that flickers is actually the final position that the camera would end up if the entire timeline clip had played out
edit: actually, the single frame is the final position of the virtual camera it was in the middle of blending to. So it's just snapping to the final position of the blend.

#

at the moment of the order of execution is:

  1. pause the playable director
  2. set all the virtual cameras involved in that timeline clip to priority 10
  3. set the priority of the next virtual camera to be 11
  4. stop the playable director
  5. disable the playable director component (no effect)
  6. CinemachineCore.Instance.GetActiveBrain(0).ManualUpdate(); (no effect)
#

and somehow despite all of that occuring in sequence with zero yields

#

a lot of that stuff is just redundant things ive added in testing to see if that makes the behaviour stop as well

#

the timeline clips have only a cinemachine track in them

#

here's the one i've been using for testing for example

wary totem
#

because if I don't stop it then even after disabling the director, it just freezes in place

#

its fast but its there and it feels really jerky

#

i would like to not have sonic boom cutscene energy throughout my entire game lmfao

#

it seems even manually disabling all the virtual cameras cant even stop it

#

this cannot be intended behaviour

#

2023.2.7 URP if its relevant at all

#

cinemachine 2.9.7 timeline 1.8.6, they're the most recent versions

#

oh disabling the literal gameobject associated with the directable seems to have done something

#

nope

#

still does that one frame thing

#

so weird

#

setting the brain to late update has also not changed anything

wary totem
wary totem
#

only changing the priority of the virtual camera just before the playable is scheduled to end also doesnt prevent the snapping

#

huh????????? changing the sequence of the shots has stopped it from happening??

#

it seems like if the virtual camera has been active once before, this does not happen???????????????????????

#

so the workaround is to flip through every virtual camera for a frame each before starting the scene

wary totem
#

if only there was a way to manually trigger whatever this initiation thing is from the code

#

InternalUpdateCameraState() didnt do anything unfortunately

#

oh i fixed it!!

#

MoveToTopOfPrioritySubqueue() did the trick

#

i kinda get why that mightve been the fix even if I did try to be careful about the order I was setting the priority alrteady

wary totem
#

this could also use some documentation

#

i assumed it was from then to

#

and digging on the internet i could find absolutely nothing about which is which

#

and then i tested it and nope its the other way around

#

its also being called twice for whatever reason

#

thats probably on me though

#

actually yeah i can think of why that might be happening

timid igloo
#

Help me 😭. I am trying to fix the sniper scope but it's not possible. I have one cinemachine camera and then another camera in front of it. However how to dynamically adjust FOV of the second camera so it matches first one? First camera has FOV 20. So second camera should have smaller FOV but how to calculate it?

feral quail
#

FOV second camera = zoom factor : FOV firstcamera ?
FOV Second Camera = FoV First Camera : Zoom Factor
from my math knowledge i would calculate it this way 😄

timid igloo
#

Zoom factor is 1

#
float fovForSecondCamera = 2 * Mathf.Atan((firstCamera.fieldOfView / 2) / distanceBetweenCameras) * Mathf.Rad2Deg;
secondCamera.fieldOfView = fovForSecondCamera;``` @feral quail how about this? Will this work?
feral quail
#

Im rly New as my Marker Shows , i legit didnt use any Knowledge beside Math ^.^
You Said youre Trying to Use a Scope.
So Basically youre Base has a FoV of 20 and a Scope is normally Used to like 2x 5x or Whatever x something.
If youre Having a Base FoV of 20 and Ure Using for example a 2x Scope youre new FoV is 10.
Based on That i gave u that Formula above , which as im ReReading it shows me that i made a mistake. notlikethis
FoV Second Camera = FoV First Camera : Zoom Factor. My Bad on This.

timid igloo
feral quail
#

Yea, maybe it needs diffrent properties aswell , im out for cinemachine then.

potent flame
#

I currently have a system where there's water at y=0 and all items and the player check in update if their transform.position.y is underwater. I have a collider on a Water layer, but I only use that to make sure the camera never dips underwater.

I want to change it so the water is a trigger collider so I can replace my update() code with a simple ontriggerenter. But if the water collider is a trigger, how can I keep the cinemachine cameras out of it instead?

patent spruce
#

Hello, I don't know what I did wrong but my camera is moving steps by steps, you can see it in the video, it's more noticeable when I move the camera slowly.
I am using an input provider with the input system, how can I smooth out the rotation of the camera ?

potent flame
potent flame
#

So I thought I solved my problem by having a dedicated layer and object just so I can listed in cinemachine's body's "Camera collision filter", but while it works if I try to aim the camera into the water collider, when the player jumps in water, the camera seems to snap inside the collider.

potent flame
#

looks like as soon as my follow target dips inside the collider the camera snaps behind it, I'm going to just "manually" move my follow target above water when the player enters water, but I wonder if there's a way to force cinemachine to respect the collision filter.

calm wharf
# patent spruce Hello, I don't know what I did wrong but my camera is moving steps by steps, you...

I have similar problem with Cinemachine. Our players complains about sick motion because of that laging camera. We have 60fps without any lags. Our character movement is perfecly fine, smooth. But camera rotation is like yours. Even without player movement. If you will find the solution let me know 😛

I checked rigibody interpolate/extrapolate
I checked every update mode on cinemachine
makes special physic layers

#

nothing works with this

#

it's hard to see but easy to feel the bad camera rotation

#

turning off post procesing also makes no difference.

#

So how to achieve 60fps smooth camera rotation?

errant shard
royal tartan
calm wharf
#

but fixed update has the less jittering than others

errant shard
# calm wharf

This does not reveal what rotates the camera or how it does it

calm wharf
#

oh you mean player controls. We are using ECM2

#

when I go deep to this asset I found that probably camera rotation is by this:

#

So the player is rotate in fixed update and the camera is just following him (in this asset case)

errant shard
calm wharf
#

this is rb players

errant shard
#

Cinemachine itself should update in late/smart update

errant shard
# calm wharf

The interpolation setting is a prefab override, so it's possible that the option you're seeing here is not the same way in each instance of the prefab

#

You should verify that the unmodified first person demo character of ECM2 does not have this issue

#

Then you can use that to compare

calm wharf
#

smart update has the worst jittering

errant shard
# calm wharf late and then smart update on vcm

I would check here what's the actual interpolation mode of the very specific player rigidbody that's moving the camera here
It's always possible that the prefab is different than the one you showed earlier
Or that something else is affecting the rigidbody's rotation

#

It's not really a cinemachine issue though, or probably exactly an ECM2 issue either

#

If setting the cinemachine update mode to fixed update makes it the smoothest, that doesn't mean that it's better but it implicates something causing uninterpolated rotation on your rigidbody

#

Verifying the ECM2 included demo fps character can help you troubleshoot it

#

Or copying it over if all else fails
And if the problem comes back during that process that means it's one of your components doing it
Possibly overwriting the rotation

calm wharf
#

ok I will check. They don't use Cinemachine, so I need to set up this on their demo scene

calm wharf
#

can this be a problem? that the vcm don't follow directly player, but his eye?

errant shard
#

I expect you have the same jitter even if you'd swap it out for a totally ordinary camera

calm wharf
#

hmmm in ECM2 movement is on fixed update by physic, but rotation is also on fixedupdate but without physics (just transform)

#

maybe this is the problem?

errant shard
# calm wharf hmmm in ECM2 movement is on fixed update by physic, but rotation is also on fixe...

That's not quite how ECM2 is set up
Like I said in ECM2 sideways rotation is done by rotating the rigidbody in an interpolation-conforming way in fixedupdate, up and down rotation simply rotates a non-rb transform in update
Out of the box there are no jitter or stutter issues
Cinemachine in lateupdate is just as accurate as rotating the camera directly
If you're additionally doing rotations in the wrong update, or using non-rb rotation methods at any point, it's no wonder that stutter issues crop up
Anyway, not really an on-topic issue
You should find that ECM2 works fine with default configuration

calm wharf
errant shard
calm wharf
#

ok I will check, and just for curious. If the fps will jump between 60-100 is possible that this will be the problem?

errant shard
calm wharf
#

I even updated the packages

#

still the same issue. but I discovered something new, the bigger windows size is the more you will see the jittering effect

errant shard
# calm wharf still the same issue. but I discovered something new, the bigger windows size is...

That usually implies some fps-dependent code
Which ECM2 is not, I can confirm
You should not have any "fps lock" besides vsync
But consider that vsync limits your framerate which is generally good but may conceal fps dependency issues
You'll want to double confirm that a freshly imported ECM2 base does not have this issue
If it still does, you'll want to make a post in the official support thread

sullen wolf
#

Hello

patent spruce
royal tartan
#

Show the action itself, not the binding

patent spruce
royal tartan
#

Also what settings are in the "Driven Axes" thing?

patent spruce
patent spruce
feral quail
wet garden
#

How do I add screenshake? I'm looking online and people are saying to use MultiChannelPerlin component but I... don't have that component? It's not something I can add

wet garden
#

ooh I see, it's not actually a unity component

#

oh no 💀

errant shard
# wet garden oh no 💀

Looks like you're working on 2D objects
In that situation your vcam should not have any rotational noise, and no Z axis motion in the noise

errant shard
wet garden
#

Thank you, I will look into it

wet garden
#

hmm looks like I might be able to

errant shard
wet garden
wet garden
#

Nevermind, got it working!

covert junco
#

Hello, I have cinemachine virtual cameras put on car prefabs and I've been trying to figure out how to adjust the virtual cameras rotation to be able to look around the car 360 degrees by script and user mouse input. I want the user to be able to look around the car and check it out then lock back to center when they lift up for a period of time, or something like that.
I haven't been able to figure out how to use anything like pan tilt for cinemachine though

#

this is the virtual camera setup on a car prefab. most cars are basically the same

covert junco
#

does anybody know how to get the camera to rotate around the object it's looking at?

royal tartan
#

You can set Body on the vCam to "Do Nothing" and use Aim and Look At as normal

covert junco
wet garden
#

hmm. I got screenshake working but now afterwards my virtual camera drifts around.

wet garden
#

Ok, well, I managed to stop it from drifting, but now my character keeps disappearing

errant shard
#

If you want a safe way to disable noise, instead blend between a vcam with the noise and another without instead of modifying it directly
Blending between vcams is how cinemachine is meant to be used

covert junco
covert junco
#

got it figured out, it was because I had the camera as a child of the car and then also i had to set the recenter target in the Aim settings of the cinemachine and hard lock to target

deft shuttle
#

Hey everyone, need some help. I've got a Vcam attached to my player and I want the cam to slightly pan when the mouse moves to the edge of the screen. It seems like I'm able to do it while I change the Vcam settings while in game, but it messes up if I change it in editing mode and then play. Can anyone help please?

royal tartan
#

You seem to be relying on parenting your camera to the player instead of the actual vCam settings

#

What you need to actually do is unparent it, then set the follow target for the framing transposer as a target group containing the player and an object that follows your mouse cursor.

#

POV isn't panning your camera, it's rotating it. Which you don't want in a 2D game

covert junco
#

So I'm using a CinemachineVirtualCamera with the AIM setting to POV. now i see that when you use a freelookcamera there are properties you can access to disable and enable users mouse input to rotate the camera, for example -
public CinemachineFreeLook cameraLook;
cameraLook.m_YAxis.m_InputAxisName = "Mouse Y";
cameraLook.m_XAxis.m_InputAxisName = "Mouse X";

i see the properties in the CinemachineVirtualCamera script for the X and Y input axis names but i can't seem to figure out how to access them through code.
anybody know how to access those properties?

royal tartan
#

Aren't you accessing them in code in the example you gave? I'm confused.

empty fable
#

is there a way i can have the dead zone width different on both sides?

#

im making a 2d platformer and i have the camera following the player, but i dont want it to be centered, since the player starts on the left side so the whole left side of the screen would just be blank until the player moved far enough

#

so i changed the "Screen X" value so its shifted to the right, but then when i go back, the camera doesnt follow until you get really far back, where you cant see the player for at least 5 seconds before it happens

#

there's probably a better way to do it but i dont understand how

empty fable
empty fable
#

thank you

empty fable
ivory wraith
#

change the layer that the collider is on

#

it shouldn't be on a layer that interacts with the player (or anything else, really)

royal tartan
#

yeah... I wouldn't make the camera confiner collider interact with the player

covert junco
# royal tartan Access them to do what?

oh sorry, I forgot to post that I ended up figuring out how to access those properties I was talking about.
i'm using the CinemachineVirtualCamera script with the AIM setting set to POV. So I had to specifically grab the POV component to access those properties.

CinemachinePOV cmPOV = CMvcam1.GetCinemachineComponent<CinemachinePOV>();
cmPOV.m_VerticalAxis.m_InputAxisName = "";
cmPOV.m_HorizontalAxis.m_InputAxisName = "";
covert junco
# royal tartan Access them to do what?

oh sorry again, I didn't answer your question.
I need to access those properties because when the player gets in the car, the player camera switches to the car camera with a 2 second delay transition. so i wanted to lock the POV from getting input from the user while the camera transitions and then give them the ability to rotate around the camera afterwards

pulsar mesa
#

my post processing isnt working. is it because i use cinemachine as well?

royal tartan
final sparrow
#

hey guys, i'm doing the john lemon tutorial and for some reason, my cinemachine doesn't follow my johnlemon player anymore

#

this has happened after adding post processinfg effects, i reset the camera and followed the tutorial again but it's still not tracking the JohnLemon game object

errant shard
final sparrow
errant shard
#

It sounds like another camera was created in error

final sparrow
errant shard
#

You can type t:camera in hierarchy window search to reveal all camera components

#

Your probably want only one camera (unless you have a valid reason for another) which would have your cinemachine brain

errant shard
#

You would instead implement the post processing in your Main Camera rather than making a new one

#

Currently Cinemachine is controlling the Main Camera as seen with the red icon, but your other camera is being rendered over it

final sparrow
normal harness
#

I'm making a 2D game. I want the camera not to move in the Y axis. Is there a simple setting to turn this off?

royal tartan
#

all camera movement options are under the Follow settings for your vCam

#

One simple thing you could do is create an empty object that follows your target on the x axis only using a PositionConstraint

#

and have your vCam follow that object instead

normal harness
royal tartan
#

there's no code required

normal harness
ivory wraith
#

using a PositionConstraint!

rapid pike
#

I need some help, i have a 3rd person player controller with a cinemachine camera to follow the player. the problem is that my character spawns in from a prefab because i have a choose your character screen. I am having trouble getting the camera to detect and follow the player that spawned in from the prefab. Help would be so appreciated! 🙂

molten hull
royal tartan
green steeple
green steeple
#

Its just very laggy when the camera follows my ship

royal tartan
green steeple
#

Should be already

#

Nope your right, somehow it was off

molten hull
royal tartan
#

In this case because the followed object was a Rigidbody without interpolation, it was real jitter from the object.

umbral fossil
#

Hey all, so I'm pretty new to Cinemachine and am trying to get a 'follow cam' system to work using it.....

This is how I've got it set up and it sort of works....

The problem I'm having is that I need the camera to stay behind my ship, but it's not moving with the back of the ship and I'm a little confused as to how to get it to behave.

Could anyone point me in the right direction please?

edgy nebula
#

i got unity to render 8k this time idk what was wrong on the last project (I turned ray tracing off for the render, there's over 150 lights)

pulsar mesa
royal tartan
pulsar mesa
rain basin
#

Why does cinemachine hate 90 degrees

#

Wait no sorry why does it hate 80 degrees

#

It shouldn't be flipping at 80 degrees

#

Correction

#

Why is cinemachine rotation just completely off

#

It's completely wrong

#

I capped my GameObject's rotation at -70 and 70 using clamp which is working fine it is capped

#

But cinemachine likes to think -70 is equivalent to -50?

#

and 70 is equivalent to 90?

#

My bad my vertical arm length was 0.4

tepid summit
#

is there a way to rotate the "rails" the free move cam follows?
my player walks on surfaces that are not flat so I want the camera to rotate along with the player

green steeple
#

I believe this is a cinemachine issue as it doesn't seem like the parallax itself is acting up. My paralax object keeps jittering while the cinemachine cam moves with the player

errant shard
#

Either your player is rubberbanding, or your parallax background is

crude lake
#

How do you install Cinemachine 3

#

OK you just have to add by name and specify the version

ivory wraith
#

You can also select 3.0 after installing the package normally.

ivory wraith
#

I have a set of "outside" cameras and a set of "inside" cameras. I want to do a little fade-to-black transition when moving from outside to inside and from inside to outside.

Currently, I have these blends configured (they use Cut because I haven't actually implemented the fade-to-block yet), but it's a nuisance for a few reasons:

  • I have to name every single internal camera "Internal Camera"
  • I can't just use the default blend between internal cameras; I have to explicitly add an entry to the list

Is there any way to override how Cinemachine decides which blend to use, or am I going to need to modify CinemachineBrain?

#

Ideally, I'd be able to write a method that takes the two cameras and returns a blend

#

(also, in reality, it's not just "outside" and "inside", but rather any number of groups of cameras)

#

there could be foo, bar, baz, and buz cameras that all need to be faded between

royal tartan
#

I.e. have one state driven camera that contains all the outside ones and another that contains all the inside ones?

#

And then only define the blend between those parent cameras?

#

(I genuinely don't know if that's possible)

ivory wraith
#

Cameras are attached to individual entities in my game, so it'd be impractical to group them all under one big state-driven camera

ivory wraith
#

I've already embedded the Cinemachine package so that I can adjust its execution order (to make it play nice with other third-party assets)

#

so, worst case scenario, I directly edit CinemachineBrain

#

It has an m_BlendManager field that holds the BlendManager, and that thing has a LookupBlendDelegate, which is what's used to actually pick a blend

#

m_BlendManager is private, though

drifting minnow
golden grove
#

so my the confiner for my cinemachine becomes smaller than the actual orthographic size of the camera, causing this stuttering

#

is there some option i can press where the cinema mcachine orthographic size adjusts when the confiner gets smaller than it to prevent this issue

royal tartan
ivory wraith
#

I ran into an interesting problem with spline carts today. Took me a bit to figure out...

#

A rotated SplineContainer causes the cart to rotate itself incorrectly

#
rotation = rotation * spline.transform.rotation; // backwards!
#

transform should really just have a TransformRotation method on it 😉

royal tartan
ivory wraith
#

That operator doesn't exist

royal tartan
#
  • with Vector4 is there
#

and Quaternion has a conversion to V4 no?

#

oh shit it doesn't have an implicit conversion :0

ivory wraith
#

That wouldn't be a meaningful operation.

#

that's like using TransformPoint, i believe

royal tartan
#

Order does matter

ivory wraith
#

Right.

#

I switched it around and now it's working properly

gusty barn
#

my cinemachine is lagging it feels like its snapping to the target a few times a second rather then locked onto it and following it(high frame rate)

#

fixed it

ivory wraith
#

what was the issue?

royal tartan
#

My guess would be Rigidbody interpolation not set

lament garnet
#

I have a camera in the character that’s attached to the character’s head. The animation causes character to start shaking. I decided to use the Virtual Camera (it follows the empty "zxc" object in the character’s head model) from Cinemachine.When I run the game alone, everything works fine.But when I enter the game with 2 clients,then the script CinemachineVirtualCamera disappears in VirtualCamera and creates a child element cm. what can i do?

royal tartan
#

The vCam always creates that cm object, it's just usually hidden

distant thicket
#

how do you guys get vcam to match a rig object's rotation

#

i have it following it just fine but something made me think rotations would carry over too.. for somereason.. is it appropriate to use a gameobject out in front to aim at?

royal tartan
ivory wraith
#

yes, that also minimizes the amount of camera shake you get

mellow plover
#

cinemachine looks "shaky" only when moving the player down and right - any ideas?

#

by shaky I mean it has the same effect as in all directions without interpolation on

#

but only in the down and right directions

mellow plover
#

i just fixed it

#

used update instead of fixed update

royal tartan
#

for what

mellow plover
#

for the movement

royal tartan
#

but is it physics based movement?

#

That's going to cause other issues then

mellow plover
#

yes, i keep forgetting to use fixed update with physics lol

willow vapor
#

I'm aware that it's possible to blend between 2 virtual cameras, but can I specify the blend with a value? For example, let's say I have a vcam at x=0 and another at x=5

#

with a blend value of 0.5, I would like to position the camera at x=2.5

gritty snow
#

Hi, on cinemachine i want to make it so when the player jumps the camera doesnt go up with it, anyone know what do do?

hexed heron
#

hey i was trying to setup confines for my camera but its being weird with the positioning of my character

errant shard
errant shard
willow vapor
errant shard
#

Cinemachine also has importable examples for almost all of its features available in the package manager, if you're wondering how to implement something

willow vapor
#

I've used cinemachine for years, but sometimes I'm looking for a particular feature that I might not be aware of

gritty snow
#

Hey, so I increased the deadzone value but when my player goes above the value the camera follows, but it doesnt follow going back down. Can someone help

rich prism
#

can someone help me with this error

#

its just popped up out of nowhere and im not really sure how to fix it

royal tartan
# rich prism

update your cinemachine package
restart unity
delete your library folder

in that order

rich prism
#

where is the library folder

unkempt forge
#

Just in the root project folder

cloud saddle
#

In picture, I can see the room's ceiling and floor, but the room is on center. I want move room to up. but how to? I use Persepective mod cam

royal tartan
cloud saddle
#

I want move objects but I need still can see ceiling and floor

royal tartan
#

I don't understand the question or what it has to do with Cinemachine.

cloud saddle
#

Actually, this question is not a Cinemachine question. It's just that this is the only camera-related category. sorry!

#

To reiterate my question, you can see both the ceiling and the floor in the photo. But now that room is in the center of the screen, and I wanted to move it to the top of the screen, but still be able to see the ceiling and floor.

royal tartan
#

I don't really understand the question.

cloud saddle
#

So, I want to move that room upwards just like that. However, as shown in the photo, the camera must focus on the ceiling and floor of the room at the same time.

grizzled skiff
#

@cloud saddle

#

So you want something like this

#

That's what you mean right?

cloud saddle
unkempt forge
slim sparrow
#

how would i change the cinemachine default blend in code?

stuck lily
#

I feel like im missing something really simple here. I'm trying to use the dolly cart shift a camera from one position to another when clicking a UI button. I thought there might be away to do this using the On click on the ui button, but I'm stumped on what to use as the on click.

visual roost
#

Someone knows how to fix this proble,? I have a white border in the game scene? That appeared suddenly and when I start the game is blinking all the time and its supper annoying, idk how to fix it

royal tartan
#

turn them off

visual roost
#

but the cinemachine brain just appeared suddenly

#

and i dont understand why is all the time blinking when the game starts, is that normal?

royal tartan
#

you can turn on and off individual gizmos from that dropdown menu

#

not sure what you mean by blinking though

visual roost
#

at a high speed

#

its really annoying

#

is that normal?

royal tartan
#

I have no idea what you're referring to

#

maybe show a video?

visual roost
#

@royal tartan

royal tartan
#

Share as mp4

#

so it embeds properly in discord

#

and I don't have to download it on my work laptop

visual roost
royal tartan
#

turn it off if you don't want to see it

royal tartan
visual roost
royal tartan
#

no it's for the editor only

keen umbra
#

Hi all, I've a question about raycasting from the from the cursor through the camera.

I'm using a perspective camera, pulled back really far from the scene with a low FOV (set to 3) to get an orthographic look.

Setting this way causes problems with raycasting, as the distance the ray travels means small cursor movements end up as big jumps when they hit the scene.

Could anyone suggest a solution to this problem?

errant shard
keen umbra
ocean merlin
stuck lily
#

When using cinemachine to move a camera from one UI menu to another using a camera and dolly is it better to turn that transition into an animation? Or is there a better way to trigger the transition with the UI buttons?

dusky heath
#

hey guys I have I have these Cinemachine virtual camera and I have them switch locations depending on where u are Im curious if there is a way to not make them smoothly rotate and instead make it instant?

#

nvm i got it

outer verge
#

Im trying to make a smooth transition between two different cameras and am having some trouble

#
using UnityEngine.InputSystem;

public class CinemachineScript : MonoBehaviour
{
    // Start is called before the first frame update
    [SerializeField]

    private InputAction action;

    private Animator animator;
    private bool mainCam = true;

    private void Awake()
    {
        animator = GetComponent<Animator>();
    }

    private void OnEnable()
    {
        action.Enable();
    }

    private void OnDisable()
    {
        action.Disable();
    }

    void Start()
    {
        action.performed += _ => SwitchState();
    }

    private void SwitchState()
    {
        if (mainCam)
        {
            animator.Play("ADSCam");
        } else
        {
            animator.Play("NormalCam");
        }
        mainCam = !mainCam;
    }
}
#

wait

#

nvm

#

ok wait its like being jerky

#

instead of easing in and out

#

its just latching onto the camera

errant shard
vapid wagon
#

hellu

is there an event I can listen to that fires when the camera has finished lerping to the virtual camera?

#

i can probably just set a coroutine delay but just wanted to know if there's already an event for it

vapid wagon
vapid wagon
tight garnet
dusky heath
#

is there a way to make virtual camera like follow the player ok so in my game its a fixed camera system new camera postions around the map depending where you are but im curious just like power drill massacre if the virtual camera can stay in the same spot but just look at the player?

#

I mean as you saw the camera stayed in the same spot but just looked at the player

vapid wagon
#

i think thats just a "aim at target" camera. body does nothing

dusky heath
#

thx

dense panther
#

what transposer?

dusky heath
tall pasture
#

Hello, i want to be able to switch between 2 free look cameras and keep the crosshair at the same screen coordinates ? i have a simple 3rd person free look camera and another one over the shoulder for the aim situation. The aim camera is pretty much the same as the simple follow but with a tighter fov, but when i aim i find that the crosshair moves a bit on the x and y axis. Did anyone come across this kind of issue before ?

tall pasture
royal tartan
#

of the situation you're having trouble with

#

when i aim i find that the crosshair moves a bit on the x and y axis.

#

Maybe side by side of aiming/not aiming

#

Like, your description is a little confusing to me. Is the crosshair not always just in the center of the screen?

tall pasture
#

Yes, give me a sec, i'll post 2 shots of aim and not with editor of each camera

royal tartan
#

(full shots of the whole Unity editor are usually best btw)

tall pasture
#

you mean the gameplay scene with editor at the same time in one shot ?

royal tartan
#

isn't the "gameplay scene" part of the unity editor

tall pasture
royal tartan
#

so this red thing is what exactly?

#

Did you draw that in after? Is that a UI element?

#

is that what we're worried about?

tall pasture
#

That's what i aim for, but when i ads the crosshair moves, even though the crosshair is just a ui element in center of the screen, so i am assuming switching the cameras moves its position a bit or am i mistaken ?

royal tartan
#

ui element in center of the screen
Just to start with first principles here can you show how that's set up?

#

What kind of canvas are we talking about

#

and how is the crosshair set up

#

With cinemachine we're typically not actually changing cameras at all

#

Only changing virtual camera

tall pasture
royal tartan
tall pasture
#

Maybe worth mentionning though, i sync the input of the free look cams before switching so they end up in the same spot, something like this, maybe that's bad ?

royal tartan
#

what's that do?

#

is that moving it around?

tall pasture
# royal tartan is that moving it around?

No, that's just to move the inner parts of the crosshair controlled by an accuracy property, but do not move the hole thing, just jitters a bit the 2 parts inside the corsshair container when you run or something

#

Something like this, but hte crosshair stays at the center

#

I just noticed, zooming in by lowering the FOV of the same virtual camera does the same effect, so i am assuming this doesn't have to do with crosshair itself but rather the virtual cameras

royal tartan
royal tartan
tall pasture
royal tartan
#

I'm interested in the render mode

royal tartan
#

ok so it;s screen space overlay

#

in other words - the camera basically shouldn't be affecting the canvas whatsoever

#

since overlay canvases just draw directly on the screen

tall pasture
#

So the issue is with my virtual cams setup right ?

royal tartan
#

I have no idea lol

#

based on what you've shown I don't understand why the crosshair would move when you change FOV

#

the UI shouldn't care about what the camera is doing whatsoever AFAICT

#

unless you've got something going on in one of those many scripts

tall pasture
#

Yeah its a bit tricky, but its not a crosshair issue, i mentionned it just because thats how we can see it clearly, but the issue is that when i zoom in (by adjusting the fov) the virtual cam does not keep the point in the world that i had in the screen center at the same position after the fov changes .. not sure how i can fix this but i'll look into it, thanks for your time anyways, much appreciated

tall pasture
#

After experimenting a bit, i found that the virtual camera with body set on 3rd Person Follow works well when zooming in either by moving the camera distance or adjusting the FOV, so for everyone having the same issue, it seems that the Free look is not meant for accurate 3rd person aim, just switch to a vCam with 3rd person follow 👍

vast lynx
#

Hey I'm using two cinemachine cameras and I have a button in world space is there a reason why it works on only one camera and not the other?

pastel glen
mystic cloak
umbral raven
#

you mean the position of the camera transform?

mystic cloak
umbral raven
#

you have to move the virtual camera, not the camera

mystic cloak
errant shard
calm wharf
#

Hello, I have again problem with probably cinemachine.
I have a player with rigidbody, animations and two IK with riglayers.
Now I'm confused how this whole character should be set up.

I have two children in this main go. Cameras and Character
GO Character has Rigibody (yes, interpolate). It has children go with eye. This eye is following by cinemachine virtual.

The problem is no matter what I will do, there is still ugly jittering effect (only on camera in playmode, on scene everything seems fine). For example I have a gun in my hand. So this gun will be jittering

Is the IK not up to date with camera move? Or guns? Or what?

Making smart update, late update, fixed update, everything on interpolate, extrapolate not works

#

the "weapon" vacuum is shaking/jittering once the player start to rotate. Where the gun with IK should be in this hierarchy? Under the player with rigidbody, or under the camera without rigidbody?

sharp stratus
#

anyone know how i can stop the player from being weird and fuzzy around the edges when i move

errant shard
sharp stratus
#

fixed

umbral raven
candid hare
#

plus its not really what I want

umbral raven
#

the fix is to change the view/ angles a bit

#

I can't be more specific, because I don't know exactly without playing around myself

candid hare
#

I want something similar to Furi

#

where the main character is around the middle of the screen

#

a little to the bottom

#

with some variance

umbral raven
#

So the targetgroup should be part of the player hierarchy, so it moves with it.
You then need to angle your VCam to mimic that image

candid hare
umbral raven
#

Increase the weight of your player on the target group

candid hare
#

but I also want it to have some, idk

#

vertical movement?

#

like I want it to be kind of like a hemisphere in a way

#

im not sure how the camera of Furi is done

#

but getting something similar would be the goal

errant shard
#

For example if you're changing a transform rotation directly on a rigidbody, interpolation cannot function

calm wharf
#

idk man, I'm using with some samples

#

What I know when i switch to normal camera everything is working

errant shard
calm wharf
#

i dont get it, how to properly set up a character with animations, IK, weapons and cinemachine

#

What I discovered, when I created a new virtual for a car view, I deleted the eye following method and everything was working

errant shard
#

What eye following method?

calm wharf
#

its just empty GO under players GO

#

so its inheriting RB from UnityCharacter

errant shard
#

"Inheriting RB"? I don't quite understand
Seems like we have only bits of the puzzle

calm wharf
#

there is GO "Player_hazmat" - its empty
this GO contains two children Cameras and 1st/3rd Character

Cameras dont have RB, it contais main camera and virtuals. In this case I'm using CM Walk

1st/3rd character has RB, Movement from Easy Character Movement 2 (asset), under it there are animator, roots with bones, mesh, IK

#

if I will keep weapon with cameras, then its ok but characters hands are shaking

if I will move weapon under players hands then hands are ok, but weapon starts to shaking

#

I can send you a package with this character and scripts if this will help

errant shard
#

I also use ECM2 so I have a bit of familiarity with it

calm wharf
#

Oh great, so I'm using their demo with cinemachine

#

I send you the package on DM

#

I think the best way will be to keep weapons where is player, not where cameras are in hierarchy. I want to weapon moved with character animations

#

oh and on main camera I preffer the late update. I see a strange lags using fixed update variants. Even without hands and weapons. It has heavy feels

errant shard
calm wharf
#

its for physic calc like RB

#

its not every frame like update

#

so is there any way to keep late update but have a character with rb?

#

with this whole stuff like anim, ik, weapons

royal tartan
calm wharf
#

Look at my first post

#

I have

royal tartan
#

LateUpdate cinemachine camera with Rigidbody with interpolation is silky smooth

#

If it's not for you, something is off about your setup

royal tartan
#

that would be why

#

you're sidestepping anything the RB can interpolate

#

by manually setting the rotation

calm wharf
#

then how to set up this with animations, IK and weapons?

#

I used the simple demo from ECM2 with cinemachine

royal tartan
#

Move things via the Rigidbody

#

If you use Rigidbody.MoveRotation, that will be interpolated

#

if you use velocity or forces and torques

#

that will be interpolated

calm wharf
#

I just add a weapon in hand and there is this problem

#

so how to move IK with rb?

royal tartan
#

these things generally wouldn't be using a Rigidbody

calm wharf
#

but they are jittering/lagging

#

the hands IK is slower than camera rotation

#

I mean, this is what I see, not sure if this is the problem

errant shard
#

I think it's more of a timing issue
The second clip shows how drastically choppier uninterpolated fixedupdate movement would be

#

Don't know how precisely correct ECM2's way of doing rotation is, especially for conserving physics forces, but it does do some type of interpolation as far as I can tell

calm wharf
#

I must be doing something wrong, but idk what. Its not rocket science, its animations, IK and weapon - thats all

#

I was putting every combination of children-parent in this character

#

the best resul is to keep weapons under cameras but its bad way

#

@errant shard did you received package on private messages?

hushed garden
#

When teleporting my player my camera zooms out slightly, I have no code that causes this, how do I fix it?

errant shard
hushed garden
#

its a work around, so now I can only use 60pov or itll do the zoom thing

errant shard
hushed garden
#

its just moving the players position

#

Only one vcam

#

and the brain oc

#

wait nvm i know what was causing it now

errant shard
hushed garden
#

I had a portal, and this portals fov was set to 60, so when I went through it with my players camera at an fov of 70ish it looked like it zoomed in.

#

sometimes just talking about a problem helps you find the answer

errant shard
#

Otherwise the actual problem remains fully in the fog of war to us

hushed garden
#

yea you are right and I apologize for not sharing screenshots, I was about to if I hadn't of found the problem.

errant shard
hushed garden
#

ah cool that seems like a good strat

nova herald
#

is there a way to make cinemachine ignore multiple tags?

fallen forum
urban apex
urban apex
fallen forum
urban apex
#

you want it to not go up

fallen forum
#

I want the camera to not clip through walls but instead zoom in towards the player

urban apex
#

it's zooming but because the wall is not high enough it can see the player

#

so no need to zoom

fallen forum
urban apex
#

can you show the cinemachine settings

fallen forum
urban apex
fallen forum
#

oh my god i am an idiot

#

thanks man

hushed garden
#

How do I change the m.NoiseProfile at runtime?
I know I do:
PlayerVC.GetCinemachineComponent<CinemachineBasicMultiChannelPerlin>().m.NoiseProfile =
But what do I set it equal to? Strings don't work and I don't have a reference to the NoiseSettings thing.

urban apex
hushed garden
urban apex
#

then go to this path

#

you can find preset noises

#

such as this

hushed garden
#

ah thanks that what I needed

urban apex
#

just drag the one you want

hushed garden
#

cool

nova herald
urban apex
nova herald
#

oh ok, thanks for your help!

odd elk
#

How would you go about using cinemachine to make a league of legends style camera system for your game? Locked cam follows the player from behind and doesn't rotate left or right, just looks down from above at a 45 degree angle. Unlocked cam holds the same zoom and allows you to move the camera by pushing the edge of the screens. You can press spacebar to recenter on character. Both locked and unlocked allow you to zoom in and out.

Its my 2nd day using unity and I tried to make this system myself. I've gotten pretty close but I think my code is messy and my zoom doesn't work perfect while unlocked cam is on. I made one camera and two virtual cameras for this setup with like 4 scripts.

ripe lodge
#

Include all of your logic in one update function in a single script, and decide how the camera is supposed to move based off of its current state

#

This can be easily controlled with an if statement and a Boolean

odd elk
#

I'll try that when I come back to it. I spent 10 hrs trying to figure out cameras I think I'm gonna move on and revisit it when I learn more. It's like 99% functional right now anway lol but I will keep your advice in mind thank you

calm wharf
umbral elbow
#

I'm coming up short here, I am making a game similar to Gravity rush and need a very dynamic feeling camera for this one thing I'm running into is how to wrap around the y axis or coming up with an alternative to doing so, I'm using the freelook camera with the orbital transposer

#

any resources would be appreciated

royal tartan
#

What do you mean exactly by "wrap around the y axis"?

umbral elbow
#

instead of say stopping at the 180 degree it keeps going over

#

it is a weird problem to have and I could be overthinking the solution

#

Just to elaborate here is a snippet of the game I'm working on

royal tartan
#

FreeLook is probably not really designed for this

#

It's designed for a traditional TPS basically

#

you'll likely need to write some of your own camera code.

umbral elbow
#

do you know if the freelook cam could be reoriented, cuz I have an idea if that's possible

royal tartan
#

My understanding of FreeLook is that each of the three orbit cameras is a fully fledged virtual camera

#

and you can configure them however you wish

#

but the transitioning between them is something that's pretty difficult to change AFAIK, though I'm not sure.

umbral elbow
#

so I might be better of heavily tweaking a virtual cam, I'll look first into changing the orientation of the orbits but I'll keep what you said in mind thanks

umbral elbow
#

one more question is there a way I can set the freelook camera to always have gravity be it's down direction, so the orbits would correspond to the gravity direction rather than world.down

stable briar
#

not using cinemachine at all though.

#

you can have the raw code if you want, though I'm not sure exactly how much you'd learn from my spaghetti code :P

winter monolith
#

Hey y'all i've got a question i can't seem to elegantly solve if anyone here has any advice.

I've got a scene that is an interior of a room. I'm using a framing transposer camera to try and keep all the players in the room in view at the same time.

The issue is I'm also trying to keep the edges of the room OUT of view of the camera. For example the tops of walls or the outside of the room.

Is there an elegant way to do this? The confiner extension seemed nice but working with a collider box is tough because my room is irregularly shaped. I also have tried the collider extension for the camera and adding a bunch of bounds around the room to manually constrict the camera and this KINDA works but gets really difficult when working in corners and seems like an overall very hacky and inconsistent and time consuming solution that doesn't really cover all scenarios very well.

To me it seems like there should be some way to have a target group that has an exclusion list for example where it keeps certain object out of view, and I could add invisible objects that outline the edge of the room into that list.

Any thoughts on what I could do here? Thanks!

#

What the room looks like:

#

Example of a good shot:

#

Example of a bad shot:

royal tartan
#

What if you just disable the renderers for the walls which are facing away from the camera?

winter monolith
#

I don't want anything outside the room to show. I think classically this is solved by forcing the camera to literally stay inside the room but then I think to get the same framing I would have to dynamically change the FOV, which I don't want to do

winter monolith
#

If anyone is curious I was able to solve this by picking one shot that contained the full scene, and then i wrote a cinemachine extension that forced the camera to stay within the frustum bounds of that full-scene shot. As a result nothing outside of the full scene shot can ever come into view, but the camera itself can zoom in and move within any part of the shot

wet garden
#

Is there a way to tell if the virtual camera I have is a 2D camera? I'm pretty sure I created a 2D camera but when I do screenshake it's moving in the Z axis and rotating

#

Creating a 2D camera and a VirtualCamera seem to create exactly the same thing

wet garden
urban apex
#

everything else is the same

#

did you try selecting different noise profile?

#

and is that a problem that the camera is rotating?

wet garden
urban apex
wet garden
umbral elbow
#

Is there any way to modify/extend the existing cameras like the freelook camera?
I essentially want to be able to set the axis of horizontal rotation something almost like mario galaxy where the camera will match the surface mario is on

umbral elbow
amber pelican
#

Hey is it even possible to use a rigidbody and a freelook camera without letting it result in a jittery effect? (or is it only possible with CharacterController component?)

opal steeple
amber pelican
# opal steeple So long as you don’t make the cam a child of the rigidbody cinemachine can deal ...

This is weird because im facing a stutter motion issue if im moving my player (with rigidbody(.velocity)) in fixedupdate.
As far as i know this could be fixed by setting the update mode in the cinemachine brain to fixedupdate but if i do so the sourroundings will not face this jittering issue but the player itself that is followed by the camera will be facing it. I also tried to set the damping to 0 but this wouldn't work as well. (Idk if this helps but here is my player movement script https://pastebin.com/3s38TK17 - would be a pleasure if you could help me or send me articles that are explaining it)