#How would I do it? I'm using cinemachine

1 messages ยท Page 1 of 1 (latest)

hoary crater
#

When you have the time just @ me in a new thread I don't have a dev log yet.

#

oh i was mixing you up with Mzieko guy

#

@lone jackal

#

i'll post here

#

heres my setup for starters..

#

CameraRoot and CameraControls are the basic camera movement (yaw/pitch stuff) then the MovementFX is a child container w/ the actual camera it does the Roll (left and right tilt)

lone jackal
hoary crater
#

(1) is a camera controller
(1) is a camera shaker
(1) is a camera breather (up and down motion)
then lastly is the camera fx

hoary crater
#

just abunch of nested animations/lerps

#

all basically working in their own local spaces

#

probably not the cleanest way of doing it.. but for me it helps me keep the systems seperate but still working together

#

]Carwash: IF the tilt field on that component does what you want.. then I was implying you would change it via code. Just one possible way to do it, see what spawn shows
[10:34 AM]SPฮ”WNCฮ”MP โ€ : ^ facts ur cinemachine camera doesn't have to be anything more than just a camera.. you can still utilize some of the features it has but nothings stopping u from animating and controlling gameobjects wrapped around it
[10:34 AM]SPฮ”WNCฮ”MP โ€ : i keep mine as the lowest level object.. and just manipulate all its parents as needed
[10:35 AM]SPฮ”WNCฮ”MP โ€ : then FOV, interpolation, all the stuff done by the cinemachine i just reference it itself

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

namespace kosmiq_menus
{
    public class MovementEffects : MonoBehaviour
    {
        [Header("MOVEMENT FX")]
        //  [SerializeField] PlayerController Player;

        public Rigidbody newPlayer;
        public VCC.VigilanteController wk;

        [SerializeField, Range(0.05f, 2)] float RotationAmount = 0.2f;
        [SerializeField, Range(1f, 20)] float RotationSmooth = 6f;
        [Header("Movement")]
        [SerializeField] bool verticalRotations = true;
        [SerializeField, Range(0.1f, 2)] float MovementAmount = 0.5f;
        
        Quaternion InstallRotation;
        Vector3 MovementVector;
        private void Start()
        {
            InstallRotation = transform.localRotation;
        }

