#💻┃code-beginner

1 messages · Page 518 of 1

fickle halo
#

Hey can anyone help me figure out why using static Mathematics works but using static Units fails?

fickle halo
#

no one in the official csharp discord knows....

slender sinew
#

usually it gives you that error when it can't decide which type to use if there are multiple types with the same name. What does it do if you have your IDE try to resolve the error for you? (Not sure what the hotkey is in VSC)

night mural
fickle halo
#

when I do the f12 goto definition it does go to my own defined Mathematics

#

and the code that uses it's Tau constant works.

night mural
#

does the code in Units also work? maybe just an IDE error?

fickle halo
#

changing the name to Unitts does not work either..

#

getting the error in both Cursor and VScode ides

night mural
#

what about am empty project with just these 3 files?

fickle halo
#

so it must be unity

#

cannot proceed with my project until I get this fixed

#

just wasting an afternoon for some stupid unity meta file bug

dire flare
#

Pls is any free texture download either from browser or asset store safe from copyright can I use it to publish my game

eternal needle
#

And why even crosspost that

dire flare
#

I know! I desperately want to known

#

Tell me if you know

eternal needle
dire flare
#

Ohh thanks for telling me

naive pawn
#

also have you tried reloading the c# server?

fickle halo
naive pawn
quaint thicket
#

I'm stupid and blind...

naive pawn
#

lol

quaint thicket
#

If my question isn't artist related, but code related, would I still go there?

teal viper
carmine sierra
#

when making a game do people first make the different mechanics work before structuring the game, or start from the start screen and go from there?

naive pawn
#

definitely not from the start screen

#

usually you should start with the core part of the game, which depends on what kind of game you're making

carmine sierra
#

okay I think im on the right track then

naive pawn
#

perhaps the story, or designing mechanics

#

or even a specific system that everything would feed into

carmine sierra
#

how could I lock the movement of the cue around this red line?

#

so it can't move further or closer than that

#

currently it follows the mouse when holding mouse click, I was told clamp would work, but not sure how

naive pawn
#

lock it around the center instead of the ring

#

much simpler

carmine sierra
#

I did that

#

it has a pivot point

naive pawn
#

get the direction between the mouse and the center, normalize that vector and multiply it by the target distance, then rotate it accordingly (using that same vector)

#

since the end of the cue is the important part, have that be the pivot

carmine sierra
carmine sierra
#

like in 8 ball pool

naive pawn
#

...the ball and the cue are the same sprite?

carmine sierra
#

no

#

this is 3d btw

naive pawn
#

ok, what do you mean by that then

carmine sierra
#

you said have the pivot point at the end of the cue

naive pawn
#

right, i was assuming 2d graphics

carmine sierra
#

that would mean it can freely rotate by the tip, and wouldn't be locked rotating around the cue ball

naive pawn
#

"pivot" is basically "origin"

carmine sierra
#

I want it rotating around the cue ball

naive pawn
#

those are unrelated

#

having the pivot of the cue on the tip would make setting the distance be between the ball and the cue tip, rather than between the ball and the middle of the cue

carmine sierra
#

fair

#

I did have the origin at the middle

naive pawn
#

multiplying a vector by a scalar just scales the vector

carmine sierra
#

I will try it but i dont get the logic

naive pawn
#

rotating and moving would be 2 separate steps, that both use the direction vector

naive pawn
carmine sierra
#

yeah

#

AB = b - a

naive pawn
#

i have no idea what you mean by that

carmine sierra
#

direction A to B is the same as subtracting position of a from b

naive pawn
#

ah, ok.

wow, no ray/overline really breaks that.

#

anyways, multiplying a vector by a scalar just multiplies each element by that scalar, right?

#

the ratios of each element are the same, ie it points in the same direction

#

just the length is different

carmine sierra
#

so i wanna use that for the movement not the rotation

naive pawn
#

yeah

carmine sierra
#

I googled this but im not entirely sure. Do I need a rigidbody on an object which will hit another item, and make it move. The object itself does not need to act under physics, only user control

#

(by mouse)

naive pawn
#

rigidbodies are what handle physics

#

if it needs to collide with physics rules, it'll need a rigidbody

#

but you'll have to set position and rotation through the rigidbody instead of through the transform, since the rigidbody will manage the transform

torn marlin
#

yo i need a code correction can someone help

#

the goal is for the red block to track the player and only move in the x axis making sure that it falls down normally

carmine sierra
#

the vid is dragged out a bit but the point is that it rotates when the mouse moves around the middle, not around the ball

#

I used a raycast to capture the mouse's position, so not sure why it captures it only from the middle of the screen

torn marlin
#

nvm i got it

naive pawn
#

there's a few issues im seeing in that code

torn marlin
#

rb.velocity = new Vector2(direction.x * moveSpeed, rb.velocity.y); it was this line of code

torn marlin
naive pawn
#

the distance > 0 check is not reliable
floating points aren't exact, you'll want an epsilon there

torn marlin
naive pawn
#

you shouldn't set the rotation of the transform, since the rigidbody manages the transform itself, iirc? (though, why do you need to rotate it to begin with)

naive pawn
torn marlin
#

so when it rotates, the projectile comes out of the other end

#

idk im an absolute beginner lmao

carmine sierra
naive pawn
naive pawn
naive pawn
carmine sierra
#

yeah

naive pawn
#

you need to subtract the ball position at the beginning, then add it back at the end, to use the ball as the origin for that calculation

torn marlin
#

i just looked at the rotation thing he was doing and it was working

#

soooo i stuck with it

#

if anything at the end of the day i can just revert its scale to y = -1

carmine sierra
#

I assume its something to do with perspective

naive pawn
naive pawn
#

adding them did work. it put the cue around the ball

#

but you need to subtract at the start to get the calculation around the ball as well

carmine sierra
naive pawn
#

if you subtract the ball position from the ball position, what do you get

naive pawn
carmine sierra
#

zero

naive pawn
#

yeah rotation like that should work fine

#

so nvm

#

rotating the z axis would turn it upside down

naive pawn
#

think about stuff that's centered around the ball
subtracting the ball position would make the stuff centered around the origin

#

now direction stuff, which is inherently based on an origin, works correctly

#

the direction from a to b, is the position of b, in reference to a
so by subtracting the position of a, you get the direction from (b - a) to the origin, not offset by anything

carmine sierra
#

sorry I gotta understand how the ray.getpoint works first

#

cause I thought it would find the mouse's position

#

on the plane

