#💻┃code-beginner

1 messages · Page 224 of 1

arctic ibex
#

Okay, so, I'm trying to make a game based around lasso movement, and I made this animation at the start. I was wondering if anyone had any suggestions on what I could do to animate the lasso throw so it looks natural and aims straight to where you need it to go. I feel like I need to use linerenderer somehow, but I'm not sure how to make the throw look natural. any suggestions?

arctic ibex
#

Good point, what kind of a question is it? Where would I ask?

languid spire
vernal plume
#

what'd i do wrong

#

cuz he didnt get that error

languid spire
#

2 points
What error?
Where is the declaration of loadout?

vernal plume
vernal plume
languid spire
#

so you are using () instead of []

vernal plume
#

thanks

quick pollen
#

for some reason this is still null.....

#

I don't get why afterImageObjects[i] is null

#

I set a reference to it before it

#

and it just gets ignored

languid spire
#

you initialize the arrays but you do not actually put anything into them. The default value for each entry will be null

quick pollen
#

and the best part is

#

objectID for every single array element is 6

#

literally all of them

gaunt ice
#

i think _afterImageCount<afterImageObjects.Length
try to log it

#

afterImageObjects.Length=_afterImageCount * _objectsToBeAfterImaged.Length

quick pollen
gaunt ice
#

so?
it should be still less than the length of array

quick pollen
#

I need 70 copies of 7 objects

#

so I need 70*7 slots

#

and its correct

#

wait

#

I think I know....

#

I think my values are being overwritten here

#

because i gets reset for every element....

gaunt ice
#

yes

quick pollen
#

oh my fucking god

languid spire
#

you are filling the same entries in the array each time, you do not take the value of j into account in your index calculation

quick pollen
#

I just figured that out

#

so I need a separate increment

languid spire
#

no, j * afterImageCount + i

gaunt ice
#

row*whole column length +column

quick pollen
#

it fucking works

#

the character doesnt

quick pollen
#

oh

#

I mean

#

that works too technically

#

but imo its safer using a separate increment

languid spire
#

could also do

