#💻┃code-beginner

1 messages · Page 364 of 1

spiral oak
#

Yeah that would work

wraith hornet
#

but this time, it doesn't

spiral oak
wraith hornet
#
    {
        spawnedObjects = new GameObject[numberToSpawn];
        for(int i = 0; i < numberToSpawn; i++)
        {
            spawnedObjects[i] = Instantiate(
                    objectToSpawn,
                    GetRandomPosition(spawnRange),
                    Quaternion.identity
                );
            SetAnimation(spawnedObjects[i], clipsData);
        }
    }
private void SetAnimation(GameObject spawnedObject, ClipsData clipsData)
    {
        Material animationMaterial = spawnedObject.GetComponent<MeshRenderer>().material;
        
        ClipData clipData = clipsData.clipsData[Random.Range(0, clipsData.clipsData.Length)];

        animationMaterial.SetFloat("ClipStart", clipData.clipStart);
        animationMaterial.SetFloat("ClipEnd", clipData.clipEnd);

        animationMaterial.SetFloat("AnimationTimeOffset", Random.Range(clipData.clipStart, clipData.clipEnd));
    }``` . is there any problem ?
wraith hornet
spiral oak
wraith hornet
#

no, there aren't errors and warnings

#

but there isn't material that changed when the game start

#

but all materials are (instance)

spiral oak
wraith hornet
spiral oak
# wraith hornet yeah

then just to make sure, do ClipStart and ClipEnd change at all when you start the game?

wraith hornet
#

they didn't, all of instanced material are as same as in prefab

#

nothing changed

ruby python
#

Might be worth Serializing your AnimationTimeOffset in the shader (make it an exposed property) and then pause the game and have a look on each instance of the character to see if it's offsetting properly?

wraith hornet
#

i fixed, thanks u guys

#

the name of variable are wrong, i forgot "_"

lethal bolt
#

Why dosent the game object show in the Inspector?

languid spire
#

because you have a compile error

summer stump
#

Because there is an error in the script

deft grail
summer stump
#

Position is already a vector

#

Why pass it into new vector?

lethal bolt
wraith hornet
swift crag
#

Unity can't do anything with your code until it can compile it.

wraith hornet
#

there is not Vector3(Vector3 v3)

languid spire
swift crag
#

It can't just ignore the error and try to compile the rest

gentle flint
#

'```
void Start()
{
LoadLevels(0);
Respawn();
}
void LoadLevels(int id)
{

    GameObject Level=Resources.Load("Levels/Level"+id.ToString()).GameObject();
    Instantiate(Level,Level.transform);
} ```

When i start the Game there are two Levels0 in the scene, is Instantiate() running twice?

deft grail
lament sable
#

can anyone help me when I use a .blend file in unity it does not give all collers but only white and black what do I need to do to fix it ?

gentle flint
#

i would never have though of that lol

polar acorn
#

You'll have more control over what gets exported, and be able to adjust it so it uses the proper axis orientation

lament sable
lament sable
polar acorn
lethal bolt
#

Why does the rotation Scale things when they are a child? of an empty?

frosty hound
#

Because the root object isn't uniform scale

lethal bolt
#

Oh. Is there an aviable sulotion?

lament sable
frosty hound
warm condor
#

Hi guys, I have been trying to program the player to slide using animation curves, and it did not go the way I expected to go. When I am sliding here, my velocity drops down to a very low value instead of staying at a higher value, even if I change the graph of the animation curve. Here is my code:

        SpeedDown(slideRate);
        speedDuringSliding = slideCurve.Evaluate(deccelerationProgress) * initialHorizontalSpeed; //Multiply the initial horizontal speed to start sliding at the current velocity 
        rb.velocityX = speedDuringSliding * direction;

    private void SpeedDown(float rate = 1) {
        deccelerationProgress = Mathf.MoveTowards(deccelerationProgress, 0, Time.deltaTime * rate);
    }
    ```
lethal bolt
warm condor
#

is there a problem with the way I am coding this or is there something else at play here?

summer stump
candid rune
#

is it possible to access a script from another scene and use variables from it?

summer stump
candid rune
#

yikes okay, so creating a slider to change a variable used in another scene is a real pain then?

wintry quarry
#

It's very simple when you understand references and how to manage them in Unity

summer stump
warm condor
warm condor
#

oh yes sorry. But my point still stands.

summer stump
#

But yeah, hard to say. Maybe it is going very quick, was my suggestion

warm condor
summer stump
#

It's hard to even know the problem from just what I've heard honestly. Try debugging the x value and the return of evaluate

warm condor
#

the curve that is being used here is a linear curve, so it doesn't make sense something like this is happening

#

I have a similar function that uses the same code that accelerates, and this one works as intended

tall torrent
#

!vs

eternal falconBOT
#
Visual Studio guide

If your IDE is not underlining errors in red or autocompleting code,
please configure it using the link below:

Visual Studio (Installed via Unity Hub)
Visual Studio (Installed manually)

trail gull
#
    private void ApplyExplosionForce(Vector3 explosionPosition)
    {
        Collider[] colliders = Physics.OverlapSphere(explosionPosition, explosionRadius);
        foreach (Collider hit in colliders)
        {
            if (hit.CompareTag("Floor"))
            {
                Rigidbody rb = hit.GetComponent<Rigidbody>();
                if (rb != null)
                {
                    rb.AddExplosionForce(explosionForce, explosionPosition, explosionRadius, upwardsModifier, ForceMode.Impulse);
                }
            }
        }
    }

I have an explosion force which im putting on a navmesh enemy, once I apply the force the navmesh just keeps moving back and never stops to come target me again, how would i make it so that the navmesh is pushed back by the explosion force then targets me again when it stops moving or the force is done

lethal bolt
#

Shouldnt this Rotate the object?

queen adder
#

guys ima misspell continiueue

swift crag
polar acorn
lethal bolt
#

I thougth it sat the rotation to 0 on all axis....

swift crag
#

Read the documentation to find out what functions do.

lethal bolt
#

I do

rich adder
#

transform.rotation = Quaternion.Euler(0,0,0)

trail gull
#

could anyone help me with my navmesh problem?

rich adder
rich adder
# trail gull here

alright so you're mixing Navmesh Agent with rigidbody , you're going to have to show the complete script
So far is not looking good, since you want to disable the navmesh agent while doing the "push back"

rich adder
eternal falconBOT
trail gull
#

oh

trail gull
rich adder
#

so this is what adds the damage effect or whatever?