naive pawn
#

it does, but in world space

#

not relative to the ball

carmine sierra
#

i get what you mean but dont at the same time

naive pawn
#

the world has an origin

carmine sierra
#

yeah

naive pawn
#

everything is based on that origin

#

including the raycast

#

but the calculation you have needs a different origin

carmine sierra
#

which is around the pivot point

naive pawn
#

subtracting the ball position from everything involved (the ball, the mouse) gets the ball as a new origin
then you can do everything in that new reference frame
adding the ball position back puts it all back in the reference frame of the world

carmine sierra
#

ohhh ok

#

hmm but if we want to move the origin to the pivot, that could be a vector O->P (P for pivot). So wouldnt that be pivot.transform.position - origin

#

ray.GetPoint(enter) is at the origin?

naive pawn
carmine sierra
#

hmm so ray.GetPoint(enter) - pivot.transform would be a vector which goes from the pivot to the mouse's position

#

that's what I want

#

okay I get it now

#

thanks 🙏

tulip nimbus
#

All of the cards have the same script and i want them to work independently

naive pawn
#

why not have the script on the cards handle that

slender nymph
#

show the CameraInteract script, you likely need to change logic in that to interact with any kind of interactable instead of only with a specific object

tulip nimbus
tulip nimbus
# slender nymph show the CameraInteract script, you likely need to change logic in that to inter...
public class CameraInteract : MonoBehaviour
{

    bool selected;
    bool clicked;
    public InteractableCard card;


    void Start()
    {

    }

    

    private void Update()
    {
        if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), out RaycastHit Hit))
        {
            //Hovering
            if (Hit.collider.tag == "Interactable" && clicked == false)
            {

                selected = true;

            }
            else
            {
                selected = false;
            }

            //DESELECTION
            if ((Hit.collider.tag != "Interactable" && Input.GetKeyDown(KeyCode.Mouse0)) && clicked == true)

            {
                clicked = false;

            }

            //Selects and states
            if (selected == true)
            {

                card.OnSelect();
            }
            else if (!selected && clicked == false)
            {
                card.IdleState();
            }
            if (selected == true && Input.GetKeyDown(KeyCode.Mouse0))
            {
                clicked = true;
                card.OnClicked();

            }
        }
    }
}

Excuse my bad coding, im still working on my structure

slender nymph
#

instead of using a field to refer to the card, use TryGetComponent on the object hit by your raycast. that will also eliminate the need to check the object's tag (which you are doing incorrectly anyway, you should be using CompareTag when checking an object's tag)

naive pawn
tulip nimbus
weary crystal
#

Chat what is this

slender nymph
#

not a code question, and did you read it?

weary crystal
slender nymph
weary crystal
#

Alright thanks

languid spire
weary crystal
steep rose
#

read it and it tells you

#

also it is not an error

languid spire
weary crystal
slender nymph
#

have you written a scriptable render pass? i'm going to go ahead and guess the answer is "no" considering the absolute lack of substance that your questions have contained. so you need to change the setting that the warning indicates so that whatever asset you've downloaded that includes that render pass will work

weary crystal
#

I do understand it telling me to disable the compatibility mode but, it's after the migration, how can I migrate though?

slender nymph
steep rose
#

ScriptableRenderPasses will still work, but in newer versions of unity it will be deprecated

weary crystal
slender nymph
#

because if the answer is no, and you have no idea wtf a scriptable render pass is, then you need to use the compatibility mode for that asset to work

weary crystal
carmine sierra
#

Are 4k textures overkill

slender nymph
#

this is a code channel

carmine sierra
#

where do i ask that

slender nymph
#

and maybe also be more descriptive than just "are they overkill"

carmine sierra
#

would they slow the game down

#

would they take long to load

steep rose
carmine sierra
#

oh alr

inland dirge
#

Guys I’m new at unity programming I was just wondering why do we use for a variable [SeriatizeField] if we can use directly public ?

slender nymph
#

it's better to not make everything public, you wouldn't want just any object to be able to modify the state of your script just because you're too lazy to make a variable private. if there is no reason that another object should have access to a variable or other member then it should not be public

inland dirge
#

Cuz if we put it in private we can’t access the variable from another GameObject script ?

languid spire
#

correct

inland dirge
#

Okay ty

languid spire
# inland dirge Okay ty

fyi, if you want to be able to read but not write from another script, look into Properties

steep rose
# inland dirge Okay ty

[SerializedField] on a private variable will make the private variable show itself in the inspector

#

you can do the opposite for public variables to hide them in the inspector if needed [HideInInspector]

inland dirge
steep rose
#

no

inland dirge
#

Why ?

steep rose
#

if you do not need to access the variables in other scripts

#

you should not bandage them

slender nymph
inland dirge
#

But if you want to access the variable from another script and u don’t want it to appear in your inspector it’s great ?

steep rose
#

oops my bad

steep rose
slender nymph
#

public fields should typically be avoided whenever possible in favor of public properties

inland dirge
#

And also is OOP important in unity ?

slender nymph
#

yes . . .

inland dirge
#

Im cooked

slender nymph
#

how could object oriented programming not be important in an object oriented programming language

languid spire
#

OOP is important in anything to do with C#

inland dirge
steep rose
#

EXPAND for Time Stamp Links -- This is the most basic Unity tutorial I will ever make. If you are brand new to Unity, or if you want to make sure you’ve covered the basics, and if you want to learn how to write your first C# script - this is the video for you!

Over the course of 2 hours, I go through the User Interface, Game Objects, Transforms...

▶ Play video
eternal falconBOT
#

:teacher: Unity Learn ↗

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

inland dirge
steep rose
#

okay

inland dirge
#

He explains C#

steep rose
#

this course has videos I believe

peak holly
#

Hiya, i'm new to Unity and need to use an integer 3-component vector, is there and IVector3 or something similar? Or do i need to define this myself?

steep rose
#

you can fill a normal vector3 with int's if thats all that you need

#

but nevermind actually there is one in unity 😅

peak holly
#

I was looking for IVector3 lmao, thank you

cosmic dagger
peak holly
white prism
#

Hi All, I'm working through the Programmer Pathway on UnityLearn, I'm currently at the stage of adding RigidBody to objects after adding in a small script but when I start the game, the vehicle collides with the crate, flies over it and then veers off the road 🙄 This is completely different to how the video presents where it pushes the crate out the way. Any ideas what I might be doing wrong please or is this just something wrong with this bit of the tutorial?