        private void Update()
        {

            var verticalAmt = Input.GetAxis("Vertical") * wk.movementSpeed;
            var horizontalAmt = Input.GetAxis("Horizontal") * wk.movementSpeed;


            float movementX = (verticalAmt * RotationAmount);
            float movementZ = (-horizontalAmt * RotationAmount);
            MovementVector = new Vector3(verticalRotations ? movementX + newPlayer.linearVelocity.y * MovementAmount : movementX, 0, movementZ);
            transform.localRotation = Quaternion.Lerp(transform.localRotation, Quaternion.Euler(MovementVector + InstallRotation.eulerAngles), Time.deltaTime * RotationSmooth);
        }
    }
}``` got it
#

so i use input as i originally thought..
and then i have reference to my CC.. where i use the movementSpeed as a multiplier...

#

if ur walkin it tilts X far..
if ur running it tilts X+ far

#

localRotations

lone jackal
#

Sorry im a bit confused how is this going to help me though? My issue was that when I press either Q or E to lean its not relative to my camera like when I lean and look in a different direction it comes out weird.

#

Look how when I lean and turn around its not the same

hoary crater
#

if u rotate locally.. think about the container ur rotating.. its parented to the controller.. soo if ur controller rotates left and right that container does too

hoary crater
#

if thats the case i can just rotate it (twist it) on the Blue axis.. this should always line up with the way we're looking

#
  • Camera controller
    • MovementFX
      • Camera
lone jackal
hoary crater
#

nope..
my camera script rotates the CameraHolder up and down but it rotates the "Player" left and right...

#

the CameraHolder just faces the correct direction b/c its parented to the Player that we're rotating

#

and since thats the case i can rotate the child of it (my MovementFX) locally anyway i wish and it just works

#
  • Player <-- camera script rotates left and right
    • CameraController <- camera script rotates up and down
      • MovementFX <- strafing left and right causes tilt
        • Camera <- nothing
#

^ heres my setup and how they are communicating. (i left out the unnecessary objects)

#

i'd say start with an empty container w/ a cube in it or something... write ur code that tilts the cube
now rotate the empty container all different directions and re-test.. once thats working
it should work no matter where u add it.. so now u could tuck it into the camera hierarchy where you need

#

then ud just replace cube with camera.. and it should do the same thing ๐Ÿ™‚

lone jackal
#

Alright so here's my setup so using your ideology the LeaningFX is going to rotate with my player and the child is going to do to leaning/tilting. Is that correct?

lone jackal
hoary crater
#

and if thats true then yes... ur leaning would rotate the objects below

#

if u Rotate LeaningFX it shouldn't affect the CM in any negative way

#

b/c its transform should stay at 0,0,0 across the board

#

i think ur over-thinking it b/c now im over-thinking it ๐Ÿ˜…

#

b/c if u can manually grab the object and give it a manual rotation and then test... if the cube still tilts left and right relative to the facing direction it should work in the player hiearchy as well

#

(no matter how u face it it should only be changing (1) property locally

#

Z in this example ^

lone jackal
#

I see Thanks for the help! I will try this out and let you know! Once again Thanks! โค๏ธ

lone jackal
hoary crater
#

well, theres only two things to look for

  • can you rotate its outter container in any direction
  • does the rotation of the cube (which would be ur camera in the end) keep its 0,0,0 local rotations?
hoary crater
#

and finally does the Tilt only affect 1 of the axis..

#

0,0,1 -> 0,0,1.2 -> 0,0,1.4 -> etc

#

thats all the building pieces worked out

hoary crater
lone jackal
#

THANKS FOR THE HELP!!!

hoary crater
#

no prob mate! its just good to see u still working things out ๐Ÿ‘

#

just stick to it ๐Ÿ‘ ur making hella progress

#

๐Ÿ“Œ Note: having the cube to be an example graphic helps alot ๐Ÿ‘

#

i do it all the time.. its just easier to visualize stuff from a single glance.. w/o having to look for gizmo's and check inspectors

#

local rotations are useful for all sorts of things...
i just got this system working

i chose an axis and it rotates locally.. no matter its parent's rotation..

#

so i can re-use the same script for doors, switches, levers, or anything

#

it just changes 1 euler angle.. x,y, or z

#

figuring out local vs world space is soooo important in game-dev

#

then after that its figuring out world vs screen space

lone jackal
#

Should I make a new container for leaning?

hoary crater
#

also another tip: exaggerate values when testing..
if something barely moves.. i barely notice.. lol
when testing i want to see things rotate.. so i use exaggerated values at first

#

then tune it down afterwards

hoary crater
#

probably need to use some clamps to keep it from doing that

#

that appears to be gimbal lock

#

it can exhibit gimbal lock issues or unwanted over-rotation behavior, especially if:

  • The movement values exceed what would be considered a "natural" range of tilt.
  • The input fluctuates sharply or rotates multiple axes close to 90ยฐ.
  • You don't constrain pitch/yaw limits, so you can overshoot and cause instability.
hoary crater
#

now that u have a system set up and working mostly should be able to receive some additional help from another set of eyes

lone jackal
#

Ok thanks for the help!!

lone jackal
#

The cinemachine camera is locked at 70 & -70 on the X axis

hoary crater
#

u'd clamp the thing ur rotating w/ that code yea

#

i think.. first find out what it is thats rotating all weird.. is it the code u jsut wrote? its w/e gameobject is wiggin out that needs attention lol

lone jackal
hoary crater
#

well its b/c its attached that it follows where ur looking

#

so it makes sense that it wouldn't work w/ it unparented..

#

can u share the script u ended up with?

#

i might can glance over it in a bit to see if anything pops out to me

lone jackal
hoary crater
#

aye.. same thoughts as me

lone jackal
lone jackal
#

@hoary crater I've decided to restarting on making my fps controller. They way I set everything up before was messy/confusing. I just wanted to ask how would you set up your fps controller/ hierarchy wise as well. Cause I have seen your setup and looks quite clean.

hoary crater
#

I'll show you when i get back from diner

lone jackal
hoary crater
#

can u tell me what features ur wanting on ur character so i dont have to show everything i got.. unless u just want to see everthing i got to compare

hoary crater
#

might be tomorrow

lone jackal
hoary crater
#

mines pretty complex and im sure u dont need all the stuff i have.. so just hte basics?

#

and the camera setups?

lone jackal
#

@hoary crater As for camera setup's this is what I have idk if this is a "Good way" to set it up. The feature's that I currently want are smooth crouching, vaulting over objects (Like in outlast) and climbing up objects (Also like in outlast). Those are the main goals right now. Of course the camera leaning/tilting as well which I gave up on before lol.

hoary crater
#

so eyes is cam?

lone jackal
lone jackal
#

The CMTarget is the tracking target for cinemachine camera

hoary crater
#

the one i showed u was a regular cam..

lone jackal
hoary crater
hoary crater
#

all im doing is rotating the child gameobject..

#

camera follows player b/c its in its hierarchy

#

cinemachine cam means ur maincam can be anywhere.. u can see the dif in the two hiearchys

lone jackal
lone jackal
#

also in that camera breather script does it include > breathe Idle,walk etc.

#

I think im set.

#

I don't get how I would do something like head bobbing or tilting. The cinemachine tracking target is (CM_TT) would I reference the tracking target & make it move for bobbin/ leaning etc?

hoary crater
#

the headbob is implemented yet

#

i was gonna do the headbob -> cam tilt into the same gmaeobject or try to

#

or maybe in 2 gameobjects

#

i have no clue what the tracking target is...

#

i just use the cinecam/virtual cam w/e u call it being a child of the character controller to have it move around

#

i do have one i call Pro.. that does have headbob and tilting all built in but its hiearchy is enormous lol

#

thats ones also using cinemachine ^ w/o a tracking thingy

lone jackal
hoary crater
#

thanks.. thats my "production quality" project

#

lots of secret sauce in that one ๐Ÿ™‚

#

thats cinemachine shake i believe..

#

i could be wrong.. its been a minute since i worked in this one

lone jackal
hoary crater
#

i dont know anything about it lol

#

sounds like something ud use for a thirdperson

#

or a scroller, shooter on rails kinda setup

lone jackal
#

Alrighty I better empty that out then.lol

hoary crater
#

i smooth my camera manually..

#

the vcam is only there for if i wanna do transitions and stuff

#

it was mainly b/c i spent all the time building out the smoothing, rotation, bobbing and all that stuff before i saw people starting to get bombarded by "use cinemachine!" so.. i figure'd i would but keep all my coding lol.. so i just stuck a cinemachine at the lowest level of the hiaerchy and called it a day

#

its still nice b/c if i use it for any feature i can just go up the hiearchy and disable the scripts that were already doing it

#

and could even delete that sub-gameobject and bring everything up a level

#

but everyone builds a bit differently.. no u know how i put things together mainly.. with all the screenshots and videos im not gonna show u all my scripts tho.. ๐Ÿ˜„ ill def help along the way

lone jackal
#

@hoary crater I have searched every where and I can't really find a solution for this. Is there a way to avoid rigidbody controllers from getting stuck on walls while still allowing friction? The reason why my player was easily slipping off the edges cause I had my physics material to 0 which stops the player from sticking to walls which I want but what I also want is friction and stop my player from "Slippery movement". Any ideas how I could fix this?

lone jackal
#

Is the character controller good? with the rigidbody you have is kinematic setting does the character controller have something similar?

hoary crater
#

i like it

#

using ur own gravity is easy

#

u dont need a iskinematic setting.. u can teleport a CC by disabling its gameobject or its CC component and reenabling it

lone jackal
#

Can you interact with other objects? like move them around.

hoary crater
#

not on its own.. but with some code uc an

#

theres pros and cons w/ both

lone jackal
#

and do you need a physics material with the cc?

hoary crater
#

ull run into issues u need to solve either direction u go

hoary crater
#

not the environment

lone jackal
#

Honestly I'm considering changing from the rigidbody to cc lol. using the rigidbody is annoying most of the times. gives me a headache

hoary crater
#

CC does stairs well.. it needs a bit of help down slopes..

#

it tries to bunny hop.. u gotta add a bit of gravity to help hold him down

lone jackal
#

Ik with the rigidbody when your adding feature's like vaulting or climbing you would just change the rigidbody to is kinematic. How would that work with the character controller?

hoary crater
#

u'd freeze its X Y position and then just give it a new vector velocity to git it up over the ledge

#

for the Z

lone jackal
hoary crater
#

i used this to figure out my wallclimbing stuff

lone jackal
lone jackal
hoary crater
#

looks good so far

lone jackal
hoary crater
#

you'll need to move the colldier down a bit.. the character controller has a skin that keeps it a bit above the ground..

#

i use raycast that extend about .2 or .02 outside the capsule colldier

#

green is grounded red is not.. i think i just use the character controllers built in .isGrounded variable and then double check w/ the raycast

lone jackal
# hoary crater

Will it be a "problem" if I completely lower the skin width?

hoary crater
#

idk

#

i tend to not care.. if i put a model or something over it later i can just offset it

#

the player will never know they're a few inches off the ground will they?

#

just lower ur capsule hieght the same as the skin and it'll be compensated

#

ur cam will be just as high as it would be w/ the skin width turned down

lone jackal
hoary crater
#

ya

#

exactly

#

thast what 'd do

lone jackal
#

Thanks for the help!

hoary crater
#

no worries...

#

CC and controllers in general kinda suck to figure out on ur own

#

i got a car controller too thats pretty epic ๐Ÿ˜ˆ

#

its also using a cinemachine cam

#

i can toggle into the car view but i forgot how tbh ๐Ÿคฃ

lone jackal
#

How do you handle stairs? Do I have to make my ground check radius bigger?

#

Cause my ground check bool goes from true to false really fast

hoary crater
#

okay thats where the fun part starts.. ur velocity needs to a bit stronger when on stairs

#

so anytime ur airbourn really.. its tied into the gravity..

#

if ur grounded gravity is a constant... if ur not ur giving it a little extra to push it down..

#

(you do this for slopes too)

#

and when u jump or anything like that u have to manually cancel out those extra forces

#

so they dont hold u down while u try to jump..

#

so its basically just cancelling out all ur velocity b4..

cc.velocity = new vector3(0,0,0);; like da

#

ur ground chekc will still kinda flicker unless its longer

#

or u have more of them.

#

im not sure how this wizardry works.. but it detects the edge exactly to stay grounded

#

collision maybe?

lone jackal
#

is that just ray casting?

hoary crater
#

it looks like when any of them get triggered (or becomes grounded) the ones around it make sure

#

heres his asset if u wanna check it out

#

its a rigidbody but i still take/learn a great deal from it

lone jackal
hoary crater
#

i prefer them b/c i use them everywhere

lone jackal
hoary crater
hoary crater
#

i think its the other raycasts that form the ring.. that are raycasting to that same spot

#

to see if it hits anything in the process.. that would be the new ledge it detects

#

if that makes sense

lone jackal
hoary crater
#

no its from that asset i shared

#

i had to pay for it from the store.. last year

#

and then he decided to stop supporting it and now its free

#

so now im sharing alot more of it than i would have

#

i can look in the code and see if ic ant figure out what the raycasts are doing

#

or u can check ๐Ÿ‘

#

its a bit more complex than beginner level i think

#

when i first got it it took me a while to figure out how the components were working together...

#

but if u just wanted to get a look at the code and see how somethings done thats a bit different.. u should be able to adapt it pretty easily

lone jackal
hoary crater
#

ud just subtract a float on the Y property of the vector ur using for the movement

#

i dont do step heights i just use a gravity variable that i tweek as i need

#
private void ApplyGravity()
{
    if (characterController.isGrounded && gravitySim < playerSettings.gravity)
        gravitySim = playerSettings.gravity;

    gravitySim += playerSettings.gravity * Time.deltaTime;
}```
#