#

where is the actual enemy script

trail gull
trail gull
# rich adder where is the actual enemy script
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;

public class Enemy : MonoBehaviour
{
    [Header("Enemy Settings")]
    public int moveSpeed = 4;
    public int minDist = 5;
    public int maxHealth = 30;

    public float lookRadius = 10f;
    public Transform target;
    public NavMeshAgent agent;

    private bool isPushed = false;
    private Rigidbody rb;

    void Start() 
    {
        rb = GetComponent<Rigidbody>();
        agent = GetComponent<NavMeshAgent>();
    }

    void Update() 
    {
        if (!isPushed)
        {
            float distance = Vector3.Distance(target.position, transform.position);
        }
    }

    void OnDrawGizmosSelected()
    {
        Gizmos.color = Color.red;
        Gizmos.DrawWireSphere(transform.position, lookRadius);
    }

    public void TakeDamage(int damage)
    {
        maxHealth -= damage;
        if (maxHealth <= 0)
        {
            Destroy(gameObject);
        }
    }

}
rich adder
#

ok well lets start with the biggest problem, nowhere are you actually disabling the navmesh agent , not even sure how the addforce worked in the first place

#

You want to
-DisableNavmesh agent
-maybe go from Kinematic RB to Dynamic
-Add Force
-After certain time or distance, Turn back to kinematic, and turn navmesh agent, assign new destination

rich adder
mystic chasm
#

I'm trying to create a gravity switcher mechanic and I'm failing to use quaternions/rotations to reorient and remap player input to handle movement.
Would someone hop in 5min call so I can show current state and ask questions?

trail gull
#

Ah okay

rich adder
#

very unlikely you get someone on a call

wintry quarry
trail gull
#

Then disable the navmesh

rich adder
#

simply call that method when the bullet thingy hits enemy

rocky canyon
#

ya, why spend 5 min showing just (1) person ur problem..
rather than spending 5 minutes.. to type up a solid summary of the problem, with links to !code, screenshots, and videos

eternal falconBOT
rocky canyon
#

then many many people have a chance to pop in and help ya

trail gull
rocky canyon
trail gull
#

what does going from kinematic to dynamic do?

rich adder
rocky canyon
summer stump
rich adder
#

You dont want a dynamic rigidbody on a navmesh agent

#

it helps not fight it out with navmesh agent

#

they both override the transforms by setting it

rocky canyon
trail gull
#

ah i see

rich adder
#

it is acceptable for certain use cases, if you lock all the constraints though, to keep it dynamic,
its a cheap way to get Navmesh agents to interact with Rigidbodies around it

#

I had doors that were physics based on a hinge, and navagent would pass through, with a dynamic rigidbody and constraints locked, the navmesh agent can "push" the door

#

although this can be cleaner and easy to solve with Physics queries/casts

rocky canyon
#

i don't modify the rigidbody ofc

#

it is acceptable for certain use cases
oh, ok i see u agree

rich adder
#

yeah tbh as long as the constraints are locked, its not an issue

#

a dynamic rigidbody without it though will be fighting for the Transform component

#

You ever try to move navmesh agent manually with the arrows? doesn't happen, it just goes back where it was last before you moved it manually

#

hence to teleport it you have to do the same thing you do with Character Controller (disable-move-enable)
or use navMeshAgent.Warp

swift crag
#

Reduce the minimum movement distance on the CharacterController

#

The default is a bit too high.

#

I'm not sure if there's any problem with setting it to 0

#

I guess it saves work if your controller is getting extremely tiny move commands

#

like from a smoothed input that takes a long time to actually hit zero

rich adder
#

is that not the default ?

rocky canyon
#

Just wrote me a little Mouse Follow script..
Made it work as 2d plane, 3d plane, and raycast into world space, (+normals)
awesome little addition to my snippet collection..

question: has there been any new addition to inspector stuff maybe attribute to make it soo only some booleans appear dependent on other booleans?

#

soo for example.. when 2d is false then options like the use normal would be visible..

rich adder
#

no way built in rn

formal escarp
rocky canyon
#

not too performance heavy would it?

rich adder
#

nahh

rocky canyon
#

okay good.. i can do that 👍

rich adder
#

If possible try using UIToolkit but the old GUI works just fine

rocky canyon
#

i'll look into that. i havent tried it yet

#

feeling a lot more comfortable with them now

rich adder
#

editor scripting is fun

rocky canyon
rich adder
#

hmm its not animating

rocky canyon
#

my last editor script had dozens and dozens of GUILayout.Begin, .End, etc

#

then i realized if i used a function instead.. it cleans it up alot

rich adder
#

from my sprite extractor asset

#

all UIToolkit

rocky canyon
#

oohhhh bb.. very nice! 🙂

#

i havent done anything with a scrollbar yet

rich adder
#

I was trying to add more custom stuff in the table entry but was a pain 😅

rocky canyon
#

🤣 which was actually the default scroll bar..

#

and some bad scaling issues

rich adder
rocky canyon
#

i cant figure out how to solve the issue..

#

the component by itself.. doesn't do it.. b/c the scroll is dependent on how large that (1) component is

rich adder
#

oh yeah this is inspector, so its a bit different

summer stump
#

It's beautiful. Just leave it

rocky canyon
#

but once u have a stack of them together..

#

it kinda is hit or miss

rich adder
#

mine isn't a custom inspector, but a custom window

rocky canyon
#

if u have them expanded.. the scrollbar makes it jitter

rocky canyon
#

i havent done any of those either

rich adder
rocky canyon
#

have you done any of the in-scene window type ones?

swift crag
#

just poking atthat right now, actually

rocky canyon
#

like w/e these are called is that that?

rich adder
rocky canyon
rich adder
#

ohh i was thinking this

rocky canyon
#

with the new Unity6 utilizing them soo much

rocky canyon
#

looks fun

rich adder
#

can you believe thats where probuilder is now

swift crag
rocky canyon
#

its about time

rich adder
rocky canyon
#

ive always disliked probuilders cartoony window 😅

sleek pond
#

Hey can you guys help me with instantiate

summer stump
rocky canyon
#

wont know til we know

sleek pond
#

I want to delay the process

rich adder
summer stump
sleek pond
#

Am using visual scripting

summer stump
summer stump
rich adder
rocky canyon
# rich adder are you sure thats from the editor script and not your Unity