This is the section of the tutorial: https://learn.unity.com/tutorial/1-2-move-the-vehicle-with-your-first-line-of-c#639946f2edbc2a2fc462dd11

I have the same parameters as the video and there's only one script against the vehicle that includes as per the tutorial:

    // Move the vehicle forward.
    transform.Translate(Vector3.forward * Time.deltaTime * 20);

Vehicle mass: 1000, 0 drag, 0.05 angular drag with Gravity turned on and discrete collision detection.
Crate mass: 20, 0 drag, 0.05 angular drag with Gravity turned on and discrete collision detection. 😕

rich adder
cosmic dagger
#

Why are they using Translate to move a rigidbody? That makes no sense . . .

rich adder
#

yea fr

#

its been like this for a few years now..

white prism
rich adder
white prism
#

Got it, Thank you! 🥳

sterile radish
#

how do i make a gameobject access the sprite of its child?

timber tide
#

Easier answer, just bind that reference in the inspector

queen adder
#

For movement do yall usually use Input Maps or just if(Input.GetKey(KeyCode.YOUR_KEY));

timber tide
#

Input class is now considered legacy, but I still use it

queen adder
#

Alr

timber tide
#

won't stop me

queen adder
#

lol

#

For me it’s easier and whatever can make my experience easier to create I’ll use it.

past spindle
#

I want to set up my damage dealt to player based on distance from source of damage, but I'm not sure how to get the distance between 2 objects while accounting for negative vectors. I was gonna set up a local float and subtract the two vectors but it occurred to me that would return negatives, depending on the position of the objects. Is there a symbol or something I can use to convert the difference between two vectors into a positive?

languid spire
#

Vector3.Distance will just give you a positive distance

naive pawn
#

for future reference, what you're describing is the absolute value, available through Mathf.Abs

past spindle
#

thank you, and thank you for the name of it. I knew there was a name but I couldn't remember what it was called

#

If -- subtracts 1 from a variable, how do I subtract more than that?

languid spire
#

-= number to subtract.
This is really very basic knowledge you should have

past spindle
#

I got confused when they were explaining it in the tutorials. I've only been working with Unity for a few weeks

#

so += would just add the numbers then?

languid spire
#

then maybe you should do some basic C# courses

past spindle
#

I am

languid spire
past spindle
#

I'm working on one of the last projects of the junior programming course through Unity Learn

languid spire
naive pawn
thorny basalt
past spindle
#

I appreciate the notes

naive pawn
thorny basalt
#

I know. I just wanted to give the specifics.

eternal needle
naive pawn
eternal needle
#

They are not the same thing, the result can be different in cases

naive pawn
#

there's no "result" with modular arithmetic

eternal needle
#

Yes there is

earnest iron
#

How do u set up an enemy AI NPC?

naive pawn
#

in code 5 % 2 == 1, 5 != 1 % 2
in math 5 ≡ 1 (mod 2), 1 ≡ 5 (mod 2), 5 ≡ 3 (mod 2)

earnest iron
#

What? @naive pawn

naive pawn
#

not directed at you, sorry

eternal needle
naive pawn
earnest iron
#

The character just disappears randomly

#

And sometimes it flies in the sky.

#

It should not do that

#

I have set up an area for detection of the player, but it doesn't follow the player.

#

Also my grammar is bad so don't judge me

naive pawn
#

tf you mean your grammar is perfect

earnest iron
eternal needle
naive pawn
earnest iron
#

Do u guys know this

#

How can I fix it

naive pawn
#

im literally talking about "mod" in pure modular arithmetic being different from the "mod" in computing

eternal needle
naive pawn
#

you brought up "the math term", so i assumed you were talking about, yknow, math

eternal needle
eternal needle
naive pawn
#

fair.

flint gyro
#

I want to learn csharp, wheres the best place to start?

naive pawn
#

!learn

eternal falconBOT
#

:teacher: Unity Learn ↗

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

naive pawn
#

there's some stuff specifically for unity there

#

or you can try microsoft's resources for c# itself

languid spire
languid spire
south juniper
#

Hi

#

Hi @rich adder

south juniper
naive pawn
#

please don't go around pinging random people, just !ask

eternal falconBOT
south juniper
#

I thought unity is good choice over godot

languid spire
rich adder
carmine sierra
#

is slider not a component

rich adder
carmine sierra
#

I called the slider object as a gameobject

south juniper
rich adder
south juniper
naive pawn
carmine sierra
#

then I do getcomponent<Slider>

rich adder
#

show the current code

#

again, that doesn't answer if you're using the correct Slider component

naive pawn
#

show your usings maybe

carmine sierra
carmine sierra
naive pawn
#

it should be from UI, not UIElements

carmine sierra
#

using UnityEngine.UI

rich adder
#

you're not though

carmine sierra
#

I changed it

#

I was asking if thats correct

rich adder
#

I mean I did say it earlier no?

carmine sierra
#

i didnt know you meant the using thing

#

the 'namespace'

naive pawn
rich adder
carmine sierra
#

yeah, thats what UnityEngine.UI is right

rich adder
#

yes its a namespace

carmine sierra
#

also why can't I use SerializeField for sliders but I can for gameobjects

rich adder
#

the using at the tops are just shortcuts so you don't have to keep preceding the class with its namespace

carmine sierra
#

yeah

naive pawn
naive pawn
#

but maybe you had issues because you were using the wrong slider before

carmine sierra
#

there's different slider types?

naive pawn
#

no, you were just using the wrong definition

rich adder
#

UnityEngine.UIElements is the UIToolkit

carmine sierra
#

oh so there's different sliders depending on whether its uielements or ui

#

which do i want then

wooden sky
#

hello im trying to make a ribbon for a spear that uses DistanceJoints2D for animating it, but im running into issue where it spreads apart too much, any idea why?

using UnityEngine;

public class ProceduralRibbon : MonoBehaviour
{
    public GameObject mainPoint;
    public GameObject ribbonSegmentPrefab;
    public int segmentCount = 10;
    public float segmentSpacing = 0.5f;
    public float segmentGravity = 1f;
    public float maxSegmentDistance = 1.0f;

    private List<Rigidbody2D> ribbonSegments;

    void Start()
    {
        InitRibbon();
    }