if im grounded the gravity becomes a constant practically gravitySim += playerSettings.gravity * Time.deltaTime; im always adding and adding to it.. unless im grounded cs if (characterController.isGrounded && gravitySim < playerSettings.gravity) gravitySim = playerSettings.gravity; and if i am grounded i check if the gravity is greater than where i want it locked and it if is i set it back to that value i want it to stay at...

#

that way if im falling (not grounded) gravity is +=
if im grounded its basically =

#
finalVector = 
    (groundVector * finalSpeed) + 
    (airVector * playerSettings.airSpeed) + 
    (Vector3.up * gravitySim);``` this is the vector i pass into the move function it has that `gravitySim`
lone jackal
#

This seems like a headache lol. Thanks for the help I'll go and get on with it. ๐Ÿ‘ @hoary crater

hoary crater
#

i used this to help me figure out slopes

#

fun fact: u can use slopes for ur ramps and stairs..

#

as an invisible collider..and the stairs being graphics only

lone jackal
hoary crater
#

ive almost got my LAB environment finishd. ill be releasing my CC along with it

hoary crater
#

w/ the steps as the graphics

#

then ur only dealing with movement up and down slopes..

#

can direct ur attention to just that one issue

lone jackal
hoary crater
#

u have to make one in blender lol

lone jackal
#

Ohh lol

hoary crater
#

or probuilder

lone jackal
#

Well I did in probuilder

hoary crater
#

for testing u can just twist a cube on its side

lone jackal
lone jackal
hoary crater
lone jackal
hoary crater
#

ya lol

lone jackal
#

Sheesh

hoary crater
#

just made whatever tf this is

#

lol

#

i use increments of .1 and .01

lone jackal
# hoary crater

I think I'm also going to improve my blender skill as well lol. Your making me a bit jealous with what your making ๐Ÿ˜.
I always find it a bit difficult making odd shapes I would only use blender to do simple stuff like separate meshes or make rounded cubes that's about it.

hoary crater
#

bevel modifier is OP

#

Extrude Scale Inset Bevel are the tools i use most often

lone jackal
hoary crater
#

can u step off the top and not be crashed into the ground at mach speed

#

that was 1 issue i had lol cuz i did gravity++

hoary crater
#

i didnt knw what i was doing when i built mine..

#

this CC is 4 years in the works

lone jackal
#

@hoary crater I was wondering if I did the crouching right. I tested it out and it works perfectly.

lone jackal
#

Thought I would tell you before hand ๐Ÿ‘Œ

hoary crater
#

thats y i let mine hover ๐Ÿ˜‰

lone jackal
hoary crater
#

on what type of terrain?

#

like get stuck where? lol ive not notice it being stuck anywhere

lone jackal
hoary crater
#

imma send u my CC package here today

#

Ohh i havent really worked on my crouching in a while

#

i never finished it i got sidetracked implementing the raycast that tells if soemthings over ur head

#

that way u cant stand up inside a tunnel and clip into the terrain

hoary crater
#

did u not need to change ur Center position of the collider when u crouch?

hoary crater
#

i did ๐Ÿค”

lone jackal
#

Discord is shit I can no longer send you a video clip thats below 10 seconds long. I could do that before not any more ๐Ÿ˜ฆ

hoary crater
#

i use ShareX

#

has pretty good compression

lone jackal
#

Thanks for that its pretty cool.

#

What value do you have your skin width at?

hoary crater
#

stock

lone jackal
#

Bro I have the same values as you so why am I getting stuck? I made sure there's nothing in the way

hoary crater
#

the only difference is reall that center variable i mentioned

#

whats ur gizmo look like when u crouch?

lone jackal
#

Wait wtf im not getting stuck anymore lol

#

It randomly just fixed itself?

hoary crater
#

lol bruh

lone jackal
#

Issue now is why do I stutter when going from crouch > standing

hoary crater
#

^ thats exactly why i changed the center

#

b/c when u grow the capsule unless uc hange the center to give it room to expand above the ground it clips down into the ground and pops in and nout

#
    private void CrouchCheck()
    {
        if (Input.GetKey(KeyCode.LeftControl))
        {
            isCrouching = true;
            // Height and Center deltaMaxs need to match
            characterController.height = Mathf.MoveTowards(characterController.height, 1f, (7f * Time.deltaTime));
            characterController.center = Vector3.MoveTowards(characterController.center, characterSettings.crouchingVector, (7f * Time.deltaTime));
        }
        else if (!obstacleOverhead)
        {
            isCrouching = false;
            // Height and Center deltaMaxs need to match
            characterController.height = Mathf.MoveTowards(characterController.height, 2f, (5f * Time.deltaTime));
            characterController.center = Vector3.MoveTowards(characterController.center, characterSettings.standingVector, (5f * Time.deltaTime));
        }
    }```