it is.. b/c the image is scaled unless it has room... soo 400 pixels wide for example.. it can't get any bigger than that.. but it can be scaled smaller..
soo in that one specific circumstance.. the scrollbar pops up.. (makes the image scale down) and then it fits... soo the scrollbar disappears.. (now the image can scale back up.. so it does..) then the window is too small so the scrollbar pops back up..

#

and it cycles.. 😄

sleek pond
#

Okok

#

Thank you

rich adder
rocky canyon
#

mmhm..

#

i found a sweet spot where it doesn't happen very often

rich adder
#

might have to nest it into something else

rocky canyon
#

my only other alternative (that i can think of) is to just make it a fixed size

rocky canyon
#

i'll try later when i make my rotation back to editor stuff lol

rich adder
#

UItoolkit also has interesting functionalities that are css-like

#

flexbox and all that

rocky canyon
#
        if (spawnScript.logoTexture != null)
        {
            float inspectorWidth = EditorGUIUtility.currentViewWidth;
            float logoWidth = Mathf.Min(inspectorWidth, MaxLogoWidth);

            float aspectRatio = (float)spawnScript.logoTexture.height / spawnScript.logoTexture.width;
            float logoHeight = logoWidth * aspectRatio;

            GUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();
            GUILayout.Label(spawnScript.logoTexture, GUILayout.Width(logoWidth), GUILayout.Height(logoHeight));
            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();
            GUILayout.Space(10);
        }```
#

im not well versed in the editor stuff...

#

but im adding to me list of things i know about as i go

timber tide
#

imagine being a web dev and having enough patience to use UIToolkit

rocky canyon
rich adder
#

isn't there something else instead of a Label ?

rocky canyon
#

lmao

sleek pond
#

Well no one is on vs

rich adder
sleek pond
#

So should I also switch to coding

rocky canyon
summer stump
rich adder
timber tide
#

coding makes you better at vs

rich adder
#

you're just typing it instead of graphing it

polar acorn
# sleek pond So should I also switch to coding

Honestly yes. It's actually easier to learn real C# code because you have a lot more resources to find answers. Bolt is Unity-specific, but C# is used everywhere. A lot bigger knowledge base to draw from

rocky canyon
#

yup, visual coding is just little snippets of code contained in a node..

sleek pond
#

Ohh

rocky canyon
#

if u know which nodes connect. you'll be just as good coding it by hand

sleek pond
#

I have started learning c#

polar acorn
#

Visual Scripting is kind of a "noob trap". It feels easier to learn, but since it's so specific in scope it's actually harder to find good information about it

queen adder
#

could someone help, i tried doing this but it keeps saying that it cant add the score because AddScore protection level is too high to access

sleek pond
#

That looked so easy when I first tried

timber tide
#

vs is useful for general tools, but if you think you can just make a whole game using it, ya kidding yourself

rocky canyon
rich adder
queen adder
summer stump
#

Write the word public

queen adder
#

where

polar acorn
rocky canyon
#

private -> public

#

lol

rich adder
polar acorn
summer stump
#

Same as the other methods where you wrote private, but the word public instead

polar acorn
#

DOUBLE KILL

rich adder
#

when you dont specify access modifier, defaults to Private

queen adder
#

oh oops wrong script pic

rocky canyon
#

the answer is the same

summer stump
#

The issue is with the other one

#

LogicScript

stuck palm
#

how can i make changes save that i make in the editor in play mode?

rocky canyon
#

public void AddScore

queen adder
#

Make the the AddScore method public in the LogicScript class

rocky canyon
queen adder
#

oh thx

#

it works now

rich adder
rocky canyon
#

if your changing Scriptable Objects i believe they stay changed.. but im foggy on that

rich adder
#

Cinemachine can fucking do it, why dont we have an option already

rocky canyon
#

^ oh that one too

stuck palm
void thicket
rocky canyon
#

Paste Component as Values

void thicket
#

That's a HUGE mess

rich adder
#

is it ?

#

probably shit tone of reflection

queen adder
#

this is the best game in unity 100%

void thicket
#

Let me fetch it

rich adder
#

I smell asset money

#

just a nice checkmark on each component to "Keep changes after play"

rocky canyon
#

🤫

rich adder
rocky canyon
rich adder
#

Holy mother

void thicket
#

Who's idea was it lol

stuck palm
#

what are interesting states lmao

stuck palm
rich adder
queen adder
rocky canyon
#

i wasn't even talking to you.. me and navarone were talking

rocky canyon
#

are you high? wtf do u mean what do i mean?

rocky canyon
#

makes sense..

queen adder
#

actually no-

rocky canyon
#

i google'd InterestingStates and i can't find anything

rich adder
stuck palm
rocky canyon
#

i thought i may find something

rocky canyon
queen adder
#

Reflection is also used to get metadata about an object

rich adder
#

iirc when you do Gameobject.Find that uses reflection

stuck palm
queen adder
#

bruh im

#

bored

summer stump
rocky canyon
rich adder
strong wren
#

@queen adder This isn't the server for this sort of crap

queen adder
#

Lmao

swift crag
#

then you know to not do it

#

so stop.

summer stump
rich adder
swift crag
#

Reflection is necessary when you don't know what you're looking for ahead of time

#

and have to dance around the type system

rocky canyon
#

ya, im thinking rn how would that fit into Find()

rich adder
#

I do remember it was a certain function that used reflection, I dont remember which one tbh

queen adder
#

Yeah I didn't think Gameobject.Find used reflection but I didn't wanna say anything to avoid looking stupid lmao

swift crag
#

as well as Invoke

rich adder
#

ah yeah that makes more sense

queen adder
#

Invoke() uses reflection to

swift crag
#

these are calling a method by name, and so by definition have to do reflection at some point

#

(you can cache the results, at least)

rich adder
#

I'd imagine

queen adder
#

Yeah

summer stump
void thicket
#

I mean Start and Update is called with reflection in the first place

queen adder
#

Really?

rich adder
#

interesting

#

wouldn't that be Awake ?

queen adder
#

Aren't they just derived methods?

rich adder
#

iirc Awake uses Messages or Event

rocky canyon
#

there are people that say they're using reflection for finding properties of classes.. soo they can access them via URLs

#

but idk

void thicket
#

Every event messages. How else Unity will call the private methods.

#

Unless they have dedicated interface like some event handlers

rich adder
#

anything prefixed with On is event in MB right ?

swift crag
#

note the lack of override

queen adder
#

Omfg

rich adder
queen adder
#

I'm so dumb

mystic chasm
void thicket
#

Awake OnEnable whatever

rich adder
#

had no idea those were "Messages" instead of Event

queen adder
#

Yeah me either ^^

rich adder
#

makes sense though it needs to be broadcasted to all the gameobjects

swift crag
#

well, "event" isn't really a thing you'd implement in your class at all

queen adder
#

That's why I love this channel my head is constantly blown

swift crag
#

that'd be a delegate that you add your own methods to

void thicket
#

Unity had this.. design decision long times ago when SendMessage is a preferred way

swift crag
#

would you like to see my deviantart OCs

#

💥

queen adder
#

Wdym that's fire!

void thicket
#

But they still haven't fixed it 😢

rocky canyon
#

so-called Messaging system

rich adder
swift crag
#

well, still get run

rocky canyon
#

i did not

rich adder
#

because they still call to the C++ code

#

i only know because of the Unity PDFs (trying to find it)

gaunt cosmos
#

hi guys!

rocky canyon
#

i have a good chunk of Unity's docs printed out in a notebook in my car...
for those times when im stuck out somewhere and need some reading material..
i haven't reached that part yet 😄

queen adder
rich adder
#

yea I don't leave any empty methods

#

also my "newscript" template is without those Start/Update. I delete them anyway

queen adder
#

^^^put them on😆

#

My new script template is
" Using UnityEngine.

Public Sealed Class ClassName {
}
"

#

New script template option is underrated

rocky canyon
#
using UnityEngine;
    #ROOTNAMESPACEBEGIN#
public class #SCRIPTNAME# : MonoBehaviour
{
     #NOTRIM#
}
#ROOTNAMESPACEEND#
queen adder
#

Yeah that's mine^^ except I seal my classes

gaunt cosmos
queen adder
#

Classes should be sealed by default

#

If you don't plan on deriving them it should be sealed

rocky canyon
#

theres actually a Empty C# template

gaunt cosmos
#

and you guys don't use regions??

rocky canyon
#

not sure how u create an empty c# script tho..

queen adder
#

Yeah we use regions?

gaunt cosmos
queen adder
#

A very very very small performance boost

rocky canyon
#

mostly for variable walls

queen adder
#

But apparently on some phones there is a considerable performance boost when sealing classes / methods

rocky canyon
#

40 line KO

gaunt cosmos
void thicket
queen adder
#

There is

void thicket
#

It's just preventing yourself and other people from inheriting that class

queen adder
#

Omg I haven't coded in like 2 months

#

Whats the language C# turns into after compiling

#

It's intermediate something

void thicket
#

IL

gaunt cosmos
#

what do you guys do?

queen adder
void thicket
# queen adder There is

I guess one thing is that if you seal your method, and call that directly, that might be some boost because the call does not have to be virtual anymore

eternal needle
#

Oops

#

I thought we were talking about region not sealed

languid spire
#

fyi, using internal and sealed can improve compilation times on a large code base

void thicket
queen adder
#

Ooooh yeah that makes sense

#

Hold on im looking for the one unity posted about sealing classes

amber spruce
#

is there a way to make a number go to the power of 2

amber spruce
void thicket
#

1 << 8 is same as 2^8

amber spruce
#

so if i have a variable that is a float and its called damage and i want to put it to the power of 2.5 what would it look like

void thicket
#

Then you use Mathf.Pow lol

amber spruce
#

k thanks

rocky canyon
rocky canyon
void thicket
#

I think creating "empty C# class" was a thing at some point lol

queen adder
#

No you just can't derive anything

rocky canyon
gaunt cosmos
#

dont think so

queen adder
#

But once you do decide to derive you just delete the keyword lol

gaunt cosmos
#

one constraint that too can be changed if need be

queen adder
#

I've had intense arguments with other programmers on why sealing class is terrible design but all you have to do is delete the keyword lol

gaunt cosmos
#

don't seem to be issue

rocky canyon
#

yea, i was thinking it may hide/ disable some intellisence stuff..

void thicket
#

You spend few more bytes on your code 😄

rocky canyon
#

but if not deriving is the noly con.. i dont consider that a con..

zenith cypress
#

Sealed my beloved

gaunt cosmos
eternal needle
rocky canyon
#

lol

#

valid point

zenith cypress
#

In Rider I default all my structs to readonly and all my classes sealed LUL

void thicket
#

verbosity

queen adder
#

There points where it should be open by default because they are more than likely going to derive the class in the future and it limits what you can do with the class

zenith cypress
#

Limits sound good to me

queen adder
#

But bruh if you want to derive in the future just delete the keyword. You also shouldn't being planning to make everything deriveable

rocky canyon
#

innovations are born from limitations 😉

gaunt cosmos
#

bawsi got better point lol

queen adder
#

Literally lmao^^

swift crag
#

Your public API should clearly express what is and is not permissible.

void thicket
#

I mean it should be "default" and there should be keyword for "breaking seal"

queen adder
#

Had they just said they don't want to I would've respected that more

rocky canyon
swift crag
#

If you give someone a sealed class, you are telling them that this class cannot be derived, and that you should not expect to be able to derive from it

#

If users have to send you an email saying "Hey can you unseal XYZ class for me", that's a bonkers API

rocky canyon
#

makes sense

zenith cypress
#

Any time I try to inherit when it is sealed, I instantly reconsider why I wanted inheritence in the first place, then unless I actually need it, I do it a different way danceByTiovayn

gaunt cosmos
#

good point fen

swift crag
#

It's like if you made everything in your library internal by default and only exposed them when someone asked you to

#

sure, that minimizes your public API surface

#

but you've missed the forest for the trees

zenith cypress
queen adder
#

Damn bruh stop making second guess myselfnotlikethis notlikethis

swift crag
rocky canyon
#

ya, if u look at it like that.. there really isn't a con to sealing it

#

its sealed b/c its meant to be

swift crag
#

not me embedding Cinemachine so I can reach into something internal

void thicket
#

Good library should work without needs of user inheriting or access internal stuffs

gaunt cosmos
#

vee get to unsealing everything bro

candid rune
#

okay so I'm trying to load two scenes additively and set the first scene that is not being loaded additively as the active scene. It says that the scene I want to be active is active but I end up controlling the scene being added additively.

swift crag
queen adder
#

I just might actually LMAO

swift crag
#

A scene being "active" doesn't mean too much, really

candid rune
swift crag
#

It's just where new game objects go

#

and a few other things

swift crag
#

You need to deal with input switching on your own

candid rune
#

okay

gaunt cosmos
#

you got controller in both?

candid rune
#

it's a main menu in one and a character controller in another

eternal needle
swift crag
#

It matters much less if other people aren't using your code.

summer stump
swift crag
#

I've started thinking about this while working on an an asset pipeline (okay, a Blender add-on and a Unity importer)

eternal needle
#

If "what is exposed" is a concern in your solo indie dev project, you probably have to reconsider your concerns. People go way too hard in the design aspect sometimes

swift crag
#

I'm already mad at myself for breaking changes

#

imagine how OTHER people would feel

candid rune
swift crag
summer stump
candid rune
swift crag
#

Most code doesn't care about the active scene at all

gaunt cosmos
#

there should be better input handling

swift crag
#

some kind of...new input system

swift crag
candid rune
#

yuup

swift crag
#

Each PlayerInput corresponds to a different player

void thicket
#

I bet Unity will eventually add new-new-input-system and new-ui-toolkit 😦

swift crag
#

If you have two of them enabled at once, the input system thinks you have two players

rocky canyon
#

nooooo

swift crag
#

I think you can just disable the PlayerInput you don't want to use.

#

emphasis on think..

zenith cypress
queen adder
#

Personally....I like the new input system lol

swift crag
#

I love the new input system

rocky canyon
#

the New Input system will become the Input System and old Input class will be Legacy

candid rune
swift crag
#

my game supports mouse and keyboard as well as gamepad (with steam deck gyro input!) input

queen adder
#

I think people like the old one because it's simpler

rocky canyon
#

im just now going on my blinddate with it

swift crag
#

I can pull up sprites for any input control, showing the correct sprite for the current platform (well, that's my code)

queen adder
#

But you can do so much more with the new oje

gaunt cosmos
#

i dont use unity's input system

swift crag
#

and show appropriate hints based on your control scheme

queen adder
#

Do you use a package?

summer stump
swift crag
zenith cypress
#

Old one is nice for quick testing, but is such a hassle if you need any kind of multi-device support skull_c

rocky canyon
#

^ thats the transition point for me

gaunt cosmos
swift crag
#

I wrote an editor script to turn individual sprites into groups

rocky canyon
#

if im only writing for mouse and keyboard i'll use the Input class all day

summer stump
rocky canyon
#

as soon as i think about 2nd control devices its a must

swift crag
#

I ask my system "what's the sprite for <Keyboard>/a?" and it fires the appropriate sprite at me

queen adder
swift crag
#

Yep.

rocky canyon
#

is it possible to use 2 input devices for the same map?

summer stump
# gaunt cosmos wdym

You said there should be better input handling. And there is! It's the new input system

swift crag
#

But yes, you can have multiple devices providing input at once (hey, that's mouse + keyboard)

rocky canyon
#

yea,, like using a joystick in one hand. and numpad for the other

queen adder
#

I also like the idea of my game having actions that are called rather than inputs

zenith cypress
gaunt cosmos
swift crag
#

I set up my gamepad control scheme to also allow for a mouse. That lets me use the gyro input on a Steam Deck.

zenith cypress
#

Huh never thought of that

summer stump
gaunt cosmos
rocky canyon
swift crag
#

but I guess this isn't Steam Input.

stuck palm
#

im using a kinematic character controller, how can i make it so when it hits a wall or a ceiling it sets vertical or horizontal velocity to 0?

zenith cypress
#

I assume that stops the auto-switch to the keyboard+mouse map if you never touch the keyboard

stuck palm
#

right now it just keeps going up

#

which sucks

#

and feels bad

gaunt cosmos
summer stump
queen adder
#

Kind of incredible how accessible all of these features are and they are free. I could only imagine having to write all that shit myself

rocky canyon
swift crag
#

Which I'm not a huge fan of, but...ah well

#

Correctly handling both gamepad and mouse interaction in your UI is fun

#

On my Deck, the pointer winds up causing random buttons to get highlighted

#

(even though it's invisible)

#

maybe I should just lock the cursor when you enter the gamepad control scheme

zenith cypress
#

Focus things with a virtual cursor instead heheheh

rocky canyon
#

i have a flight sim where i like to use my joystick. but i also use my numpad for hotkeys..
problem with it is.. when i use the hotkeys.. it disconnects the joystick.. and i have to flick around the joystick a few times to get the gamepad working again..

rocky canyon
#

if i use the new input system.. i just want it to not do that

zenith cypress
#

I actually need to make that for my point-n-click-esque game to even support gamepad

#

But I am lazy

swift crag
#

I just make sure to have good explicit navigation

stuck palm
gaunt cosmos
queen adder
#

You mean like A*?

rocky canyon
languid spire
rocky canyon
zenith cypress
rocky canyon
#

ya, that was kinda my original question..

void thicket
#

Yeah.. Editor integration is confusing

rocky canyon
#

wasn't sure if that was a common practice w/ the new system

void thicket
#

Steve has the point 😄

gaunt cosmos
#

how much experience do you guys have??

rocky canyon
#

2.57 yrs

zenith cypress
#

~7 years

gaunt cosmos
languid spire
summer stump
#

Unity specifically like 7 year? Not even sure anymore. Coding almost 10

gaunt cosmos
rocky canyon
#

steve is on up there too

swift crag
#

in that case everything is used all at once

zenith cypress
#

Makes sense for flight sims probably

#

(not having multiple)

languid spire
swift crag
zenith cypress
#

Lot of fingers

gaunt cosmos
queen adder
rocky canyon
#

lol.. he was programming on Commodore64s

#

getting his code from a black and white magazine

languid spire
rocky canyon
#

😄

languid spire
queen adder
#

Man was turning light switches on and off by hand

rocky canyon
#

thats as far as my context goes

languid spire
queen adder
#

Wait really steve? This is personal question but how old are you bro?

languid spire
#

nearly 70

gaunt cosmos
rocky canyon
#

my dad showed me some of the old magazines he'd buy and it would have programs/games code in a little article.. that u would just copy over to ur commodore.. and boom.. free game

#

well - the cost of the magazine

queen adder
#

Bro i wouldve nevered guess you have a young personality

gaunt cosmos
#

damn ARE YOU FOR REAL??

summer stump
#

To be fair. I write pseudocode on paper before starting to code usually
As well as graphing the architecture

rocky canyon
queen adder
#

Thats honestly cool af i hope to be coding by that age

rocky canyon
#

but not code

languid spire
#

and guess what, I still spend 18 hours/day 365 datys/year designing and developing systems

gaunt cosmos
rocky canyon
summer stump
gaunt cosmos
languid spire
rocky canyon
#

ya, mad respect for the OGs

gaunt cosmos
queen adder
#

Epi means AI i think

gaunt cosmos
summer stump
queen adder
#

Yeah Epi i love you bro but i dont know what ur saying

rocky canyon
languid spire
#

my brain is convinced that I'm still 24, by body tells it to fuck off and grow up very often (brain tends to ignore body)

candid rune
#

okay yeah nevermind i didnt have to load scenes additively, i literally only had to make my character controller accessible to both scenes and it works just fine. dumbest person alive right here

queen adder
#

Sorry homie lol

rocky canyon
candid rune
# swift crag ah, there you go (:

it was a sensitivity slider so i just had to make my character controller an asset to access the script ig, i make things too hard for myself

gaunt cosmos
rocky canyon
#

next time tho, it'll be more str8 forward

gaunt cosmos
#

@languid spire do you find anything new to learn at this point??

queen adder
#

I think so lol. Comp Sci is such a vast field

rocky canyon
#

its a trade-off.. between the time u spend thinking about how a system is going to work..

#

and just doing it

void thicket
#

Industry has so many new things

queen adder
#

Yeah and theres always new stuff popping up

rocky canyon
#

ya thats what i was thinkn.. its a good field to be in if ur watching for innovation..

gaunt cosmos
queen adder
#

Thats why you gotta respect the OGs

languid spire
gaunt cosmos
gaunt cosmos
#

seems like this is how its ALWAYS been

rocky canyon
#

and always will be

void thicket
#

Now with AI ™️

queen adder
#

Whats everyones current project that there working on? Im trying make a Immersive Sim rn

languid spire
#

yep, before it was MS it was IBM, but the same applies

gaunt cosmos
queen adder
#

Makeover?

rocky canyon
gaunt cosmos
rocky canyon
#

everything except grids

queen adder
#

Let me know how that goes

rocky canyon
#

i hate working with grids lol

queen adder
gaunt cosmos
queen adder
#

Gotta start somewhere

void thicket
#

In production means it's close to launch

stuck palm
#

am i using movetowards wrong?

if (Mathf.Abs(currentVelocity.x) > maxAirSpeed && !launched)
        {
            currentVelocity.x = Mathf.MoveTowards(currentVelocity.x, Mathf.Sign(currentVelocity.x) * maxAirSpeed, maxAirSpeed * dampSpeed * Time.deltaTime);
            print("Damping to " + Mathf.Sign(currentVelocity.x) * maxAirSpeed);
        }
gaunt cosmos
#

it is on playstore

#

have 100k plus downloads as well

queen adder
stuck palm
#

it doesnt seem to be actually moving towards

queen adder
queen adder
rocky canyon
#

ur print doesn't log what u expect?

gaunt cosmos
#

its shit bro

queen adder
#

Still i wanna support you

gaunt cosmos
#

just did it for my employer

stuck palm
gaunt cosmos
queen adder
rocky canyon
#

are u setting ur velocity directly somewhere else in the code?

queen adder
#

There might be other code overriding the velocity / position

gaunt cosmos
#

will pm you link later vee

rocky canyon
queen adder
stuck palm
#

its fine, thank you

queen adder
#

Glad i could be of help lmao

stuck palm
#

made me spot the problem

void thicket
#

Rubber duckie

queen adder
#

Thats good at least. Always glad to help

void thicket
rocky canyon
#

wonder what it was called before 1947 😈

void thicket
#

Steve might know

#

lol

gaunt cosmos
#

nope, i thing it IS steve's

queen adder
#

Leave the OG alone lol

languid spire
gaunt cosmos
#

steve, sir, by any chance you got nickname bob??

languid spire
#

no, I dont do nicknames

rocky canyon
#

i keep my rubber duck w/ me at all times.. even in the project 😄

gaunt cosmos
rocky canyon
#

ya, hes mischevious for sure

trail gull
#

cheers to those who helped me earlier, got my code fixed

glossy turtle
summer grail
#

how do I set the individual x and y of a vector 2 while using the visual scripting system

summer stump
summer stump
#

But I dunno. I recommend just moving to real code

void thicket
summer grail
#

yea this is making me question if I actually know how to code haha

#

thanks tho

glossy turtle
rocky canyon
#

happens alot.. sometimes u can see someone typing.. and typing. and typing.. and then they just stop typing. and u never see 'em send the message

#

rubber duck action.. most likely 😄

glossy turtle
rocky canyon
#

hmm, when other humans are involved its called confessional programming... interesting

languid spire
#

I just talk to myself, all day, every day. Most people would call that insanity

rocky canyon
#

nah, ive heard as long as u dont answer urself ur okay 👍

swift crag
#

i often point my arms around when figuring out anything involving vectors

rocky canyon
languid spire
glossy turtle
rocky canyon
#

been lots of teetering offtopic today.. i guess no ones coding today 😦

#

imma get to it i guess lol ... Editor scripts calling my name (possibly UIToolkit)

languid spire
rocky canyon
#

good luck 👍

#

ohh snap! tomorrows Payday! that'll give me some motivation

glossy turtle
rocky canyon
#

like a scene selection screen/menu

summer stump
glossy turtle
#

No like a teleportation portal.

rocky canyon
#

ohh.. ya those can be tricky at times.. esp if u have first person controller / mouse controls

#

sometimes u gotta cache or offset ur mouse position.. so ur not looking in some odd direction

#

esp if u do any rotations

#

i imagine ur doing additive scene loading?

#

thats the way i'd do it..

#

just load in ur new scene, and unload the old.. keep ur player around

glossy turtle
#

Yes storing the velocity is working but for few it's like you see scene 2 from scene 1 and you can jump into scene 2 and making damages to scene 2 objects you see from scene 1 but I have decided to make probably upload a video after finish.

hollow zenith
#

How can I return a number that is within a range based on another range?
I think that I might need to normalize it first, but I dont know:
Example => I have power of 1 to 10(float) and I want to return a value between 5 and 50.(Power 1 = 5, Power 10 = 50)
How would I do that?
This has to allow numbers above/below those i.e. power -10 would just return 5(lowest value)

hollow zenith
#

Thanks, I just found it too 😄

#

I guess that I just need to clamp the result?

wintry quarry
#

Some of these solutions already clamp it

#

some don't

hollow zenith
#

oh this one looks nice too!

summer grail
#

I think I finally understand the feeling of not realising how stupid an idea is until you're too far in to quit

slender nymph
#

sunk cost fallacy. you can give up on a bad idea at any time

summer grail
#

Visual scripting is harder than actual code

hollow zenith
#

I wonder who uses visual scripting(like in real world in real projects)
Does it even make sense? I know there are blueprints in UE5 and I've seen people do well with those(similar to Unity shaders?)

summer grail
#

If anyone does I pray for their soul

hollow zenith
#

Its interesting, cuz gms2 used(or still does) market itself as being easy to access with visual scripting, but I wonder how many people actually use it.

eternal needle
summer grail
#

to be fair it isn't too difficult to do better. like 2 lines of code absolutely should not need more than 5 nodes#

hollow zenith
#

Can you create custom "functions" using nodes?
This way you can have 1 node that has multiple nodes inside?

summer grail
#

I dont think so

hollow zenith
#

I only saw something in Unity shaders, but I'd guess it would be logical to group nodes together into a "function" so you can reuse it.

summer grail
#

that would be so nice if it was a thing

#

theres like a whole tab dedicated to one very specific node though

#

just incase you find that useful

hollow zenith
#

I didnt play with that yet so idk 😄

summer grail
#

ill leave the fun to you

young lava
#

So I was messing around with abilities/relics for my 2D top down game. The problem I am running into has a very easy solution, but I'm just confused on something. So pretty much the problem is that FindGameObjectWithTag can't be called in a constructor, which is fine, but the confusing part is that I actually already did this for another script a while back, which did not generate any error. I'm just going to move the code to Awake rather than a constructor, but I was just curious as to why one constructor generates this error, while the other does not.

Error Code:

public Stoneskin() : base("Stoneskin", "Increases armor for a short duration.", "Basic", 125, 10f)
    {
        playerObject = GameObject.FindGameObjectWithTag("Player");

        armorIncrease = 5;
        abilityDuration = 3f;
        isActive = false;
    }

No Error Code:

public PreservedLifebloom() : base("Perserved Lifebloom", "Increases max health.", 15, RelicCategoryType.StatIncrease, RelicEffectTriggerType.Passive)
    {
        GameObject playerObject = GameObject.FindGameObjectWithTag("Player");
        if (playerObject != null)
        {
            characterStats = playerObject.GetComponent<CharacterStats>();
        }

        maxHealthIncrease = 50;
    }
void thicket
#

It's fine for regular classes (non-MB)

wintry quarry
stuck palm
#

is there a library i can download to draw graphs?

swift crag
#

A constructor may execute at unusual times

young lava
wintry quarry
swift crag
#

I know that constructors can get called as part of serialization

wintry quarry
#

For example you have like public PreservedLifeBloom bloom = new(); in a MonoBehaviour

young lava
#

ohhh ya i do

wintry quarry
#

In which case you need to move that constructor invocation to Awake

surreal basin
#

QUESTION!! I have a 2D object at the top of my project's screen, and I want it to be frozen in place on the Y axis (while able to move on the X axis with player input, this I've already figured out) until the player hits a button the keyboard (space bar or e or something), which then allows gravity to effect it and let the object fall. I've been googling like crazy and going over the Unity Documentation, but I haven't been able to find anything to help me accomplish this.

TLDR: how to script to get a 2D Object to stay in place on the Y axis at start (not be effect by down or up gravity) BUT when the player hits an assigned key, the gravity effect resumes and the object is able to move on the Y axis (falls)?

young lava
#

public Ability testAbility = new Stoneskin();

This is in my abilityManager code xD this would be the issue right?

slender nymph
wintry quarry
young lava
#

tyty!

surreal basin
surreal basin
slender nymph
rich adder
eternal falconBOT
#

:teacher: Unity Learn ↗

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

surreal basin
#

I've done the Unity Essentials Pathway in Unity Learn, but I definitely still have more to learn! Was just trying to see if I could figure out this idea, but I'll try to dive deeper into the stuff available on Learn.

#

Thank you for your help!

rich adder
surreal basin
#

will do! Thank you :)

rich adder
#

goodluck!

surreal basin
slender nymph
#

then 100% start with some beginner c# courses

surreal basin
#

makes sense to me, thank you guys again!

queen adder
#

!learn

eternal falconBOT
#

:teacher: Unity Learn ↗

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

weak grove
#

just started a c# course on udemy, how do you guys rate it as a learning platform for learning c# and unity ?

languid spire
weak grove
#

why is it a waste ?

languid spire
#

MS and Unity offer better tutorials and learning for free

weak grove
#

for some reason i couldnt get the unity learn site to load on my pc so i gave up and went for a udemy course for c# and unity

languid spire
#

did you try the MS site to learn c# ?

weak grove
#

no

#

this ?

languid spire
#

yes

weak grove
#

ty for bringing this to my attention

#

🙂

languid spire
weak grove
#

ty

#

how long have you "been in the game" ?

languid spire
#

me? 50 years

weak grove
#

nice

#

i have previous coding experience but in game dev im a 3 day old noob lol

languid spire
#

then you definitely need to try to get !learn

eternal falconBOT
#

:teacher: Unity Learn ↗

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

eternal needle
fickle plume
weak grove
#

yeah i have had some slow loading times that have made me give up with it

#

probably on my end

queen adder
#

!code

eternal falconBOT
queen adder
#
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.Assertions.Must;

public class Grab : MonoBehaviour
{
    public Transform heldObject;

    public Transform mainCam;

    public bool holding;

    // drag system goal when holding click the item is where the mouse is + get it to build momentum


    private void Update()
    {

        Vector3 mousePos;
        mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
        mousePos.z = 0;


        RaycastHit2D rayhit = Physics2D.Raycast(mousePos, mousePos);

        if (rayhit.collider != null && Input.GetMouseButton(0))
        {
            holding = true;
            heldObject = rayhit.transform;

        }
        else
        {
            holding = false;
        }




        if (holding && Input.GetMouseButton(0))
        {


            Rigidbody2D rb2d = heldObject.transform.GetComponent<Rigidbody2D>();



            if (rb2d != null) heldObject.transform.position = mousePos;
            if (rb2d != null) rb2d.AddForce((mousePos - heldObject.position) * 6f);
            if (rb2d != null) rb2d.velocity = ((mousePos - heldObject.position) * rb2d.mass);




        }

    }

}
queen adder
slender nymph
#

you know you can put more than one statement inside an if statement, right? you don't need to check the same condition three times in a row

queen adder
#

im pretty sure i heard the same thing yesterday ill quickly do that

#

probably from u

slender nymph
#

you would be correct considering i just copy/pasted the exact message

rich adder
#

I also even showed you the TryGetComponent way

queen adder
#

i can only presume what it does at the moment

languid spire
queen adder
#

steve how should i post it?

languid spire
#

'large code blocks'

queen adder
#

so i just paste it an send a link?

rich adder
merry spade
#

My Player should stick to the "train" when getting on it but its just standing still, I made the player a child of the train as soon as he gets into the hitbox and that works fine its just doesnt stick to it heres a video: (in the video the playerobject dissappears because it gets the cild of the train)

polar acorn
queen adder
rich adder
queen adder
#

link?

slender nymph
#

wdym where? there are three consecutive lines where you use an if statement that checks the same condition

queen adder
#

oh yeah thanks

merry spade
queen adder
#

ty

#

so does anyone have any actual ideas

deft grail
queen adder
#

not an issue

#

i just want it so

#

the object im dragging

#

can build momentum and when released it gets flung

merry spade
#

And my problem is that my player doesnt adjust its position although its a child object

merry spade
#

so that its sticking to a moving platform

#

but its not moving

deft grail
merry spade
#

yep

deft grail
merry spade
#

yes

deft grail
#

then you need to update the position on that i think?

merry spade
#

and character controller

deft grail
#

and on that also then...

merry spade
#

but a child object should copy the movement from its parent automatically shouldnt it?

deft grail
merry spade
#

ok yeah but how do i find out how to do it because i have no idea either thats why iam here 🙂

deft grail
#

i think same with CC but maybe not

merry spade
#

yeah but which value?

deft grail
#

the value you need to set it to?

#

i guess just transform.position

merry spade
#

but thats not moving thats the problem or do you mean the transform.position from the moving platform?

deft grail
#

oh right, try doing it the same as the platform? the X is all you need to change right? so that should be pretty simple

merry spade
#

but sounds good

#

haha

deft grail
#

perhaps just not make it a child and move it manually, im not sure exactly how moving platforms are supposed to be made

#

you could watch a video on it if you havent yet

merry spade
#

oh yeah i found one

#

very nice advice thanks(not ironic)

#

Ok the solution was: The moving platform has to move in the "FixedUpdate()" Method and not in the "Update()" Method it probably has to do with the charactercontroller updating as you correctly said

spiral narwhal
#

I just realised if an object falls with enough speed, it ignores colliders? Not sure if that's intended by Unity or not?

deft grail
tender breach
spiral narwhal
deft grail
spiral narwhal
#

Make what better

deft grail
#

like changing the collision mode on the Rigidbody

spiral narwhal
#

Basically I increase the gravity scale

#

So at some point of falling it's too much to register collisions

deft grail
polar acorn
tender breach
#

It does in another script

deft grail
#

how can we fix a problem where we cant see the problem

deft grail
#

oh right it was a crosspost i forgot

rich adder
#

though these scripts are beyond saving or refactor. It should be redone as suggested

tender breach
polar acorn
tender breach
#

What's exterminatus?

rich adder
#

warhammer

polar acorn
swift crag
#

you do it when you think one person on the planet might have said something chaotic

#

planet explode

summer stump
#

A completely reasonable reaction to heresy

amber veldt
#

Any Tilemap enjoyers that could help for a quick question?

#

Documentation is so scarce geez

acoustic arch
#

tips for having prefabs reference objects in scene?

#

i hear using Find is less than ideal usually

viral shadow
#

hey guys, how do I get more fonts for text mesh pro? I'm tired of the default one

frosty hound
viral shadow
#

where do I get the font from

#

wait can I just use any font family file??

frosty hound
#

Yes, you would use a normal font file

viral shadow
#

I see

#

is 512x512 enough?

frosty hound
#

You can generally just leave everything default

viral shadow
#

i see

acoustic arch
viral shadow
#

now what?

#

where do I save this atlas?

acoustic arch
#

when i did mine i never had to make an atlas it let me use it as is

#

are you able to drag the font into your TextMeshPro?

#

or select

viral shadow
#

ah nvm I figured it out

viral shadow
#

thanks for the help

timber tide
#

What's usually the fix to prevent vibrating against walls by walking into them with rigidbodies using MovePosition

amber spruce
#

what is the 2d equivilant to Physics.OverlapSphere

#

would it just be Physics2D.overlapcircle?

amber spruce
#

thankls

lavish magnet
#

How would i access this material on my zombie and change the alpha all the way down?

shy ruin
#

My rigidbody's do not stutter if V-Sync isn't on. I don't get it, it seems that Time.deltaTime is very unstable and jumps to extreme values with V-Sync on. My character stutters when turning even with interpolation on, AND using CineMachine.

void thicket
timber tide
void thicket
shy ruin
#

Yes this is a huge problem tons of people have and I can't seem to fix it

#

This is the code for my player controller, I've had numerous conversations with people and we still haven't figured it out.

timber tide
#

first line of code you're using forces in update

queen adder
#

what unity class is this?

shy ruin
#

No I am not?

lavish magnet
#

I want to change the alpha down

north kiln
lavish magnet
#

To simulate it fading out

summer stump
lavish magnet
#

Not sure how to access that if i have multiple zombies tho, nmor why its bvlurred out

shy ruin
#

There aren't any other ones.

#

Oh

#

That one isn't even used as I never jump in the game.

#

Also it's adding force downwards.

summer stump
queen adder
shy ruin
#

Fine, let me try it.

#

Stilll have the problem.

timber tide
#

Can also try tossing the camera into other update methods besides late

#

cinemachine has its own toggles for that too

queen adder
#

dont have that class ig

summer stump
#

Camera could go in lateupdate

#

Instead of update

shy ruin
#

I did

lavish magnet
shy ruin
#

This is a video with camera updates in late update and no forces in update.

timber tide
#

seems like a typical rigidbody/camera desync problem + interpolation

shy ruin
#

How do I fix it then?

timber tide
#

idk those I just mess round with the camera update methods

queen adder
shy ruin
#

I've had this problem numerous times.

shy ruin
north kiln
lavish magnet
#

if you just do public Gradient gradient and save it, does it error in unity?

queen adder
#

yea, seems like i just dont have it

north kiln
#

That's unlikely to be the case.

queen adder
#

hmm, then why i cant even new it 🥺

north kiln
#

Presumably because you're doing it wrong