    public void InitRibbon()
    {
        ribbonSegments = new List<Rigidbody2D>();

        for (int i = 0; i < segmentCount; i++)
        {
            GameObject segment = Instantiate(ribbonSegmentPrefab, transform.position - new Vector3(i * segmentSpacing, 0, 0), Quaternion.identity);
            Rigidbody2D rb = segment.GetComponent<Rigidbody2D>();
            ribbonSegments.Add(rb);

            DistanceJoint2D joint = segment.AddComponent<DistanceJoint2D>();


            if (i > 0)
            {
                joint.connectedBody = ribbonSegments[i - 1];
            }
            else if (i == 0)
            {
                joint.connectedBody = mainPoint.GetComponent<Rigidbody2D>();
            }
            joint.autoConfigureDistance = false;
            joint.distance = segmentSpacing;
            joint.maxDistanceOnly = true;
        }
    }

}
rich adder
#

thats the Unity UI Package

#

not UIToolkit (the newer UI) which has no inspector components , just uses an external XML like structure or c# but you can't serialize it

#

nothing you should worry about for now though

carmine sierra
#

oh ok

#

I managed to reference the slider now, but Slider.value isn't valid?

carmine sierra
#

'Cannot access non-static property in a static context'

naive pawn
#

what's the code now

carmine sierra
rich adder
naive pawn
#

why would you do that though

rich adder
#

well i guess you're not

naive pawn
#

why did you remove the part that was correct

rich adder
#

just make a reference in the inspector as you did with the GameObject

#

and then use the instance

#

[SerializeField] Slider mySlider

carmine sierra
#

cause I was initialising a gameobject and THEN getting the slider, getting the slider directly is quicker

naive pawn
#

ok so you need to get the slider

#

not the type of slider

rich adder
#

you need the **Instance **

#

the Specific Slider created, the one on the gameobject

carmine sierra
#

oh, but with rigidbody components you can just reference a rigidbody without getting the component right?

#

If I remember right (havent done this in a few months)

naive pawn
#

you can but you shouldn't

carmine sierra
#

So type Slider isnt the same as the component

carmine sierra
rich adder
#

Anything on a gameobject is a component mate

carmine sierra
#

exactly

rich adder
#

but those are the instances you need to reference

carmine sierra
#

so why does it work with rbs but not sliders

naive pawn
#

because rbs are old

#

and you shouldn't use that field anyways

rich adder
#

unity has fumbled MB properties

naive pawn
#

you should just GetComponent like any other component

gray coral
#

why i cant reach my camera script to activate

naive pawn
#

you're gonna need to elaborate