lone jackal
hoary crater
#

just the data

#

bunch of player variables

#

wanna see it?

lone jackal
hoary crater
#

well ya. ud use ur own variables and not mine..

#

all these are just playerSettings.gravity, playerSettings.walkSpeed, playerSettings.jumpForce etc

#

it just helps me keep things organize

lone jackal
hoary crater
#

instead of characterSettings.walkSpeed u'd just use for example ur walkSpeed variable

#

i thnk ur thinkin bout it too hard..

my walkSpeed is just a public variable in my characterSettings script..

lone jackal
#

Are you using scriptable objects?

hoary crater
#

yessir ๐Ÿ˜‰

#

thats what this is

#

i have multiple versions with different settings that i can swap out

#

to be honest ur testing things alot more than I am..

#

so i may have some of the same issues

lone jackal
hoary crater
#

these are the values i used

#

urs may differ tho

#

characterSettings.crouchingVector just = Vector3(0,0.5,0);

#

or u could just use a float

#

if u wanted

#

0.5 or w/e u needed

lone jackal
hoary crater
#

sure

#

i was thinkin why i used vector3 instead of a float

#

i really dont know...

#

maybe its b/c MoveTowards uses vectors?

lone jackal
hoary crater
#

u can

#

or u can use the vector3 version not sure y idid tho