for(int j = 0, int k=0; j < _objectsToBeAfterImaged.Length; j++) {
            for(int i = 0; i < _afterImageCount; i++, k++)

and use k as the indexer

quick pollen
#

yeah true

#

but idk

#

I just used an int for now

#

another problem arises here

#

it can't find the characters

#

oh wait

#

im stupid

#

i dont set where they should be

#

.-.

#

it works!

#

but I still get these logs

languid spire
#

Also I think you misunderstand the usage of the internal keyword

quick pollen
#

well not file

languid spire
#

no

quick pollen
#

but class

#

it can be accessed within derived

#

non derived and within the class

#

but it can't be accessed within a derived with a different assembly

languid spire
#

no, internal means it can only be acessed within the compiled assembly

quick pollen
#

is it not ok the way I use it?

languid spire
#

the way you use it will have no effect as everything is compiled into the same assembly

quick pollen
#

so its the bare minimum

gaunt ice
#

no such access modifier (only allow anything in same file access it) in c#

languid spire
quick pollen
#

alright, I was just told that you should use public as rarely as possible

languid spire
#

of course, but in this case public is necessary

quick pollen
languid spire
#

as you have coded it internal and public do the same thing. It's just that internal makes no sense

quick pollen
#

also wtf?

#

the property is literally there

languid spire
#

Different Shader, read the error message

quick pollen
#

like it works

quick pollen
languid spire
#

the errors would disagree with you

quick pollen
#
public class FadeAway : MonoBehaviour
{
    MeshRenderer _meshRenderer;
    private float transparency;
    // Start is called before the first frame update
    void Awake()
    {
        _meshRenderer = GetComponent<MeshRenderer>();
    }
    private void OnEnable()
    {
        transparency = _meshRenderer.material.GetFloat("_Transparency");
    }

    // Update is called once per frame
    void Update()
    {
        Material[] materialToFade = _meshRenderer.materials;
        if (transparency > 0f)
        {
            foreach (Material mat in materialToFade)
            {
                mat.SetFloat("_Transparency", transparency);
            }
            transparency -= Time.deltaTime;
        }
        else
        {
            gameObject.SetActive(false);
            foreach (Material mat in materialToFade)
            {
                mat.SetFloat("_Transparency", 0.5f);
            }
        }
       
    }
}
#

this is what I have

languid spire
#

did you clik on the error to see which object it is complaining about

quick pollen
#

both

#

its complaining about a line which only has GameObject afterImageSMObject = Instantiate(afterImageGhost);

languid spire
#

The actual Material asset

quick pollen
#

its here

#

and it has a transparency field

languid spire
#

you are making assumptions
wrap your code in a try {} catch {} and output the material which is causing the error

quick pollen
#

ive never used that holdon

#

what do I catch

#

just debug log the material?

languid spire
#
try {
mat.SetFloat("_Transparency", transparency);
} catch() {
Debug.log(mat.name,mat);
}
pallid nymph
#

Isn't the problem the GetFloat in OnEnable?

languid spire
#

could be any of them, debugging them is the same

quick pollen
#

just errors

#
        Material[] materialToFade = _meshRenderer.materials;
        if (transparency > 0f)
        {
            foreach (Material mat in materialToFade)
            {
                try
                {
                    mat.SetFloat("_Transparency", transparency);
                } catch
                {
                    Debug.Log(mat.name, mat);
                }
            }
            transparency -= Time.deltaTime;
        }```
pallid nymph
#

What's the error again?

languid spire
#

you need to apply this in the place the error occurs

pallid nymph
#

This has no error message

quick pollen
quick pollen
pallid nymph
#

Right... so that's pretty descriptive, no?

quick pollen
languid spire
quick pollen
#

I literally never used try catch before

languid spire
#
private void OnEnable()
    {
try
                {
        transparency = _meshRenderer.material.GetFloat("_Transparency");
} catch ()
                {
                    Debug.Log(_meshRenderer.material.name, _meshRenderer.material);
                }
    }
pallid nymph
#

Where are you setting the material? And what's the material?

quick pollen
#

right

#

sorry

#

I didnt do it in enable

quick pollen
#

well not the material

pallid nymph
#

Not in the code you shared

quick pollen
#

but thats where I get the reference to it

#

then I do Material[] materialToFade = _meshRenderer.materials;

pallid nymph
#

So it's set in the inspector?

quick pollen
pallid nymph
#

So where is it set?

quick pollen
#

the materials?

#

for the object?

#

in a different script

#

and the best part is

#

the shader is unlit

#

but the console is complaining about a lit shader

fickle plume
#

@quick pollen Use full sentences, please, don't spam the channel.

quick pollen
#

sorry

#

its just the way I text

pallid nymph
#

yes, because you haven't set the material yet!

#

that other code that sets it - it's probably called later

quick pollen
#

the code that sets it does it in Start()

#

I ask for it inside of OnEnable()

pallid nymph
#

yeah, so OnEnable is first

quick pollen
pallid nymph
#

Awake and OnEnabled are called immediately as you Instantiate

#

Start is called later

pallid nymph
quick pollen
quick pollen
pallid nymph
quick pollen
#

yes

pallid nymph
#

why is it disabled by default?

#

Okay...

#

look

#

your image is super clear about it

quick pollen
#

here comes this again

pallid nymph
#

you get the problem in OnEnable, which was called from Instantiate

languid spire
quick pollen
pallid nymph
#

that's fair, but it's not what the error says

quick pollen
#

how does Instantiate call OnEnable

#

is there way to make it not do that

pallid nymph
#

it does, for objects that are enabled

#

yes, make the object disabled 😄

#

like SetActve(false)

#

the prefab

quick pollen
#

fuuuuck

#

the ghost prefab was activated by default

#

and it was set to be deactivated later

#

im so stupid

pallid nymph
#

but also, start trusting the error messages man

#

these are like super descriptive and tell you exactly where and what is frogged up

quick pollen
#

when I only had an unlit shader

fickle plume
pallid nymph
#

so, apparently you don't only have an unlit shader

languid spire
#

stop making assumptions. The error messages are always right

quick pollen
#

and that it means that something got seriously fucked up

#

the hotcontrol one yes

pallid nymph
#

just don't touch it - it's hot 😛

quick pollen
#

because now Fogsight tells me that its irrelevant and SteveSmith told me it is

#

and that I should figure out what's causing it

quick pollen
pallid nymph
#

okay... you can check the warning, see what the stack trace is, see that it's only Unity and not you, and ignore it politely

languid spire
#

I told you, it is caused by an Inspector or Editor error, something going wrong there

pallid nymph
#

if it is caused by your code, then you should fix it, but it's probably not relevant to the error, because it's GUI stuff

quick pollen
#

also appareantly this doesn't deactivate it in time

quick pollen
languid spire
quick pollen
#

because it can mess up some static values

pallid nymph
quick pollen
quick pollen
#

its like painting a wall blue before you build it

pallid nymph
#

the prefab needs to be deactivated, if you don't want Awake and OnEnable to be called inside

quick pollen
#

but yeah deactivating the prefab worked ofc

#

I just thought of something like this possibly messing things up so I had that SetActive(false)

#

but it didnt really help

#

thank you all for the help!

#

I spent like 4 hours on this last night

rich egret
#

Someone know where can i to put JSON file?

pallid nymph
# quick pollen I spent like 4 hours on this last night

you need to learn more about debugging... logging every thing that is suspicious to you, or attaching the debugger and going line by line until you see the issue, etc.
AND trust the errors - they tend to tell you exactly what and where the problem is... from there it's your job to understand why is it like that, which isn't always easy, but hence the debugging skills being crucial

quick pollen
#

its not like i dont trust the errors

#

I just found it strange that it didnt have any noticable effects

#

and at first sight I thought it was on a completely different shader

quick pollen
#

omg

#

this works so well

#

it basically used to look like this back then

#

i think the fact that I instantiated them all the time was really slowing it down

rich egret
#

Hi good morning
When I opened the code there was an error, why is this happening?

gaunt ice
#

wrong server?

languid spire
vernal plume
#

for some reason, whenever i change walls to the whatIsWall layer, wallrunning doesnt seem to properly work even though the checkforwall looks for that layer

#

and these are the only lines that use whatIsGround And WhatIsWall

rich egret
#

But... for some reason JSON doesn't work

vernal plume
#

wilhelm typing a whole book lawd

languid spire
languid spire
queen adder
#

I have an enum and a struct like this:

public enum DamageType
{
  Circular,
  Box
}

[System.Serializable]
public struct Damage
{
  DamageType damageType;
  
  public Damage(DamageType damageType)
  {
     this.damageType = damageType;
  }
}```
and i wan't to **serialize **this struct with custom constructor in a class.
```cs
public class Damager : MonoBehaviour
{
  [SerializeField] private Damage damage = new (DamageType.Box);
}

But it won't serialize as DamageType.Box. Instead, it will serialize damage.damageType as DamageType.Circular.
This thing only works if this is a class.
How can i achieve that for structs?

vernal plume
languid spire
vernal plume
#

OH

#

i must have misclicked when assigning that

#

and clicked whatIsGround instead of whatIsWall on the dropdown

languid spire
queen adder
languid spire
#
public class Damager : MonoBehaviour
{
    public Damage damage = new Damage(DamageType.Box);

    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
[System.Serializable]
public enum DamageType
{
    Circular,
    Box
}

[System.Serializable]
public struct Damage
{
    public DamageType damageType;

    public Damage(DamageType damageType)
    {
        this.damageType = damageType;
    }
}
queen adder
languid spire
#

nope, the rules are the same

placid viper
#

public class PlayerMovement : MonoBehaviour
{
    public Rigidbody rb;

    public float ForwardForce = 2000f;
    public float SideWaysForce = 500f;
    public float fixedDeltaTime;

    void Start()
    {
        rb.useGravity = true;
        fixedDeltaTime = Time.fixedDeltaTime;
        Application.targetFrameRate = 60;
    }

    void FixedUpdate()
    {
        rb.AddForce(0, 0, ForwardForce * Time.fixedDeltaTime);

        if (Input.GetKey("d"))
        {
            rb.AddForce(SideWaysForce * fixedDeltaTime, 0, 0, ForceMode.VelocityChange);
        }
        if (Input.GetKey("a"))
        {
            rb.AddForce(-SideWaysForce * fixedDeltaTime, 0, 0, ForceMode.VelocityChange);
        }

        if (rb.position.y < -1f)
        {
            FindObjectOfType<GameManager>().EndGame();
        }
    }
}

hello, can someone help me please figure out why the player movement speed is always faster when the game is tested in different machines ?

#

i've tried everything i know, but whenever one of my friends test the game, the sideways speed is either way too slow or way too fast

languid spire
placid viper
#

i tried locking the frame rate hoping it would solve it but it didn't

languid spire
#

you do know what GetKey does I presume

placid viper
languid spire
#

pressed and held, which will be hardware and OS dependant

#

If you only want force to be added once use GetKeyDown or Up

placid viper
placid viper
languid spire
#

not just the machines but also the person operating them

night mural
#

only moving the player on keydown or up doesn't sound like a reasonable solution for player movement

languid spire
#

but he is adding force, not moving

night mural
#

ok but it's a player movement controller...you're telling me if i am trying to move a character in a realtime game and i press 'left' and hold it down, the character should get pushed left slightly then sit there? nah

languid spire
#

no, that is not what I said

night mural
#

that's what would happen if you only apply force on down or up, no?

languid spire
#

no

night mural
#

i guess i must be missing something then

vast vessel
#

is there a way to force your game to go into "x is not responding" mode in windows??
like i dont want my game to crash, i want it to become non responsive with the actual popups and evreything... is there a way to do that?
(dont ask why)

languid spire
#

does a ball stop rolling when you let it go? does it fall to the ground the instance it leaves your hand?

night mural
#

is...this character a rolling ball? physically accurate objects do eventually come to rest, yes

low path
night mural
#

regardless that would still be an absurd way to try to control a character

languid spire
vast vessel
placid viper
low path
#

Do nothing

night mural
vast vessel
#

like, obliterate it?

#

no exceptions?

languid spire
#

basically an infinite loop of doing nothing

low path
#

I’m not sure what your requirements are. I believe that if you have an infinite loop that doesn’t handle incoming windows events or something, windows will think it’s not responding. If you have a really long not exactly infinite loop, you’ll at least do that for a finite amount of time.

placid viper
night mural
low path
#

Adding force while holding down a button is a common way to control a character

night mural
# placid viper okie

oh VelocityChange isn't actually setting the velocity, my bad. but generally if you're dealing with 'forces' you don't need to do anything with deltaTime since the sim handles that and you're an abstraction away

low path
#

It applies acceleration that works with unity’s mass and friction values

night mural
languid spire
night mural
#

would you controll the pinball directly with input in a pinball game?

low path
#

I think he means the flipper

night mural
#

like a character?

#

is the flipper a character?

#

and you'd call your flipper mover "PlayerMovement"?

#

like i'm not sure what you guys are even arguing at this point but it seems very silly

pallid nymph
#

what's the drama now? 🙂 my flipper is a total player 😏

#

wait, that's not how I imagined this would sound, sorry 😅

night mural
#

just people giving poorly thought out advice and then setting up unlikely scenarios to try to argue it's useful for some reason

low path
#

Well for one you are saying controlling a character using an on-down impulse force is “absurd” but there are use cases for that kind of control.

night mural
#

no i am notttt

low path
#

Isn’t that what you said above?

night mural
#

i am saying steve's specific suggestion that that character controller should only apply forces on keydown or keyup was not useful

#

for what this person is obviously trying to do

low path
#

Ok fair

languid spire
#

my advice was based on what he specifically said he is trying to avoid, not on what he is trying to do as he has not specified that as yet because no one has asked him

vast vessel
low path
#

Try it I guess

vast vessel
#

good point

pallid nymph
#

I'd start with a lower number and increase until a number I like for my testing purposes, but sure 😛

#

(this might be a bit too long and practically end in you having to kill the app)

low path
#

True

vast vessel
#

im trna add like an ARG thing

pallid nymph
#

ah, okay 👍

hazy crypt
#

hello all, im getting an error about not referencing an object in my script

#

heres the code

#
foreach (ContactPoint contact in playerCollision.contacts)
        {
           Debug.DrawRay(contact.point, contact.normal * 10, Color.white);
        }
rigid valve
#

all debug statements are getting printed but chartcter is not moving

hazy crypt
#

im assigning the playerCollision on another object in game and then reading the collision info from a global variable

rigid valve
#

😭

scarlet skiff
#

what does the get set do exactly? i still dont really get it

cobalt wing
hazy crypt
#

not sure then

cobalt wing
#

maybe try using .GetAxis("Horizontal");

#

to get input

#

store it in an integer var

#

then multiply it with speed

low path
queen adder
#

🙂

cobalt wing
#


void move_player()
 {
     move = Input.GetAxis("Horizontal");

     rb.velocity = new Vector2(move * speed, rb.velocity.y);

     if(move < 0  )
     {

         gameObject.transform.rotation = Quaternion.Euler(0, 180, 0);
     }
     else if(move > 0 ) 
     {
         gameObject.transform.rotation = Quaternion.Euler(0, 0, 0);
     }
 }```
#

this works for me

#

@rigid valve

rigid valve
cobalt wing
rigid valve
#

is that yuta lol

cobalt wing
#

yes lol

rigid valve
#

but whats incorrect in my code

#

😭

cobalt wing
#

well

#

you didnt save it

#

the speed variable

#

you didnt press ctrl +s

#

try that maybe

rigid valve
#

yeah it was 34 earlier

queen adder
#

can I tell you something?

rigid valve
#

yes sure?

queen adder
#

you don't have to write private RigidBody if you don't write private its private by default

cobalt wing
#

see if that works

rigid valve
#

move is?

pallid nymph
cobalt wing
#

the move variable?

rigid valve
#

is that a vector?

cobalt wing
#

no

queen adder
cobalt wing
#

its an int

#

or float

#

you can use any

#

what it does is it take 1 or -1 from your input aka a or d so if you press a it sets the value to -1 which is multiplied with speed then moves the player to left

#

its automated left right movement

eternal falconBOT
rigid valve
#

still not wokring

cobalt wing
#

thats cause

#

remove the stuff in your update function

#

then call the function move_player();

#

in update

rigid valve
#

still nothing

#

just the sprite is doing a kind of flip when pressed a amd d

#

but not moving

cobalt wing
#

remove the if statement in update

marble wigeon
cobalt wing
#

bro how

#

it works fine for me

rigid valve
#

😭

languid spire
# rigid valve

to start with you should not be mixing rigidbody and transform manipulation

rigid valve
cobalt wing
queen adder
#

targetRigidBody.AddTorque(Random.Range(-torque, torque), Random.Range(-torque, torque), Random.Range(-torque, torque), ForceMode.Impulse);
targetRigidBody.AddTorque(Random.insideUnitSphere * 2f, ForceMode.Impulse);

I wanna ask a question. Which one is better? (torque=2f)

#

Removed torque variable and directly put 2f there

#

and 3 random ranges to random insideunitsphere

#

the other script

rigid valve
#

this means?

night mural
# rigid valve

that happens when you define a script, attach it to something, then delete that script

rigid valve
#

eh? but I have only 1 sript and still still presen tin game

night mural
#

well it could be one of the other issues, check the article

cobalt wing
#

i wonder what went wrong

queen adder
#

can you check my code pls is it good

hearty trout
#

void Couldown(){
if(CurrentCouldown <= WeaponCouldown){
CurrentCouldown - 0.1;
}

#

Current couldown is an int

#

it gets an error message

#

on the CurrentCouldown -0.1; anyone know a fix?

#

idk if I typed it right lol

cosmic dagger
queen adder
gaunt ice
#

!code
- and -= is not the same
also this probably frame rate dependent

eternal falconBOT
cosmic dagger
hearty trout
#

i tried it with both

#

float and it

#

lemme do the er

#

-= thing

#

with a float number

cosmic dagger
#

Well, you're not assigning currentCooldown and you should subtract using deltaTime . . .

hearty trout
#

ok!

brazen canyon
#

Hey guys, I'm trying to make a aim trainer arena, when ever we hit a target, it will be disabled, moved to a new position in the list, and then reanable, but after hitting it once, it did moved to a new position but the same result doesn't happen when I hit it again

hearty trout
#

error CS0266: Cannot implicitly convert type 'double' to 'float'. An explicit conversion exists (are you missing a cast?)

gaunt ice
#

0.1f is short hand for (float)0.1

cosmic dagger
#

And if you need to subtract using a float, the variable should be a float as well . . .

hearty trout
#

OML

#

All i had to do was right 0.1f first instead of -= and - and int and floats and random stuth

#

Thank you guys so much 🙂

queen adder
#

@cosmic dagger

#

this is why I don't use

gaunt ice
#

the compiler will solve the type of var

queen adder
#

so compiler got my back about that you say?

gaunt ice
#
const type meaningful name=value;
#

or static readonly

queen adder
#

yeah

#

I had one const float but removed it

#

was readonly too

rigid valve
vast vessel
#

any idea why my script(UmbrellaMan.cs) cant find the assembly definition of SourceConsole?

some of the scripts im trying to access in UmbrellaMan.cs, are in a folder that is placed with the ASMDEF file SourceConsole, and the definition file for UmbrellaMan.cs is DELTAV. and DELTAV has SourceConsole in its assembly definition refrances. yet im getting an error saying that "The type or namespace name 'ConCommand' could not be found (are you missing a using directive or an assembly reference?)"

cosmic dagger
# queen adder <@134945562473529344>

I said you should always use a variable, like torque, instead of a magic number, like 2. That way, you can use the same variable in other areas of the code, and changing the variable will use the new value throughout your code

You must replace a magic number everywhere it is used . . .

cobalt wing
#

great

#

dont sweat over it

#

happens

cosmic dagger
queen adder
#

I even remove braces from if if theres only one line in between

#

my code was 95 lines brought it down to 44 now

#

I dont think I can make it any shorter

languid spire
queen adder
#

yeah ur kinda right

#

I don't think this is easy to read at all

languid spire
#

that is horrible

hallow iris
queen adder
#

eh but its 28 lines

#

instead of 95

hallow iris
#

Or else it will be hard to understand later

languid spire
#

so what, the compiler does not care how many lines it is

queen adder
#

they are considered blank If I remember right

#

so not compiled

cosmic dagger
languid spire
#

do you really think that the number of lines in your code makes the slightest difference to the compiler?

cosmic dagger
steel smelt
#

Yep, definitely do not need to go and waste your own time commenting stuff that doesn't break POLA if you're working solo

cosmic dagger
queen adder
#

yeaa let me add it again

#

I accidentally used something very expensive when trying to make it more optimized lmao

languid spire
queen adder
#

yeah man your right but you don't know me I am sick

#

will try to break this habit soon

fresh parrot
#

Hello guys, I'm trying to make a proximity spawner and it doesn't seems to work. Now it not spawning enemies, but before it was spawning endlessly or a bunch in a few seconds intervals. I tried many ways and it doesn't work

cosmic dagger
bronze scaffold
#

Hello guys, i have problem with my script, can you help me? I'm writing a script on macbook and my Arrow dosen`t work

Maybe on mac we have other keys?

young warren
cosmic dagger
fresh parrot
cosmic dagger
#

@fresh parrot the coroutine does not run until completion before the following line. Execution starts the coroutine and immediately moves to the following line . . .

bronze scaffold
cosmic dagger
#

Once the wait period is over, spawn an enemy . . .

fresh parrot
#

I already tried that and it spawns endlessly

queen adder
#

hey does anyone know a good youtube tutorial or course or website where i can learn coding languages?

fresh parrot
#

See here, the enemies spawn like 34343 in intervals of a few seconds

burnt vapor
eternal falconBOT
bronze scaffold
#

I mixed up right and left and debug.log helps me notlikethis

burnt vapor
hearty trout
#

!code

eternal falconBOT
burnt vapor
#

An update method will call the coroutine every single frame, and the delay is not changing that

hearty trout
#

how do I use !code

eternal falconBOT
burnt vapor
# fresh parrot Yep

Right, so instead of having an update loop, have a Coroutine that checks distance every frame (you can do yield return null to skip a frame). If the target is met, spawn and then wait 10 seconds. Repeat coroutine

#

You can make the coroutine have a while loop so it repeats

bronze scaffold
hearty trout
#

wat.

#

this says error

#

to do with the game obj

#

error CS1955: Non-invocable member 'GameObject' cannot be used like a method.
Anyone know why? sorry i am real new if its rly simple fix

fresh parrot
#

Inside the spawnradius

bronze scaffold
low path
hearty trout
#

so how do i use it

#

to destroy

#

an object

#

ohh destroy(gameobject)????!

buoyant knot
#

Destroy is a method, yes

low path
#

Please do a c# and/or Unity tutorial as these are basic questions.

hearty trout
#

thanks

#

i just mixed em up..

buoyant knot
#

also please do not crosspost the same question on multiple channels

hearty trout
#

self error nothing to do with overall knowledge my own fault and self error that I should of found myself tbh

swift crag
severe rose
#

hi

bronze scaffold
buoyant knot
#

the compiler figures out wtf it’s doing. it should not impact anything at runtime at all

pallid nymph
#

it will not impact anything at runtime indeed

buoyant knot
#

you should avoid var for style reasons, but that is my hot take, and totally separate from any performance issues (of which there are none)

buoyant knot
#

yeah. I know. var really is that bad, but a lot of people spam it

#

like var x = 5; You’re not even saving on typing characters at that point

frigid sequoia
#

If I want to do weighted pool where there are a bunch of stuff with different chances of appearing, I should be using a Dictionary with the object in question and an int as the chance of that object or...? I don't really know how to handle this to be as modular as possible...

buoyant knot
#

a simple class with a different collection inside

#

Your custom data structure should have the following things:

  1. A field for current total weight. (private setter)
  2. A collection that holds entry and its weight.
  3. Be generic, so the entry you store could be of any specific type
  4. Have a method to perform a random selection.
  5. Methods to add/remove entries with a given weight
  6. methods to read and modify the weight of an existing entry
#

this should be relatively simple. But you should make a custom data structure so you can abstract and do whatever implementation underneath, and/or change it in the future. It also separates the responsibility of managing weights

#

the whole shebang should be fewer than 100 lines of code tbh

#

but you might want to add features later, like implementing IEnumerable<TEntry>

night mural
clear seal
#

Hello :>

buoyant knot
burnt vapor
lethal bolt
#

What does the error mean?

buoyant knot
#

If you keep a dictionary of entries and weight, you have O(1) CRUD time, and O(n) random selection time.

The one prakus linked has O(n) CRUD, and O(1) random select

frigid sequoia
chrome veldt
#

does this work the way i think it works?

    private void Gravity()
    {
        if (!grounded)
        {
            rb.velocity = new Vector3(rb.velocity.x, -1f, rb.velocity.z);
        }

    }
frigid sequoia
#

Also, the collection, should definetly be a Dictionary right?

chrome veldt
buoyant knot
#

what is the ratio of number of times you modify the weighted list vs number of times you randomly pick from it?

pallid nymph
lethal bolt
buoyant knot
buoyant knot
chrome veldt
#

ok, forget my question earlier, i want to know a thing, how do i stop my player from sticking to the walls while i input the movement to there?
like, i want it to slide down even when inputing to go there

buoyant knot
#

but since the one prakkus linked is already made, I would say that I would expect a ratio of 10:1 modification:pick, before I even consider coding it myself

lethal bolt
buoyant knot
#

@frigid sequoia understand?

buoyant knot
#

if so, set it to continuous

hoary imp
#

hi my visual studio isnt autocmpleting unity code

frigid sequoia
# buoyant knot <@348099179274305536> understand?

Yeah, I would say that one will work fine; I can just create a new instance of it from specific spawners and modify the values manually. And if I want the pick to be more weighted towards rare stuff, I can just... increase the weight of every object by a flat amount, that should make rare stuff significantly more common, without the need of adding a rarity tag or anything like that

buoyant knot
#

you can just use bigger ints

eternal falconBOT
buoyant knot
#

bigger ints = more resolution

#

just start by giving everything the weight you want, but add 2 zeros. Like instead of 1, 2, 5. Make weights 100,200, 500. So you can potentially change your mind and mess with things later

swift crag
#

I wrote a little extenison method for this

#

not a huge fan of that return default at the end

#

Random.Range with floats is inclusive, not exclusive

#

of course, floating-point errors will also probably cause slight errors anyway

#

i should just return the last item in the sequence in that case

buoyant knot
#

this is O(n) draw, so it’s more of a correction method

swift crag
#

oh yeah, this is less efficient than if you have a few rarity buckets

#

in that case you can do the draw in constant time

grand swan
#

hey all. im dealing with a simple calculation problem. I want my sunTimeSec to progress acording to the orbit/position of the sun, but the suns needs to orbit twice to complete a full day, and i want sunTimSec to progress according to that 2 cycle. Its supposed to be updated in method UpdateSunTime() but im not sure how to do it so i have as 'sunTimeSec += Time.deltaTime;'.

https://paste.ofcode.org/d5uAtEJkxDkz5Jkk7eNtZ5

buoyant knot
#

but if you are using a data structure, you should probably have a method in it to use a different weighting function, or to modify all weights in the table with a given re-weighting function

queen adder
#

Why does this code sometimes teleport the player a lot farther away from the respawn?

swift crag
#

RSPN sounds way worse than...respawnPoint

buoyant knot
#

why are you moving your player’s transform when it has a collider, and moving it in a collision callback

#

that is asking for trouble

swift crag
#

If the player has a CharacterController or Rigidbody, then moving the transform directly can break, yes

buoyant knot
#

i’m not saying that is your issue, but it could be a part of your issue

queen adder
#

it has a rigidbody, but not a character controller

buoyant knot
#

at which point you probably want to move the player’s rigidbody.position

swift crag
#

You should reference the player's rigidbody

buoyant knot
#

because that moves the transform and colliders

swift crag
#
[SerializeField] Rigidbody playerRigidbody;
queen adder
#

okay

swift crag
#

If you move the transform, the physics system is "left in the dark"

#

it only learns about the movement later

buoyant knot
#

if you move the transform, the colliders stay where they are

swift crag
#

and if you have Interpolate enabled, the physics system just ignores your new position entirely

queen adder
#

should i make it make the rigidbody kinematic when it teleports?

buoyant knot
#

not really

swift crag
queen adder
#

okay

buoyant knot
#

setting rigidbody.position teleports the object, transform, and all the colliders

#

without respecting physics collisions!

glossy schooner
#

any idea why this is happenning? it is not supposed to go like that. i can post the 2 scripts if needed

buoyant knot
#

you can teleport into a wall

#

and it won’t stop you

swift crag
#

the object moves during the next physics update

#

so everything is consistent

queen adder
#

is it better now?

#

wait

buoyant knot
#

don’t move the transform

queen adder
#

okay

#

i messed smth up

buoyant knot
#

also, you don’t need to reference GP when you have rigidGP

queen adder
#

now it should be correct

#

ok

swift crag
#

"RigidBody" doesn't exist

buoyant knot
#

-.-

swift crag
#

it's Rigidbody

queen adder
#

ohh

swift crag
#

your IDE is clearly not configured. !ide

buoyant knot
#

rigidbody.gameobject directly links you to the gameobject

swift crag
#

i'm not actually sure what you're using here

queen adder
#

okay

eternal falconBOT
queen adder
#

so like "Rigidbody"

buoyant knot
#

you are modifying your code without understanding what is going on. stop it

#

stop and think before you write code

#

right now you have references to rigidbody, and GP, and rigidGP, and rigidGP.RigidBody

queen adder
#

i know im fixing it

swift crag
#

no, you're just making random changes

queen adder
#

i noticed the problem

swift crag
#

slow down (and name your variables more cohrently)

buoyant knot
#

anyway, first order of busjness is to configure ur IDE, otherwise we can’t help you

queen adder
#

!code

buoyant knot
#

that just makes the bot give you links to pastebin services

queen adder
#

oh

buoyant knot
#

you need to follow !ide

eternal falconBOT
queen adder
#

i made the code a little bit more understanding and did the rigidbody teleport

#

like instead of "GP" its "player"

#

and instead of RSPN its "respawnpoint"

buoyant knot
#

does your IDE tell you where your code doesn’t work yet?

queen adder
#

theres no errors

#

im gonna see if it works

buoyant knot
amber nimbus
#

Hello, is there a way to invert transform.LookAt(), right now it looks at the object in the Z axis of the object, try I want it to look at it in the -Z axis

buoyant knot
#

that should be giving you a case of the red squiggles

queen adder
#

its Rigidbody now

#

its not uppercase b

buoyant knot
#

that is not what I asked

#

just send a screenshot of your ide

queen adder
#

im not really good at coding

chrome halo
#

can someone help me with some code? im making a top down game and trying to get the enemy to shoot in the direciton of the player, but the bullets spawn in and they only move on the Z axis so theyre basically stationary

queen adder
#

i dont really know what ide means

buoyant knot
#

your IDE is the software that you use to code

queen adder
#

ohh

buoyant knot
#

still not configured

#

!ide

eternal falconBOT
buoyant knot
#

follow the link for your ide, and then follow the directions. This is the 4th time we ask. you will not receive help here until you do

swift crag
#

it's your integrated development environment

#

the "integrated" part means that you have things like compiler errors built into the editor

#

currently, that is not working

buoyant knot
#

and having it work should be your top priority. not fixing your code

slow thunder
#

i have this unity 2d code that makes a ball bounce perfectly,

    void OnCollisionEnter2D(Collision2D collision)
    {
        float speed = lastVel.magnitude;
        Vector3 direction = Vector3.Reflect(lastVel.normalized, collision.contacts[0].normal);

        rb.velocity = direction * speed;
    }

how do i make it so that the bounce direction is changed within a range?

tidal leaf
#

Hi, so I have a problem with the spawning my menu, I want my menu to spawn at my cameras location plus an offset when I press escape, here is the code:
"escMenu" is my menu, and teh script is part of the main camera. My menu ends up spawning at teh coordinates the prefab is located. Why is this, and how can I change this, thank you for any help in advance!

lusty flax
#

i want to connect these in order to make the air movement play when the character is in the air, but make the slide play when the character is in the air and touching a wall (for wall jump), I've tried several configurations but it hasn't worked. how do i?

queen adder
#

why my timer doesnt update the time

summer stump
queen adder
#

yeaa its in x

#

its not my code so its a bit messy. dont mind it

summer stump
#

This should be a syntax error

private void Update()
    {
        timeLeft -= Time.deltaTime;
        timeLeft = "timer:" - Time.deltaTime;
        
        if (timeLeft <= 0)
          GameOver();

    }
#

You are assigning a string to the float

queen adder
#

yeah its underlined

#

I tried to copy this

swift crag
#

The - operator is not defined for string and float, so you get an error

summer stump
swift crag
#

Right, which would also cause problems if that operator somehow worked

pallid nymph
#

Now, if we were in JS-land... 😂

summer stump
lusty flax
queen adder
#

been researching

#

kinda sucks I have to have 2 different scripts for this

#

Im stuck here

hoary imp
#

i did everything in !ide and my text autocompletion in unity still dosent work

eternal falconBOT
hoary imp
#

for examplei type in Rigid... i expect vs to show autocompletion to RigidBody 2d

#

it dosen work tho

summer stump
# queen adder Im stuck here

You don't need two different scripts, but that IS a good idea to split things up whenever possible.
More scripts doing less is better than less scripts doing a lot

lost anvil
#

Im working on a pickup/drop system for my items and ive been trying to fix this "Object reference not set to an instance of an object" error but to no avail.

code - https://gdl.space/ebejovakex.cs

queen adder
summer stump
#

seconds.ToString()

queen adder
#

IT still wont draw seconds

#

I have timeleft but never used it in method 😕

#

I am following this guy

#

this guy doesnt use it too

hoary imp
summer stump
queen adder
summer stump
queen adder
#

its

summer stump
# queen adder

Ah ok
Can you show it without cropping. I want to see the whole editor

queen adder
#

timer works but time left: is not there

#

its only seconds

summer stump
queen adder
#

I cant send the full thing

#

doesn't fit the screen

summer stump
#

Oh, you assigned the text to the number, it overwrites the entire thing

summer stump
# queen adder I cant send the full thing

I don't care about that
I wanted to see the stuff to the left, not the inspectors. Specifically the hierarchy
But that doesn't matter now. I thought you were saying the text didn't update at ALL. To be clear, the issue is that the words "Time Left" get erased?

#

You have to update the text to EXACTLY what you want it to say:
timer.text = $"Time Left: {seconds}";

#

What you put in the inspector is lost the second you assign to .text in code

queen adder
#

okay very good

#

Come a long way

queen adder
#

it stays there

#

the last thing to fix now

chrome halo
whole idol
#

why is this happening?

summer stump
queen adder
summer stump
#

I assume it only happens once?

queen adder
#

in gamemanager script

#

yea

summer stump
#

No, I meant what method

queen adder
#

it is only called once

summer stump
#

Then updateTimer only runs once 🤷‍♂️

#

I would just make UpdateTimer be Update

#

Update is called once per frame

#

But subtract Time.deltaTime, not 1

ivory bobcat
#

With physics 3d

chrome halo
#

theyre not moving on the x and y axis at all, ill send a video to better explain

ivory bobcat
#

Log the velocity after assigning it.

#

That would verify if they're moving as expected with the code shown.

#

A video of it not doing what you're wanting won't tell me if the code is working or not.

chrome halo
ivory bobcat
#

Also embedded mkv files aren't playable in my discord app

ivory bobcat
#

Print the value

#

You know.. Debug.Log

chrome halo
#

yeah okay thanks

ivory bobcat
#

If the x and y components are not zero then it's working as intended

#

The code shown, that is.

queen adder
#

Is there any built-in enum for deltaTime type? Like this:

public enum FrameType
{
    DeltaTime,
    DeltaTimeUnscaled,
    FixedDeltaTime,
    FixedDeltaTimeUnscaled
}

I searched it but getting different results...

ivory bobcat
queen adder
foggy pine
#

hey, i'm trying to make a spawning code for a player object for multiplayer purposes, but i cant spawn the camera with the prefab (it just doesnt happen idk why) so does anyone have tips?

ivory bobcat
#

Probably not

chrome halo
foggy pine
ivory bobcat
ivory bobcat
chrome halo
#

well i put debug.log(rb.velocity) in it and the only thing in the console was this

ivory bobcat
chrome halo
foggy pine
#

public void OnSpawnAPrefab() { if(random) { float x = -40.0f; float y = 0.0f; Instantiate(prefab, new Vector3(x, y), Quaternion.identity); } else { Instantiate(prefab, spawnPoint, Quaternion.identity); } }

ivory bobcat
ivory bobcat
foggy pine
#

okay

ivory bobcat
# chrome halo

I'm assuming the player was null and that line 15 is referring to usage of the player variable else rb was null

ivory bobcat
#

Where rb was null

#

You need to assign rb something before you can use it

chrome halo
#

fixed it thank you i completely forgot to fuckign assign rb to rigidbody

#

braindead

#

sorry about that

foggy pine
languid spire
foggy pine
#

it spawns with the prefab (or should)

ivory bobcat
#

So does it spawn the camera?

foggy pine
#

the prefab contains a camera and the code spawns the prefab but it says there are no cameras

#

i have a play button in the main menu that changes scene and spawns the prefab

ivory bobcat
#

So, I'm just trying to verify. The camera object spawns in the scene hierarchy?

foggy pine
#

no

ivory bobcat
#

Check the spawned camera in the hierarchy and see if it's correctly configured

ivory bobcat
strong wren
#

Are you perhaps spawning a camera and then loading a scene?

foggy pine
#

it might be that it spawns before the scene changes but thats just a guess and i don't know how to fix it if it is the problem

ivory bobcat
#

Spawn after the new scene is loaded

strong wren
#

Most straightforward way would be to have a script in the scene to spawn the camera

foggy pine
#

how? would i make another spawn script that plays when i load into the 2nd scene?

ivory bobcat
#

Is there a reason why the camera needs to be spawned by code? Why not just have a camera in the next scene?

foggy pine
#

well i'm trying to make a multiplayer arcade tank game and i want the player character to spawn in by code so i can have other players spawn in aswell

ivory bobcat
#

Hmmm, there ought to be one camera only though right?

foggy pine
#

well one camera per player

ivory bobcat
#

Just have the player spawn the camera after they've been spawned

foggy pine
#

wym

ivory bobcat
#

You're going to need to spawn the players in the next scene and every one of them are going to have a camera so just spawn the camera when you spawn the players

foggy pine
#

thats what im trying but i dont know how to detect after the scene changes

ivory bobcat
#

Why would you need to? Just have the code in the next scene that does it

foggy pine
#

no but when does the code run? it would need to call the function?

ivory bobcat
#

It shouldn't be this scene's responsibility for what's in the next scene - unless you absolutely must have to have the next scene configured from this scene.

foggy pine
#

i mean when does the next scene know to call the function

vague dirge
#

Hello, what is the best way to move a RigidBody ? I had a Character Controller, and I was just using .Move(), but I don't find a equivalent for RigidBody. For now, I'm changing directly transform.position (also, Use Gravity is unchecked), but I don't think it's the most efficient method.

ivory bobcat
summer stump
foggy pine
#

so make an empty object that calls the function at the start of the scene, right?

ivory bobcat
#

You'd share data between scenes with a Singleton ddol object or some static manager class

#

Assuming you've got some sort of persistent manager for managing player count etc for your multiplayer game already setup

ivory bobcat
foggy pine
#

well right now its a singleplayer setup with a single map and stuff but im trying to setup prefab spawning so then i can call that when a new person joins the game

#

when i make it multiplayer

summer stump
foggy pine
#

well i haven't started making it multiplayer i am starting with making player spawning a function so when i get to making multiplayer i already have a playerspawn function so when someone new joins they simply call the playerspawn function in the map

summer stump
foggy pine
#

i was thinking of using netcode or something to make it online multiplayer (i just googled how to add multiplayer to unity and that is what everyone said)

rocky canyon
#

make sure not to do too much before getting into the multiplayer aspect.. u might be regretting that u did

foggy pine
#

wym

summer stump
rocky canyon
#

multiplayer features are tightly integrated into core mechanics most time

vague dirge
rocky canyon
#

its good to develop the multiplayer parts alongside everything else

cosmic quail
#

yeah converting a non multiplayer game to multiplayer can be very hard

rocky canyon
#

its not just something u can throw in at the end

summer stump
# foggy pine wym

Build from multiplayer from the ground up, otherwise you're gonna rewrite almost everything

rocky canyon
#

(most times)

summer stump
#

Local multiplayer you can get away with adding on top, a little.
But not networked

Which is one reason I was asking

rocky canyon
#

networked is another type of beast..

#

local multiplayer ur just ususally changing player inputs and thats all

#

network multiplayer basically has to do with everything, movement, spawning, scorekeeping, etc

sharp copper
#

is it good to use serializefield this much?

foggy pine
rocky canyon
#

yea thats good way 👍

#

figure it out asap

rocky canyon
charred spoke
summer stump
sharp copper
foggy pine
charred spoke
#

Why what? You use serialize field when you want a private field to show up in the inspector

summer stump
sharp copper
#

I just don't know if it is correct to use that or is there different way

charred spoke
#

A different way for what? Having things show up in the inspector ?

ivory bobcat
foggy pine
summer stump
rocky canyon
#

ya, multiplayer ur not actually spawning in every player.. each persons game is just spawning in 1 player..

#

or is just there.. like aethensoity mentioned

foggy pine
#

but how does each new client spawn is what im saying... im trying to figure that out

rocky canyon
#

can u share what code u already have?

summer stump
rocky canyon
summer stump
#

Either the player is IN the scene. Or you have a gamemanager in the scene that spawns it itself

foggy pine
rocky canyon
#

GameManager or something would take care of htat. if u want them spawned in at runtime

summer stump
#

And boom, put it in the scene, you're done

rocky canyon
#

^ when the game starts the scripts start method is run..

#

then it spawns the player/camera/ew

foggy pine
#

so i attach it to an empty object then it spawns on scene start?

rich adder
eternal falconBOT
#
Visual Studio Code guide

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

https://on.unity.com/vscode

summer stump
ivory bobcat
rocky canyon
#
public class GameManager : MonoBehaviour
{
    public GameObject playerPrefab;

    void Start()
    {
        SpawnPlayer();
    }

    void SpawnPlayer()
    {
          //do your thing
    }
}```
ivory bobcat
#

Consider just loading the next scene and having something in the next scene spawn the players for the next scene.

#

Where you'd pass persistent data with some manager

foggy pine
#

so far i got this:

rocky canyon
#

Save your scene ASAP

foggy pine
#

hey! it worked!

rocky canyon
#

if ur game crashes ur gonna lose everything

foggy pine
#

its saved

rocky canyon
#

not in this screenshot it wasn't (thats why i mentioned it)

foggy pine
#

as of screenshot not saved

rocky canyon
#

ahh k

foggy pine
#

as of now saved

rocky canyon
#

just lookin out for ya 😄

foggy pine
#

🫡

ivory bobcat
#

The fear would be accidentally placing that code on the player UnityChanDown

rocky canyon
#

bRrrrrrrrrrrrrr

edgy gale
#

does anyone know any 3d game tutorial video ?(send dm)

foggy pine
#

nah i made an empty game object and connected it to that and start of scene stonks

eternal falconBOT
#

:teacher: Unity Learn ↗

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

edgy gale
rocky canyon
#

now what happens in the next scene.. u gonna have the script in there too? so it spawns in the player (again)?

foggy pine
#

no the first scene is the main menu which you press the play button then it switches to the second scene and spawns the player

#

now time to suffer through a youtube tutorial on multiplayer thisisfine

hoary imp
#

im following a tutorial and i get and error "you are trying to save a prefab that contains the script which does not derive from monobehaviour" while everythinh matches !!!! pls help

charred spoke
#

Are you sure everything matches ?

hoary imp
#

script name - PMS class name - PMS

charred spoke
#

Can you show a screenshot of the prefab ?

lethal bolt
#

What does the error mean?

charred spoke
#

Exactly what it says

lethal bolt
#

How to fix

#

I tried an bunch of diffrent things

charred spoke
#

Have you tried reading the do documentation about Rotate ?

charred spoke
ivory bobcat
queen adder
#

can I ask if dots and ecs are easy to use now?

lethal bolt
ivory bobcat
queen adder
#

its exciting af but hard

lethal bolt
#

Why does it not rotate when i press W?

ivory bobcat
lethal bolt
ivory bobcat
#

Or read what you coded

cosmic quail
ivory bobcat
#

Rotate(0,0,0)

cosmic quail
ivory bobcat
#

Probably a new issue

lethal bolt
#

I tried Up when W didn't work

#

ig it didnt update?

cosmic quail
ivory bobcat
charred spoke
#

I suggest you go do some !learn

eternal falconBOT
#

:teacher: Unity Learn ↗

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

languid spire
#

wont make any difference it will always be a 0,0,0 rotate

vague dirge
#

Quick question, how can I apply constant force to a RigidBody ? Like, I have a custom gravity force, and I was using .AddForce, but my object falls and jumps incrediblly slowly. I guess it's because the force it applied each frame, maybe ? Anf thus, how could I fix that ?

pallid nymph
#

add MORE gravity

lethal bolt
#

U can make it FramRate independed

#

Time.deltaTime

pallid nymph
#

You don't need that with AddForce

#

(because AddForce with the proper (and default) params does it internally)

queen adder
#

Yeah you don't use time.deltatime with physics

lethal bolt
#

Oh

cosmic quail
#

and u gotta use FixedUpdate

lethal bolt
#

But How does KeyCode WORK?

summer stump
ivory bobcat
#

Or physics force mode impulse

summer stump
#

It has values

That's about it

cosmic quail
rocky canyon
#

because Keycode. is just using straight up Hardcoded keys

#

when u use "W" thats using the presets in the Input Manager

#

"Horizontal" "Vertical" type stuff

lethal bolt
#

I knew that kind of, but do i need to add an unity engine to use it?

rocky canyon
#

im pretty sure.. yea you need the UnityEngine using statement

cosmic quail
lethal bolt
#

Am i doing it Wrong then?

cosmic quail
#

also it needs to be an if statement

lethal bolt
#

Then i guess i need to make if not?

#

Because now it just spins out of control and does not stop

#

nvm

#

I just had to remove ";"

cosmic quail
#

yeah if-statements dont have a ; after them

lethal bolt
#

But if i can not make it 0.1 how can i make it slower?

fading rapids
#

why is the UI in the top right going behind the object

cosmic quail
fading rapids
cosmic quail
lethal bolt
rocky canyon
#

and also get rid of one of ur event system components

#

u only need 1

lethal bolt
#

Why does an ball clipp thru the floor when i Rotate it on the Z axis Fourth an back

#

I have rigid body on both

#

Physics matireal?

icy sluice
#

how do i rotate unparented object like its parented?

rocky canyon
#

yup, ur teleporting it

#

u

  • parent it
  • rotate it
  • unparent it
    😉
icy sluice
#

with code

rocky canyon
#

u do that with code ;D

icy sluice
#

i need that in code for floppy arm

cosmic quail
# icy sluice with code

or you just rotate it in the same place you rotate the other object, with the same values (and change its pivot to the other object i guess)

sage folio
#

hey so i'm in a 2D platforming project (from scratch), and i've been following a tutorial on the rest of this jump script https://hatebin.com/drdiuraqzm, but when i play the controller is letting me jump more than once, no matter what i set the maxairjumps, is this a problem with the jumphase? (i set it as a serializefield in the code to see what it is during gameplay, and i know i should just use logs but this felt easier)

grim pecan
#

bro i have an error saying that my method must have a return type but im following a tutorial and it has the exact same thing unless i mispelled something that i cant notice

icy sluice
rocky canyon
#

well thats different thing entirely

#

that would be two sets of rotations

languid spire
cosmic quail
languid spire
#

also configure your !ide before continuing

eternal falconBOT
rocky canyon
wintry quarry
#

The error message has the line number of the error in it