rich adder
gray coral
#
        if (Input.GetKeyDown(KeyCode.Space) && !isMovingUp)
        {
            isMovingUp = true; // Start moving up

            // Activate the camera movement when jumping
            if (cameraController != null)
            {
                cameraController.ActivateCamera();
            }
        }```
#

i try to activate the script on the camera

naive pawn
#

have you tried debugging at all?

rich adder
#

Debug.Log inside ActivateCamera and so on

carmine sierra
#

I realised the name was just incorrect, I didnt need to do getcomponent, so now im more confused as to why you said i should do getcomponent

rich adder
naive pawn
#

you would do GetComponent if you had a GameObject to start, like you did originally

carmine sierra
#

yeah

rich adder
#

always Get a specific component when possible, you almost never need to use GameObject field

carmine sierra
#

thats what I did

rich adder
#

yes, just saying in the future

carmine sierra
#

you said that what I had before was correct though, which was using the gameobject then referencing the component

rich adder
#

if you need a gameobject without specific component , I usually do it as Transform

carmine sierra
#

why?

rich adder
#

because its more likely you will use the trasnform than gameobject

#

any component can access its container gameobject / transform anyway

carmine sierra
#

genuinely idk what happened her

#

only other reference

rich adder
eternal falconBOT
naive pawn
rich adder
#

making everything public by default is bad design

naive pawn
carmine sierra
#

idk if im stupid though

naive pawn
rich adder
rich adder
naive pawn
#

no, i mean, even for unity fields specifically?

carmine sierra
#

intelliJ is bad for unity or smth?

rich adder
#

I never use public fields, if something else needs access, I make a property

carmine sierra
#

never had ide lag on vscode

rich adder
carmine sierra
#

yh i mean rider

#

Im using that

#

by same guys as intelli

naive pawn
#

i use publics specifically for stuff that goes through unity, i do use properties for access between classes

rich adder
#

wdym "through unity"

naive pawn
#

serialized fields, messages, lifecycle methods

rich adder
#

why make everything public thats on MB ? thats just bad design imo

carmine sierra
carmine sierra
naive pawn
rich adder
rich adder
naive pawn
#

yeah i don't really like it tbh

rich adder
#

I'm not even gonna bother asking why, thats nonsense

naive pawn
#

not in concept, just feels unnecessary when you can just use a much smaller token

rich adder
#

smaller token? ?

naive pawn
#

idk i can't really explain it. nobody gave me a convention so i developed my own and now im just more comfortable with my convention i guess lmao

rich adder
#

my brain hurts

naive pawn
#

to me, SerializeField on a private feels like doing private to hide then SerializeField again to reshow it

#

can't explain it

rich adder
#

to show it only for the inspector..

naive pawn
#

yeah i get that

rich adder
#

but other classes dont accidentally touch any fields in that class

naive pawn
#

yeah i just don't do that

rich adder
#

thats what props and methods are for

#

i mean to each their own, just saying its bad design and not typical of C#

naive pawn
#

i was never shown typical C# lmao

rich adder
#

encapsulation should be one of your first lessons then lol

naive pawn
#

oh i know it well, i used to do java

rich adder
#

well then why would you break all of that in C#
its literally the same language (almost)

naive pawn
#

all the unity c# tutorials use public, i found out about SerializeField much later

rich adder
#

yeah cause they're shite tutorials

naive pawn
#

...literally all on the unity learn page

rich adder
#

its honestly not a big deal if its just you on the project anyway, but its bad design and you should always encapsulate even just to protect yourself from your future self

rich adder
#

Unity != C# standards

naive pawn
#

...weren't you the one defending it to me a year ago

#

"public" to me means accessible outside the "package" (from java), and unity is outside the package, so i use it for stuff that goes to unity shrugsinjapanese

rich adder
#

in what regard? cause I do heavily criticize Unity and their inconsistency

#

public means anything else can change your score even though its not meant to be public SET etc.

#

why would you open yourself up to the possibility of accidentally changing something that you shouldn't change

cosmic quail
naive pawn
#

because i don't want to see random stuff about state in the inspector?

cosmic quail
naive pawn
rich adder
naive pawn
#

you're assuming this preference is rational

naive pawn
#

it doesn't make sense lol. but im already used to it

rich adder
#

at least your self aware of it which what makes it strange willing to choose it over just privatizing it

naive pawn
#

im very much not used to attributes

rich adder
#

its not that much work putting an attribute instead of public

naive pawn
#

even less so attributes that have effects rather than just validators (like Min or Range)

naive pawn
rocky canyon
#

imo, you'll learn/use them when u need em

rich adder
naive pawn
#

(for access modifiers, not public specifically. java's default access level isn't private)

rocky canyon
#

what is it then?

naive pawn
#

package-private, aka internal in c#

rocky canyon
#

i hate java lol

rich adder
#

yeah internal can be accessed from within the same assembly

#

not comparible to private

rocky canyon
#

@rich adder u use many assemblies?

#

in ur current projects

naive pawn
rich adder
#

it makes a chore using assembly definitions tbh

carmine sierra
#

If I wanna detect if the mouse is down on a slider, should I give the gameobject a button component? or is there a way using the slider

rocky canyon
rich adder
#

its good if you're making an asset though but might confuse your users

naive pawn
rocky canyon
#

not really a need for it to be a button unless thats the way u wanna do it

#

ya, i make my own sliders

#

i think unitys sliders are gross

rich adder
#

oh slider has OnChanged event you can listenn to

rocky canyon
#

affiliation much?

#

lol

rich adder
#

you can however get OnPointerDown for example by using Ipointer interface

#

or event Trigger component

naive pawn
rocky canyon
#

i seen it flash in my browser for a second

carmine sierra
carmine sierra
rocky canyon
naive pawn
#

https ://justlink.to/mdn/mousedown redirects to mdn directly but not really used to typing it

rocky canyon
#

u need to redo the entire slider to make it work like i feel it should

naive pawn
carmine sierra
#

I need to detect when the mouse releases

naive pawn
#

now my question is, should you be using a slider for that lmao

rich adder
naive pawn
#

eh i guess that makes sense

carmine sierra
#

it's on the cue control script

#

on the cue

#

so i couldn't use the pointer method could I?

naive pawn
#

you could have the slider be a child of the cue

carmine sierra
#

doesnt make sense in the game

naive pawn
#

why wouldn't it

rich adder
carmine sierra
#

weird layout in the hierarchy

naive pawn
#

having the controls for the cue, within the cue?

carmine sierra
#

I can child UI in a gameobject?

rich adder
#

i think they want to use the Slider to give "power" to the cue

naive pawn
#

yeah, just needs a canvas and then have the slider in the that canvas

carmine sierra
rich adder
#

why not just use the OnValueChanged ?

rocky canyon
#

thats how i do it when i do use sliders

#

oh nvm i lied..

#

mine update w/ Update()

carmine sierra
rich adder
rocky canyon
#

if theres visuals u may need to update during the drag tho

rich adder
#

or are you gonna launch after the slider was released? this is tricky

rocky canyon
#

and then when release set ur final value

carmine sierra
rocky canyon
#

it could be totally seperate

carmine sierra
#

youve played 8 ball pool right

#

just that control

rocky canyon
#

when mouse release (check on what happened w/ the slider)

#

no need to use weird hover crap on teh slider

rich adder
rocky canyon
#

who hasnt played 8ball? (Pool, Billiards, Etc)

#

to me if ur making a pool game sliders dont even make sense to me

#

i'd track mouse positions

#

click -> get position
release -> get position

then do the math.. get the direction/distance etc

naive pawn
#

oh god, does golf count as a cue sport

rocky canyon
#

use mins and max to calculate power

#

u dont hit golf balls w/ cue sticks

#

but its similar lol

carmine sierra
naive pawn
rocky canyon
#

the power meter click/drag mechanic is the same

#

same as pool, angry birds, etc

rich adder
rocky canyon
#

let me ask a question since we're on the topic..
if ur making a power meter w/ one u prefer(or is more fun)
click and have the power meter ping pong from 0 - max until u release
or
click and have the power meter go to max and then back to min.. and if u miss the click u get min power?

rich adder
rocky canyon
#

small town bs nothing to do

#

lol

carmine sierra
rocky canyon
#

spin is called english btw

#

"putting english on the ball"

rich adder
rocky canyon
#

ohh dear

carmine sierra
rocky canyon
#

i thought yall played snooker or something

naive pawn
rocky canyon
#

i thought it was all types of spin

#

i'll have to check hang on

#

yea its all spins

#

SIDE spins i guess

carmine sierra
#

no one plays snooker

#

casually

rocky canyon
#

snooker is like pinball + pool

carmine sierra
#

like doesnt that mess up the whole aim if you flop it

rocky canyon
#

nah. its pretty easy once u play a bit

rocky canyon
#

get good lol

carmine sierra
#

top spin is ez

rocky canyon
#

using top / bottom spin causes alot of ppl to launch the cue ball off the table

#

lmao

carmine sierra
#

random question what floor could look better than this

wintry quarry
#

Not a code related question

carmine sierra
#

true

naive pawn
rich adder
#

use a texture, also pool tables are cloth and not really that reflective

carmine sierra
#

After I release firing, I need the cue to hit the ball and apply a force. Is the best way to do this to be applying a force to the cue and let it hit the ball that way

rich adder
#

relying on unity physics has its pros and cons

naive pawn
#

maybe if the masses are the same and it's an elastic collision?

#

but idk if you can guarantee that

#

if it's inelastic, the cue would follow the ball a bit after the impact, unless you specifically stop it

rocky canyon
#

have fun trying to replicate pool physics 😮

#

lol

naive pawn
#

maybe you can do that by setting the materials appropriately, but if not, you could apply an impulse force on the ball when the cue hits it

rocky canyon
#

im thinkin you'll def have to manipulate the ball a bit urself

rich adder
#

yes i usually nudge these types of physics with Reflect, the bounce material can help a bit but its unreliable

frozen star
#

I am building somewhat of a studio application in Unity for windows.
Users will be able to import large files. (audio, images, and video) and the game needs to persist them.
Users will be reading and writing to the folder that stores these files often.
Can I use Application.persistentDataPath ? Or is there a better directory?

rich adder
#

sure, or use assetbundle/addressables

carmine sierra
#

should I just do the annoying thing of downscaling the mass

#

or is there a better method

rich adder
#

which collision mode did you put

#

try Continuous Dynamic

carmine sierra
rich adder
#

if you can get away with it pick continuous only , but dynamic helps if both bodies move pretty fast

carmine sierra
#

considering its just one hit movement it should be fine

carmine sierra
#

the thing it hits?

rich adder
#

might be overkill here , might be able to just get away with the regular continuous

carmine sierra
#

so both should be continouous

rich adder
carmine sierra
#

it worked with just the cue being continouous

rich adder
#

mhm continuous should be okay since they're not moving so fast

#

but it does exactly what it says, thats why those are generally more expensive but its okay in such smal usecases

carmine sierra
#

only dynamic works

carmine sierra
rich adder
#

no its just doing many "sweeps" as oppose to estimations

carmine sierra
#

estimations?

#

what does it estimate

rich adder
#

yes like based on how fast this thing is moving will it hit this thing

steep rose
#

also keep in mind there is a limit of speed for when collisions will just never not be wonky

#

like a max cap of speed, but you should theoretically never go that fast with a pool ball

swift sedge
#

and if it's too fast, then the other option is raycasting between where the object was and where it is now

steep rose
#

yes, it may be more expensive to do to so, so this is why people fake speed with effects

#

like speed lines if that makes sense or FOV changes

timber tide
#

rigidbodies should really handle a lot of clipping itself assuming you use forces

#

but it's far from 100% proof. I do think my own interpolation via character controller is better ;)

#

One thing though that we don't really think about is objects traveling at quick speeds at an intersection. Rigidbodies will actually try to account for that

swift sedge
#

what, like a car intersection?

cosmic quail
#

continuous rigidbody can fail and go through walls too

timber tide
#

Right, you can't easily raycast forward in that situation

visual rune
#

I have a small problem where in my script it is not recognising the PlayerController class? Any ideas?

swift sedge
#

but then that would be even more computationally expensive

timber tide
#

It probably some some calculations for intersecting some shape casts in those scenarios, but it only will detect others via continuous

timber tide
charred spoke
#

What do you mean not recognising?

visual rune
wintry quarry
naive pawn
#

classes should be in PascalCase

rich adder
naive pawn
#

your original message says it was PascalCase

#

so have you tried referencing it using PascalCase

visual rune
#

Yes

rich adder
#

capitalization matters

wintry quarry
visual rune
wintry quarry
# visual rune

also when you have a red squiggle it means there's an error

visual rune
#

Is PlayerController not a built in class

wintry quarry
#

you need to read the error message

rich adder
naive pawn
wintry quarry
naive pawn
#

are you confusing it with CharacterController?

quaint thicket
#

I'm trying to make a GameObject transparent at changing the GameObjects color alpha, but it's not working.

I'm using a basic Sphere.

rich adder
#

you're confusing with CharacterController maybe ?

visual rune
#

I think so

#

Sorry

wintry quarry
#

you need to use a transparent material

quaint thicket
#

I see

#

Is their a built-in material I can use, or do I need to find something in the asset store?

wintry quarry
timber tide
#

creating a new material usually defaults it to the pipeline's lit

hexed dove
#

hello, im new to unity and im doing a little horror game for my personal experience. I have a problem with an interaction with colliders. The trigger does not detect my object... Could someone help me fixing my issue ?

naive pawn
#

!ask

eternal falconBOT
naive pawn
#

noone can help if you don't provide details

wintry quarry
naive pawn
#

have you checked the layers to make sure they can detect each other to begin with?

hexed dove
#

can anyone come to speak so i can explain it?

naive pawn
#

no thank you

#

text will do just fine

hexed dove
#

its complicated but i will try

#

wiat 2 sec

wintry quarry
#

but basically if it's not working you didn't set it up correctly

#

you need:

  • Both objects must have colliders
  • At least one collider must be a trigger
  • At least one object must have a Rigidbody
hexed dove
#

oh LOL i just forgot the rigidbody

#

thank u xD. its been 1H since i tried to fix this

jaunty coyote
#

!code

eternal falconBOT
red igloo
#

I am making a full body fps controller and I have these camera positions set up so when I am jumping walking or running the positions will change. When I jump and as I fall and touch the ground you can see briefly the camera will go to idle position then the landing position which I don't want. Here is a video: https://streamable.com/op77wu

CameraPosition script: https://paste.ofcode.org/bpNjJqeAHTxrihctzhEmPj

Watch "Game Idea - SampleScene - Windows, Mac, Linux - Unity 2022.3.26f1 DX11 2024-11-02 19-26-24" on Streamable.

▶ Play video
steep rose
#

we would need to see the playermovement script and to show us what you use to identify "landing"

steep rose
#

does the your animator have any exit time to it when playing the landing animation?

red igloo
steep rose
#

I was just getting more information to check boxes is all

red igloo
red igloo
steep rose
red igloo
vernal crow
#

Can anyone help me make an inventory system or give me a link to a tutorial? Been looking for a while and all these tutorials haven't really worked and I just end up back at square one

rich adder
#

inventory you're better off making your own system

#

what you see on youtube is just how different people solved their own way, you essentially will be copying someone elses system and in turn when something break you probably wont know how to fix it, or add onto

#

much better you build from the ground up the way you want / need it

vernal crow
#

A lot of these tutorials arent what im going for

#

My only problem is I have no idea how to code it

rich adder
#

start small, build up as with anything else

#

you won't learn what's best for you until you experiment multiple times , it will probably not be good the first few times but as you keep doing it you realize what you do or don't do on the next iteration

vernal crow
slender nymph
# vernal crow My only problem is I have no idea how to code it

you should start with beginner c# courses, like the ones pinned in this channel. then when you have some idea of how to use the language, you can break down what you want to do into smaller steps that you can find individual tutorials for and combine that knowledge together to make your stuff

vernal crow
#

Thank you very much will do

crisp token
#

Can I not reference a static class directly?

naive pawn
#

what issue are you encountering when trying?

crisp token
#

I'm trying to reference the static method IFFT2D from static class ComputeFFT but getting a "the type or name space IFFT2D does not exists with ComputeFFT" error

naive pawn
#

have you imported the namespace

slender nymph
#

do you happen to have a namespace and a type called ComputeFFT

crisp token
#

I have it as a class within the same folder

naive pawn
#

and is that class in a namespace

crisp token
#

yeah i had two thanks

strong plover
#

Sorry. Can you give me some advice on what I need to know about Unity C# to get started working in studios?

steep rose
#

What do you mean by "studios"? Unity just uses normal C# and unitys API with it which is on the !docs

eternal falconBOT
steep rose
#

If you mean actual job applications then you would want to learn C# inside and out and use unitys documentation as well

strong plover
steep rose
#

Google and Documentation are your friends

drowsy oriole
#

How do I add a debug log?

#

Nvm

#

can someone help me with this code?

thin lion
#

for (int i = 0; i < 5; i++)
        {
            SliceEffects.emitting = false;
            
            float x = Random.Range(-100, 100);
            float y = Random.Range(-100, 100);
            yield return new WaitForSeconds(0.2f);

            this.transform.position = ems[0].transform.position + new Vector3(x, y, 0);
            Debug.Log(SliceEffects.emitting);

            Vector3 direction = transform.position + 2 * (ems[0].transform.position - this.transform.position);
            yield return new WaitForSeconds(0.5f);
            SliceEffects.emitting = true;
            
            this.transform.position = direction;
            //while(Mathf.Abs(transform.position.x - direction.x) > 1)
            //{
            //    transform.position += direction.normalized;
            //}
            //this.GetComponent<Rigidbody2D>().AddForce(direction);

            yield return new WaitForSeconds(0.2f);
        }
#

slice effects is a trail renderer

#

anyone know why the trail is still showing when emitting is supposed to be false?

night mural
quaint thicket
#

I want to move a GameObject based on the rotation (Forward and Right) of the players camera, but if I'm looking downwards and move forward, My GameObject will move forward and downwards. How do I make it just move forward, no matter if my camera is looking up or down?

void thicket
#

Get forward vector, set y to 0, normalize

polar acorn
quaint thicket
#

Thanks

thin lion
finite mango
#

Im using a tileset with 0.5 cell size and when i use

Tilemap.GetTile(Vector3Int.FloorToInt(transform.position));

it looks for the tile on a grid of cell size 1. If i scale transform.position by 2 it almost works but its still off very slightly. is there a better way to do this or should i just add a slight offset to the x and y of transform.position's vector as a woorkaround

#

!code

eternal falconBOT
willow scroll
finite mango
#

oh i see. thank you

dusk garnet
#

Hey is there any courses on the Photon API for servers and networking that I could take?

teal viper
dusk garnet
#

and im new here so idk anything about this place

teal viper
#

Ugh... Nvm... Read Photon as Python for some reason...

#

Anyways, there are plenty of tutorials online as well as the documentation, so basically just google.

dusk garnet
#

Yeah I've looked around and most of them are from a couple years ago so I thought they might have been outdated.

#

Ill look on the Photon documentation and see whats there

teal viper
#

At the very least the design principles and the concepts behind the API stay the same. There might be changes to method and property names, but these are trivial to fix.

burnt vapor
#

The error occured due to confusion by the compiler as it used the wrong class, not containing the method they tried using

teal viper
naive pawn
#

that's what i thought, so the error is saying that ComputeFFT is a namespace then

naive pawn
teal viper
naive pawn
teal viper
#

Yeah, if the error is as they quoted, then the issue is with what comes after that.

tawny quarry
#

Hi, my player don't collide with the ground sombody know how to fix it ?

naive pawn
#

i think the confusion (in this convo) is just lack of context, so let me clarify so we can be done here

  • namespaces and types are highlighted in the same green color.
  • the context here is that there is a class named ComputeFFT inside a namespace, also called ComputeFFT
  • the namespace was not imported, so ComputeFFT here refers to the namespace, hence the error about looking for a type/namespace.
    that's why ComputeFFT was found, but not the static method. because it's a known symbol for a namespace, not because it's referring to a different class.
languid spire
#

your player does not have a collider

tawny quarry
languid spire
#

where

tawny quarry
naive pawn
#

why do you have it separated

languid spire
eternal falconBOT
languid spire
#

use a paste site

tawny quarry
languid spire
#

screenshot the inspector of your Ground object

tawny quarry
#

i do somting and it work i don't know why but it work

#

sorry for the inconvenience

languid spire
burnt vapor
#

You mentioned that they might have forgotten to import the namespace

naive pawn
#

and they did

burnt vapor
#

The compiler knows that the symbol exists, so it's not a matter of importing the namespace

naive pawn
#

that was the issue

naive pawn
naive pawn
#

the fully qualified access would be ComputeFFT.ComputeFFT.IFFT2D(...)

burnt vapor
#

So the issue was ambiguity, not a lack of importing

#

Or in other words, don't name these things the same

naive pawn
naive pawn
#

it's on the asset store

#

can we be done with that issue now?

#

thanks.

burnt vapor
#

As I tried explaining, the compiler was well aware of the class existing, but it picked a different one.

naive pawn
#

yeah no, that's not it

#

did you read the error message

burnt vapor
#

Judging by the short conversation, they indeed had two classes of a similar name added, one having the method.

naive pawn
#

"the type or name space IFFT2D does not exists with ComputeFFT"
does that look like ComputeFFT is a class to you

#

here, try this

namespace Foo
{
    internal static class Foo
    {
        public static void Bar()
        {

        }
    }
}

internal static class Main
{
    public static void Z()
    {
        Foo.Bar();
    }
}
```notice the similar error message?