lone jackal
#

I also have this issue where sometimes the crouch height value wont go down to 1 it will stay around 1.024408 and sometimes goes back to 1

hoary crater
#

you can always have it clamp itself after it passes a threshold

#

if its close enough to 1 just make it 1

lone jackal
#

@hoary crater when you did your leaning feature did you clamp your rotation? I'm nearly there lol, would I clamp it and have it as the same values as cinemachine?

hoary crater
#

you'll have to figure that out urself i think..
my first thought was that my tilting comes after the cam rotation script...

  • my cam controller
    • my tilt
      • my cam
#

but i dont think u can do that if ur rotatn the cinemachine cam itself

#

thats y i dont actually put any code on my camera itself.. (only the FOV) does..
that way i can just manipulate the outter container objects

lone jackal
#

Alright thanks

hoary crater
#

im summoned ๐Ÿ‘€

lone jackal
#

How's your asset coming along?

hoary crater
#

meh

#

im at the very end..

#

finalization/boring stuff/ kinda stalled

#

organization, documentation, dummy-proofing

#

all that jazz ๐ŸŽถ

#

found a decent free industrial font

#

it really helps tie it all together

#

not doing sounds i guess..

#

maybe an update

#

this thread is insanely long my friend.

#

at this point i guess u could just DM me