can we *finally* be done here?
languid spire
#

no, that thinks ComputeFFT is a namespace and it's looking for a class or sub namespace IFFT2D within it

burnt vapor
#

But yes, it's clear. Things like this can be avoided if we just named things properly

naive pawn
burnt vapor
naive pawn
#

so did you miss my clarification message

#

the one i wrote specifically to clarify the situation

#
  • namespaces and types are highlighted in the same green color.
burnt vapor
#

It doesn't really matter when it's unclear what the code would actually have to be like for such an obscure thing to happen

#

Also no, I didn't. Wasn't my convo you replied on

#

I think this is settled then 👍

queen wren
#

I have a grid/turn based game, and I've some buttons on screen, so the problem is that the buttons didn't block the raycast, so when you click on a button the unit will get also the command to move on the cell that sit below the button 🙄

I'm trying to stop the action before by raycasting but isn't working.

 {
     Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
     if (Physics.Raycast(ray, out RaycastHit raycastHit, float.MaxValue))
     {
         if (raycastHit.transform.GetComponent<UnityEngine.UI.Button>() != null) return;
     }
#

also, by using EventSystem blocks everything so I can't use it neighter.

        void Update()
        {
            isPointerOverUI = EventSystem.current.IsPointerOverGameObject();
        }

 private void OnMouseClick(InputAction.CallbackContext context)
        {
            if (isPointerOverUI) return;

Because on this way the canvas cover the entire screen so I can't click on the objects in the scene 🤔

night raptor
ivory bobcat
#

Is this script on every object or just your input manager etc?

queen wren
night raptor
queen wren
#

Looks like Unity 6 EventSystem consider the canvas UI too 🤔

languid spire
queen wren
past root
#

ive tried setting up player collisions over and over and i cant seem to get it to work my character is just always passing through the objects

languid spire
past root
#

yeah

languid spire
#

show

past root
#

thats the object

#

thats player

languid spire
#

be helpful to actually see ALL of the information about the colliders

past root
#

oh yeah sorry

languid spire
#

to start with your Rigidbodies are both Kinematic, so that wont work

past root
#

both of them are the same

languid spire
#

do you know what Kinematic means?

past root
#

like it wont move? doesnt have acctual mass

languid spire
#

no, 'Not affected by Physics'

#

So, no collision events

past root
#

so should i use static for my object

languid spire
#

best have a non kinematic rigidbody for the moving object

#

like Dynamic

past root
#

but i dont want my character to have any mass?

languid spire
sleek notch
#

Hi, I need help. When I load another scene my all textures will appear black

#

for no reason

#

any sollution

fickle plume
languid spire
#

also, not a code question

sleek notch
#

oh

sleek notch
#

but yeah

#

It was the problem 💀

naive pawn
winged vine
#

Hey, what is the expected way of sharing variables between classes in C#/ Gamedev? I'm taking a course on udemy, and what infuriates me is that while SpawnManager, Player and it's movement limiting, and Enemy and their movement limiting are using exactly the same area bounds, I don't know how to share that one array between these classes

#

In React I'd have just exported a constant and called it a day, but I guess there's other way of doing that here 😄

night mural
#

for constants, you probably want to use ScriptableObjects

#

(but it could also be, like, one big SO with most of your 'content configuration' in it)

#

also, the answer differs for unity vs if you're freewheeling it, so keep that in mind

gray coral
#

how can i make my player flip on the y Vector3 localScale = transform.localScale; localScale.y *= -1; transform.localScale = localScale;

winged vine
swift sedge
night mural
night mural
gray coral
night mural
#

so my advice is to

  1. don't get caught up doing things 'the unity' way, because it's bad. do what makes sense to your programming brain
  2. make what you're making and solve your real problems
winged vine
night mural
night mural
winged vine
swift sedge
#

they've been around forever

night mural
#

goes back to 5.2 at least

night mural
#

You can think of SOs as object instances which you create in unity (at 'design time'), versus in a scene/prefab or at runtime. They exist independent of all of that, so you can reference them within/across scenes

swift sedge
#

they allow you to create an instance of a class and storing it as an asset. It's useful for, e.g. a weapon system, where you want more than one weapon of a specific type

winged vine
#

I see

#

That sounds cool, I'll try to tinker around with them

night mural
#

so if what you want is 'data that you can read/write from multiple scripts', they're a good solution

swift sedge
#

functionally the same, but different inputs

queen adder
#

!code

eternal falconBOT
gray coral
#

i dont get it my plater 2d not moving towards the new y pos when rotated

night mural
#

are you moving them relative to their transform.forward?

gray coral
#

yes i noticed first it moved on global

#

i using localpos now

#

but still moves forward

#

or up in this takes

#

Vector2 newPosition = (Vector2)transform.localPosition + (moveSpeed * Time.deltaTime * Vector2.up);

night mural
#

well that is what you are telling it to do

gray coral
#

yes but up i mean on the new y-as

#

not literally up

#

so if i face with y to the left

#

i should move up but moving the left ofcourse

ivory bobcat
gray coral
#

i try to flip it

#

i tried rotation on the x-as

#

which makes sense

#

but its kind of buggy

gray coral
#

i dont get it

#
{
    // Invert the local scale on the y-axis to flip the player
    Vector3 localScale = transform.localScale;

    // Flip the player on the y-axis
    localScale.x = -localScale.x; // Simple flip

    // Apply the new local scale
    transform.localScale = localScale;

    // Log message for debugging
    Debug.Log("Player flipped: New scale = " + transform.localScale);
}```
#

i tried x and y flips

steep rose
#

do you mean you want to flip the player left and right? if you flipped its Y axis you would flip it up and down

wintry quarry
#

isn't up up?

#

It also depends what you're doing with this newPosition vector

wintry quarry
#

but uhh... up is upo

gray coral
#

i talking about flipping my player

wintry quarry
#

changing x scale will change which way right and left are

#

not up and down

wintry quarry
gray coral
steep rose
#

was scrolled up

gray coral
#

when i hit a sphere i want my player which is the orang sphere to flip outwards

rocky canyon
#

flip the green axis

gray coral
#

i tried to flip green axis

wintry quarry
#

you want to rotate around the x axis OR change the y scale to -1 to change that green axis

rocky canyon
#

yo how we get our axis widget back?

steep rose
wintry quarry
rocky canyon
#

how do we open that overla menu?

wintry quarry
#

press the ~/` button to get that menu

rocky canyon
#

thanks

steep rose
#

got the name right this time

rocky canyon
#

Praet, Praetor, PraetorBlue

#

common name in my lexicon 😄

steep rose
#

I always mix up the A and E

rocky canyon
#

lol 🙂

wintry quarry
rocky canyon
#

if u pronounce it like Praytor

#

its easier to know which one comes first

steep rose
#

I'm so used to typing fast so I kind of just mix them up

rocky canyon
#

dont we all.

steep rose
rocky canyon
#

PrÆtor

languid spire
swift sedge
#

alt and numpad

steep rose
#

since I never use them

rocky canyon
#

open this guy.. is the easiest

swift sedge
#

for example: Alt + 0178 is ²

#

discord doesn't really like you doing that though

rocky canyon
#

Alt+255 is Invisible character, had to use that alot back in the days of old HTML

steep rose
#

sweet

#

figured it out

gray coral
#

why this 2d object moves on the z-as? when i say flip on the y-as. ```// Get the current local scale
Vector2 localScale = transform.localScale;

// Invert the Y-axis scale
localScale.y *= -1; // This will flip the player sprite along the Y-axis

// Apply the updated local scale back to the transform
transform.localScale = localScale;```

wintry quarry
#

(not pictured here)

#

oh you're asking about rotation not movement

gray coral
#

yes

wintry quarry
#

that also depends entirely on your code that does rotation, also not pictured here.

steep rose