#

wait how old are u?

lone jackal
hoary crater
#

aight yea u can DM me

lone jackal
hoary crater
#

i try to be weary of talkin to squeekers

lone jackal
#

being cautions I see lol.. jk

hoary crater
#

mmhmm

#

plus they tend to waste ur time

#

not really serious enough

#

"AI can do it"

lone jackal
#

big time wasters

hoary crater
#

pfft.. boxfriend knows his stuff way more than any squeeker

#

i assure u that

#

me and Nav are actually friends btw ๐Ÿ˜‰

lone jackal
#

Do you like rocket league?

hoary crater
#

i actually have my own server with most of the smart-heads around here

#

u might recognize a few

lone jackal
hoary crater
#

ya alot of em used to be around

#

and they got fed up with all the AI i guess

#

theres 40 something offline right no

hoary crater
hoary crater
lone jackal
# hoary crater why do u ask?

Just found it abit funny how you left a review on it saying it was a bad game and here you are playing it here and there lol

lone jackal
hoary crater
#

i hate the players the games addictive.. i guess i hate that too

#

but i cant stop playing! lol

#

it was a troll post

#

b/c of my hours ๐Ÿ˜‰

lone jackal
#

I prefer the old one

hoary crater
#

yea.. epic fkd it up

#

i started playing it in 2019

#

soo it looks like alot of hours.. but tbh i let it sit idle on the menu screen alot

#

like .. A Lot

lone jackal
#

my fav was the pure white one

hoary crater
#

i have a white merc..

#

but mercs be thicc

#

dang it.. now i want to play

#

fail.

lone jackal
#

lol

lone jackal
#

@hoary crater I did some googling about cinemachine and I found out about the Dutch option in the lens section. I fiddled around with it and this is what I came out with.

#

tbh I don't know if I did it right but HEY IT WORKS! The Script

#

Never knew about this setting pretty cool

lone jackal
#

Works great don't need to make the cam_leaning follow my camera

lone jackal
#

@hoary crater Quick question. do you think I should continue using cinemachine for first person? I feel like this will cause problems later on idk. Why do you use the normal camera?

hoary crater
#

the only reason i need cineamchine is for the camera changes/scnene menu transitions and stuff

#

so i use a cinemachine as my lowest level camera.. BUT i dont modify or change it at all.. the code thats moving the object targets its parent instead..

#

so i still have cinemachine w/o the rest of caveats of using cinemachine

lone jackal
#

would you recommend using it for first person? Only reason why I'm using it cause of the stutter when looking around while moving. should I revert back to the normal camera?

hoary crater
#

if u want.. its really up to you..
theres ways to make the camera smooth w/o cinemachine its just ppl recommend it b/c its the easiest

#

most likely cuz they dnt wnt to help figure out normal camera code ๐Ÿ˜„

#

but with a CC (i think u converted)

#

theres less room for it to jitter..

#

b/c the camera code and the movmeent code are now both working in Update()

#

the biggest part of jitter comes from (fixedUpdate)RB vs Update(cam)

lone jackal
hoary crater
#

i dont have any on any of hte CC's ive used in the past

#

CCs run in the Update() loop.