#💻┃code-beginner

1 messages · Page 204 of 1

broken trellis
#

O mb

swift crag
#

That thread suggests it's caused by an antivirus program

#

it's opening the .dll and screwing up Unity's attempt to modify the .dll

broken trellis
#

Omfg, it's stupid fecking Webroot screwing me up lel

misty obsidian
#

Hi guys! Does somebody know how to make auto scalling? It supposed to looks like 2nd photo

broken trellis
#

No, only VS Code and Unity

rocky canyon
swift crag
rich adder
swift crag
rocky canyon
swift crag
#

Adjusting the Canvas Scaler will also be important, yes

rocky canyon
#

just type in the resolution u want it to scale to

#

in the game view you should probably preview it in the resolution u want..

#

if its not there u can create ur own presets..

misty obsidian
# rocky canyon

Ya! I set it , but it doesn't work as I wanted to, I will try with reading ui documentation

swift crag
#

Note that you hsould also test with a variety of resolutions in the game view. This'll make sure your UI works on various displays

#

I'll grab the game view and squish it like a stress ball

rocky canyon
#

same 🙂

#

when u get those solid anchors and it looks right in every possible scale 👍

broken trellis
#

Fixed it!

#

Webroot Antivirus is incompatible with Unity it turns out!

quick pollen
#

i am about to go insane

#

over fucking jumping

#

it just doesnt work

#

no matter what i try

#

the logic contradicts itself

vernal plume
#

i screwed up my air velocity script and now bhopping gives me infinite acceleration

#

also how would i add a text overlay that can tell me my state, speed, etc

rich adder
vernal plume
#

im not finding any helpful tutorials

rich adder
#

You want strangers spying on u?

#

Windows already has its own Antivirus

shell sorrel
quick pollen
rich adder
polar acorn
quick pollen
quick pollen
rich adder
quick pollen
#

but whats the difference between having landed

#

and being on the ground just overall

polar acorn
rocky canyon
#

if ur not grounded u check again if grounded.. ^

quick pollen
polar acorn
quick pollen
#

it didnt work properly

polar acorn
polar acorn
#

then the character controller behaves properly

quick pollen
#

i technically already have gravity acting on it

#

but it just doesnt work properly

polar acorn
#

You need to actually touch the ground, meaning you need to have downward movement, even when grounded. If you set the Y value of your move to 0 when you're grounded, then you didn't actually touch the ground, you hovered over it. Then next frame gravity kicks in and set it

#

then next frame you hover, and so on

earnest atlas
#

gravity doesnt works properly?

polar acorn
#

And when people implement it themselves they often make the mistake of setting the vertical speed to zero when grounded, when they need to set it to a small negative value

#

something like -0.1f

#

just to keep in contact with the ground

quick pollen
#

nah im one level better than that

#

i set it to a fucking positive value

summer stump
quick pollen
#

it still flickers tho

earnest atlas
quick pollen
#

trust me

#

I have decent knowledge about antiviruses

polar acorn
summer stump
quick pollen
#

its always the last to get security updates

#

smth like malwarebytes is a level better at least

polar acorn
quick pollen
#

yeah for common malware

polar acorn
#

But really almost all malware gets stopped before it even reaches your machine

quick pollen
#

but get a funny usb stick plugged in or a directed attack and ur fucked

polar acorn
#

Just don't download free-bitcoin.pdf.exe and you'll be fine

#

At this point, receiving malware is a personal failing, not one of the machine

quick pollen
#

still protects u tho

#

whatever

polar acorn
quick pollen
#

its not #antivirus anyway

quick pollen
languid spire
quick pollen
#

there are funny chips in things like edited chargers or USBs that run a macro the second they're plugged in

polar acorn
#

Ain't no anti-virus in the world that can protect from a hardware connection and user who clicks "OK"

rich adder
#

yeah anti-virus is not anti-stupidity

quick pollen
#

thats true

#

but it can be

#

realtime protection

rich adder
#

besides theres more money in Web hacks like CC numbers and identity

polar acorn
#

You really just need something that can stop air-dropped malware from unblocked ads since that's the only kind the average user will ever encounter

rich adder
#

no one cares about your files anymore

#

people willingly upload their shit on cloud anyway

quick pollen
#

its still flickering

languid spire
#

there is no protection from people who dont read the simple messages their computer gives them, which appears to be about 95% of current users

quick pollen
polar acorn
polar acorn
eternal falconBOT
swift crag
#

you don't need anything else, especially not something that breaks Unity

summer stump
languid spire
#

nonsense

quick pollen
rich adder
#

yeah surely Microsoft engineers only know 10% of created viruses

quick pollen
languid spire
#

Defender is actually one of the better pieces of MS software

swift crag
quick pollen
#

yes defender does ask if u wanna run an application from an unchecked source

rich adder
quick pollen
short hazel
summer stump
#

You just clearly know little to nothing about antiviruses

rich adder
#

did not grow up in the dark ages of viruses

eternal needle
#

Windows antivirus is really good, it used to be shit which is why people still think it is.

#

If it was good in the past, I wouldnt have destroyed 3 family computers

polar acorn
languid spire
eternal needle
polar acorn
verbal dome
languid spire
#

Ah, silly, silly, children

rich adder
polar acorn
rocky canyon
# earnest atlas gravity doesnt works properly?

https://hatebin.com/yvyfghcuby
gravity works fine w/ a ground check when its structured correctly..
like digiholic mentions,

  • when its grounded you keep applying a downward force (something really small but enough to keep it grounded)

  • when you jump you cancel out the y velocity first so the player can move upwards (without being pushed down by the gravity it already had)

  • if its not grounded you add gravity to it to bring it back downwards.. (maybe a bit more than when ur just grounded

  • once it becomes grounded again it swaps back over to the small gravity force to keep it grounded

languid spire
#

mummy or daddys credit card @polar acorn

earnest atlas
#

? I had no issues with it

rocky canyon
#

oh mb wrong person

polar acorn
vernal plume
#

funny

polar acorn
quick pollen
#

the flickering at least

#

im stupid and tired

#

but mainly stupid

rocky canyon
#

welp, small victories are where its at

languid spire
rocky canyon
#

i maxed my first card out at TacoBell 😈

polar acorn
languid spire
rich adder
#

dam yall had CC growing up ?

frigid sequoia
#

Can I like get a gameObject by name but just withint the gameObject children?

rich adder
#

getting object by name is slow , inefficent and prone to break

polar acorn
#

If it's a child object you can probably just drag it in

frigid sequoia
rich adder
#

why would you not.. you are literally ensuring the object and reference is there.

languid spire
frigid sequoia
#

I dunno, I was actaully trying to avoid using the inspector for this kind of things

rich adder
#

if you're concerned about that visual space, things like [Header("Some category")]

languid spire
#

wrong

rich adder
#

or [Space(30)]

#

or something

#

these attributes help organize the inspector

polar acorn
#

it's pure upside

swift crag
#

I assign references when it is even slightly ambiguous what the reference should be

#

If I just need a list of every single component of type X that's parented to me, no matter what, I will go ahead and use GetComponentsInChildren.

rich adder
swift crag
#

If there is ANY deviation from that case, then I assign the references or write some more complex logic to find what I need

#

I will basically never do this for a single reference, too.

#

because...just assign the damn thing!

rich adder
#

see @frigid sequoia

frigid sequoia
#

Ok, so I should be using the inspector assignment whenever possible then?

swift crag
#

It should be what you favor.

frigid sequoia
#

I have to change a lot of things then, most of my stuff is searching for GameObjects with the playerController component by default

swift crag
#

Æugh

rich adder
#

hmm funny we were talking about viruses earlier

Due to a security vulnerability, the ability to insert FBX files has been disabled in 3D Viewer for Windows.

#

oof

night sparrow
#

Can anyone help me fix this My arms/guns are Showing through walls!

this is my Weapon Camera!

Not sure whats wrong at all

frigid sequoia
rich adder
#

why are you using the base struct for Bool lol

swift crag
#

i forgot you could do that

frigid sequoia
#

? I though that was just how the boolean look in when using it

swift crag
#

okay, so a few things I don't enjoy here

frigid sequoia
#

Sry, I am like very new

swift crag
#

just reference your NavMeshAgent directly

#

Same thing here.

#

You already have fields!

rich adder
swift crag
#

Just mark them with [SerializeField] and set 'em up

#

Why are you getting a GameObject here? I presume you need something more specific

#

like a PlayerController

#

I almost never have GameObject variables. I only use them when I can use literally any game object

rich adder
#

its okay in 1 script @frigid sequoia but then once you have many scripts doing this in start/awake then its a huge problem

swift crag
#

Like how System.Single is what you'd really call a float

frigid sequoia
#

Okey I would recheck everything later, thx guys

rich adder
frigid sequoia
#

So for "Boolean" I just use "bool" then?

rich adder
#

yup

frigid sequoia
#

What's the actual difference?

swift crag
#

None.

#

bool is a keyword that's used as shorthand for System.Boolean

polar acorn
rich adder
#

like int you wouldnt use Int32 even though it can work

#

more typing = less time eating pizza

frigid sequoia
#

Oh, ok, so it doesn't actually matter if I miss some here and there, is more that is just weird right?

rich adder
#

like if someone's name is Bobby, but prefers Bob. You can use both but they prefer Bob (ok maybe bad example because computer processes it the same and has no preferences 😆 )

quick pollen
#

yeah no it just wont work

#
        if (jumpCooldown > 0f) jumpCooldown -= Time.deltaTime;
        if (windup > 0f && Input.GetKey(KeyCode.Space)) windup -= Time.deltaTime;
        if (Input.GetKey(KeyCode.Space) && jumpCooldown <= 0f && !startedWinding)
        {
            windup = _windup;
            startedWinding = true;
        }

        if (windup <= 0f && Input.GetKey(KeyCode.Space) && jumpTime > 0f)
        {
            startedWinding = false;
            landed = false;
            moveVelocity += jumpVec;
            isBeingLevitated = true;
            jumpTime -= Time.deltaTime;
        }
        if(_controller.isGrounded && !landed && !startedWinding)
        {
            jumpCooldown = _jumpCooldown;
            landed = true;
        }```
#

no matter what I fucking try

#

the windup goes 0

#

and nothing happens

#

it doesnt start jumping

#

it doesnt do jack shit

#

jumpcooldown shouldnt start before you fucking land

#

but it starts before you even start jumping

#

no matter what I fucking do

rich adder
#

landing before u jump started?

polar acorn
#

I think you're overcomplicating this a bit. You want the jump to require you hold the button a smidge, and you want a certain amount of time on the ground before jumping again, right?

quick pollen
#

but the problem is

#

the jump is weird

#

because the height depends on how long u hold it down for as well

#

so u need to wind it up

#

set how long u wanna jump by holding it a bit

rich adder
#

well it doesnt even seem to go above 1.0

quick pollen
#

and then start falling once you either release the key or u run out of jump

quick pollen
#

the problem is

#

before you even get off the ground

#

it already sets that u landed already

#

because its fucked

rich adder
#

oh thought wind up is the distance u want to jump up

quick pollen
#

and if i dont set it to be landed

#

then it jumps forever

rich adder
#

how are you checking grounded ?

#

oh is just bools in keypresses

#

tisk tisk

polar acorn
median ruin
#

Is there a way to make the navmesh skip certain gameobjects?

polar acorn
#

From there you can start to "group" rules, and find repeated bits that can be extracted into external methods

quick pollen
#

rn it doesnt even fucking matter if you release the jump key

#

because nothing happens if you press it

polar acorn
#

Do you cancel the jump entirely?

quick pollen
#

nothing happens if you press it overall

#

so yknow

#

i know thatll cause an issue

#

but I can just set a flag

#

if GetKeyUp the jump key then set the windup to be cancelled

polar acorn
#

So, release the button before a windup period is finished causes you to just cancel the whole thing, right?

quick pollen
#

yes

#

wtf???????

polar acorn
# quick pollen yes

So, this seems like a state pattern. From the looks of things you've got at least four states:
Windup, Jumping, Falling, Landing

quick pollen
#

wait

#

im so fucking stupid its insane

#

my jump vector didnt even make me jump

polar acorn
#

You define conditions for when one becomes the other. Windup becomes Jumping if the button is held. Jumping becomes falling when you release it, or Landing if you hit the ground. Falling becomes Landing when you hit the ground. Oh, and a "neutral" state that windup goes to when you release the button, and landing goes to after the cooldown

polar acorn
quick pollen
#

its my 3rd rewrite of the entire fucking jump script

polar acorn
polar acorn
quick pollen
polar acorn
quick pollen
#

windup becomes jumping if the button is held for the amount of seconds yes

quick pollen
quick pollen
#

all i fcking wanted was a windup and a cooldown

#

and ive been here for 4 hours

#

over this bullshit

polar acorn
quick pollen
#

and it shouldnt have any effect

polar acorn
#

So, first off, I'd recommend doing some reading on the State Pattern (also known as a "Finite State Machine" or FSM)
https://unity.com/how-to/develop-modular-flexible-codebase-state-programming-pattern

Because this is what we're going to be looking at. You're going to want to create the states outlined above, and have each state be responsible for checking the inputs, timers, and other variables to decide when to transition from one into the next

Unity

Learn how the state programming pattern can help you build and maintain a clean, organized, and readable codebase.

median ruin
#

digiholic? I can't seem to be able to exclude objects from effecting the navmesh.. none of the forum posts seem to refer to anything helpful, can't find much on wiki

polar acorn
#

@quick pollen As an example, here's how you might code the windup state:

if (CurrentState == State.WINDUP){
  if (Input.GetKey(KeyCode.Space){
    currentWindupTime += Time.deltaTime;
    if (currentWindupTime >= windupTime) ChangeState(State.JUMPING);
  } else {
    DoJumpCode();
    ChangeState(State.IDLE);
    currentWindupTime = 0;
  }
}
quick pollen
#

jumpvec is STILL FCKING NULL

#

how the fuck???

mortal bridge
#

!code

eternal falconBOT
mortal bridge
#

Im sorry I have to use this

quick pollen
#

how is this fucking null????

polar acorn
quick pollen
#

I mean 0

#

sorry

#

but how tf is a constant that I set to be a fucking number zero

#

its literally here

polar acorn
quick pollen
#

whats the difference between me typing Mathf.Sqrt(_jumpHeight) and 4??

eternal needle
#

The sqrt of 2 is not 4

quick pollen
#

oh

#

wait

eternal needle
#

It is like 1.41

quick pollen
#

im so stupid

#

I meant pow....

polar acorn
quick pollen
#

not like it matters

#

im still stuck to the ground

#

even if its 954156

quick pollen
#

imma log jumpvec

polar acorn
#

Not like it'll break anything

eternal needle
#

You should be debugging a lot, and if its mysteriously changing to 0 then something is modifying it. Right click find all references to see what's affecting it

quick pollen
#

you know whats weird?

#

I tried logging moveVelocity

#

and appareantly I'm already flying

#

yet im on the fucking ground

#

im sorry

#

im too tired for the day

#

this shit is cursed

#

it should be flying up

#

after what I did

#

I literally wanted it to start flying up infinitely

#

but it doesnt

#

it stays on the ground

#

GameObject?

eternal needle
quick pollen
#

this is the only Move call in my script

quick pollen
#

moveVelocity is like the sum of all the velocities that I want to apply

eternal needle
mortal bridge
#

whats the problem here

vernal plume
#

everything became super choppy out of nowhere

eternal needle
#

A field? That would be referring to the variable in your script. A game object is an object in your scene, not a singular variable.

quick pollen
quick pollen
vernal plume
eternal needle
vernal plume
#

I'm restarting my PC cuz it has an update and I wanted to see if that may have been a cause but I genuinely don't know how it happened.

eternal needle
#

Field is a common name for it, but people would understand if you said in a variable as well

mortal bridge
eternal needle
#

Has nothing to do with the blue messages

swift crag
#

I'm not sure it really has a name

#

If you're talking about storing a GameObject in a variable, then yeah, it's a GameObject

mortal bridge
swift crag
#

but "object" just means "thing" -- you can store floats, ints, GameObjects, MonoBehaviours, Rigidbody, whatever

eternal needle
eternal falconBOT
verbal dome
#

That can be called caching

#

Usually in the context where getting that object is expensive, so you do it only once and store it in a variable

mortal bridge
short hazel
mortal bridge
#

It only says player doesnt exist in current context but I fixed it. still doesnt work

vernal plume
eternal needle
# mortal bridge I use visual studio

Yes so follow the instructions in the link. To be blunt, your code is nonsense and your IDE should be telling you that. Having a configured IDE is required to get help here

short hazel
trim gulch
#

Hi! I'm trying to make a Health Counter with hearts for a 2D game, but I don't know how to approach it.

I looked it up on the internet, but the only two options I've seen are, either making the Heart sprite tiled and cropping it accordingly to the health left, or creating a different sprite for every possible case and assining it manually.

None of them really convince me. Is there any other approach I could try?

vernal plume
#

do i just remove that deltatime part?

short hazel
#

Yep

mortal bridge
frigid sequoia
#

How can I assing a reference to component that is not on the Object that I am looking in the inspector?

eternal needle
vernal plume
rich adder
#

lock the inspector first

vernal plume
#

it instead just amplified my sensitivity like crazy and the movements still choppy

rare basin
#
private IEnumerator TestCoroutine()
{
   while(isAlive)
   {
      Jump();
      yield return new WaitForSeconds(2);
   }
}

would the code below be more optimized, because of caching, so it doesn't fill up GC by allocating new instance every iteration?

private IEnumerator TestCoroutine()
{
   var waitDelay = new WaitForSeconds(2);
   while(isAlive)
   {
      Jump();
      yield return waitDelay;
   }
}
frigid sequoia
#

Like I cannot drag from a child's component to the parents slot??

frigid sequoia
quick pollen
#

OMG

verbal dome
quick pollen
#

I think I got smth right

slender nymph
vernal plume
verbal dome
#

Yep, though if you have multiple components of the same type on the same object, then you need to do the lock thing

eternal needle
# mortal bridge

This shows me literally nothing. You seem to just be ignoring my messages that if you have no errors then your ide isnt configured because it should be showing you errors in your nonsense code

vernal plume
#

thing is theres no errors listed so i gotta find it myself

frigid sequoia
frigid sequoia
mortal bridge
rich adder
# frigid sequoia Oh, ok

also if you right click the script and hit Properties you dont have to lock inspector to drag something inside

#

it pops out the whole window

vernal plume
frigid sequoia
# slender nymph huh?

Like if I drag an object with for example a rb and a animator and I have slots for both, I don't think it assings it automatically

mortal bridge
vague dirge
#

Is it possible to make Vector3.SignedAngle outputs oriented angles ? So it goes untill 360 and not 180.

frigid sequoia
#

Not sure when it does work when just dragging the whole or item or doesn't though

slender nymph
rare basin
eternal needle
vernal plume
#

could it have anything to do with this?

mortal bridge
#

so is that all?

wind raptor
#

Is

if(ExampleGameObject){

}

the same as

if(ExampleGameObject != null){

}

?

mortal bridge
#

are there no problems in update methods codes?

wind raptor
#

Specifically, ExampleGameObject is the instance

#

Okay

mortal bridge
# mortal bridge

the last 3 floats seem sus to me. I think there are some problems there but I couldnt guess what

quick pollen
#

im so broken dude

#

30 fucking lines of code

vernal plume
#

and another note

quick pollen
#

and it just doesnt work

vernal plume
#

its not fps related

#

my fps seems stable, the characters movement itself is the only thing affected

verbal dome
mortal bridge
#

its from elsewhere

#

I wouldnt write this kind of code

mortal bridge
eternal needle
# mortal bridge I told you I fixed that earlier

Your message about what you fixed was completely unrelated to the error about the method name. Also you havent said what doesnt actually work.
Are you using chatgpt? I told you about not using void main already

mortal bridge
eternal needle
#

Tell your friend to start over from the basics and stop doing his work for him.

ivory bobcat
trim gulch
slender nymph
#

this is a code channel

polar acorn
mortal bridge
#

Finally found out

polar acorn
#

!cdisc

#

Wait they changed the command for that hang on

slender nymph
#

it's !cs now

eternal falconBOT
polar acorn
#

There we go

quick pollen
#

not like people talk there tho

mortal bridge
#

okay so is it forbidden here to ask outside the unity library?

quick pollen
#

directly, yeah

polar acorn
summer stump
polar acorn
#

Otherwise your answer here is going to be "Why isn't this a MonoBehaviour"

mortal bridge
#

okay. got it

quick pollen
#

but i remember one time the #chat being inactive for like 2 days straight

#

with only like 5 messages total

summer stump
mortal bridge
#

do they help with unity libraries there?

polar acorn
vernal plume
#

this is frustrating

ivory bobcat
quick pollen
#

lmao gigachad tho

#

i dont even wanna get close to assembly

#

i already struggle with c++ plenty

polar acorn
vernal plume
#

bro i genuinely dont understand this

quick pollen
#

tho i dont know where to go from mathematical shit at c++

vernal plume
#

out of nowhere the playermovement just stopped being smooht

mortal bridge
quick pollen
vernal plume
#

it isnt fps or camera based the movement itself is super choppy

quick pollen
#

that can cause weird shit

slender nymph
eternal needle
vernal plume
quick pollen
summer stump
slender nymph
quick pollen
#

if u make crouching by halving the size of the player

vernal plume
#

jesus christ

mortal bridge
vernal plume
#

allat for the dumbest solution

quick pollen
#

and the camera is parented to the character

vernal plume
#

no idea how

#

but i somehow moved the player under the cameraholder group

mortal bridge
prime cobalt
#

Is there a way for a cursor to follow your mouse position on a canvas in the worldspace?

quick pollen
#

u had issues figuring out main, we'll see about that lmao

eternal needle
quick pollen
#

if ur mouse position is always in the middle of the screen

#

i mean the crosshair

prime cobalt
#

It isn't always in the middle

quick pollen
#

well yeah

#

but if we're speaking generic shooter

#

actually i wont get into this cuz im tired and dont wanna waste peoples time

rich adder
prime cobalt
#

There's no actual movement, the game is kinda like fnaf where you stay in one spot.

verbal dome
mortal bridge
quick pollen
#

raycast then id say

verbal dome
# prime cobalt Yeah pretty much

Yeah Physics.Raycast, if it hits, convert that hit point into the screen object's local space. Then convert that into canvas coordinates

#

I guess.

prime cobalt
#

Ok I'll try and do that

verbal dome
#

Or hmm might as well move the UI cursor into hit.point? Not sure how worldspace UI works

quick pollen
#

have fun debugging the fucking universe lmao

rich adder
#

@prime cobalt

quick pollen
#

especially after what has just transpired

verbal dome
prime cobalt
frigid sequoia
#

You might call me dumb for asking this but... Does this Event System do anything? Like I don't remember adding it, and it has been there for so long that I am scared of removing it and breaking something XD

rich adder
slender nymph
summer stump
frigid sequoia
#

Ok, I don't have to touch it at all them right?

polar acorn
#

Correct

#

Unless you want to change which inputs control the UI navigation

frigid sequoia
#

I mean, I don't think that there is anything "interacteable" in that UI, can I remove it?

swift crag
#

There is no reason to remove it

#

unless you've managed to create multiple event systems

frigid sequoia
#

Is fine to have it even if the interface is just a recount of score and health for example?

swift crag
#

Yes. It won't blow up your computer.

frigid sequoia
swift crag
#

that doesn't mean to immediately delete everything that you don't recognize or that doesn't immediately have a purpose

summer stump
fierce shuttle
#

That sounds like a very vague question, there isnt often a "best" way to do a lot of things, since much of it depends on a lot of different factors - what are you looking for specifically? What do you need your objective system to do? What kind of objectives are you trying to make? How large/complex is this system? How do you plan to populate/create objectives? Do these objectives need to be saved or stored somewhere? Which part of the system are you having trouble with? If you havnt started anything yet or you dont have any specifics, then any "objective system" would probably be a good one, and thats not to sound harsh, just that theres many ways to approach problems and project setup and requirements play a bit part in that approach

cosmic dagger
prime cobalt
vernal plume
#

odd

#

if i make it so the horizontal speed matches on both a flat plane and a slope

#

i start to deal with bounce again

#

but if i dont add that bit

#

i stick to the slope like normal again

fiery notch
#

!code

eternal falconBOT
sour fulcrum
#

not sure which channel this is the most relevant for but building a dll for both runtime and editor but running into this problem where even though i explicitly reference the UnityEngine version of ScriptableObject in both the dll ExtendedLevel comes from and my editor script trying to reference it, it asks me to reference coremodule instead

#

Online I only found one post relating to this suggesting to just make two versions which seems a little psycho

cosmic dagger
sour fulcrum
#

yeahh but i think the one i need for runtime use is different than the one i need for editor use

#

found this message online which im trying to follow up now


I was taught how to deal with it.
The dll can be solved by using the one in the following location.
UnityEngine.dll:
/[UNITY_EDITOR]/Editor/Data/Managed/UnityEngine/UnityEngine.dll
UnityEngine.CoreModule.dll:
/ [UNITY_EDITOR] /Editor/Data/Managed/UnityEngine/UnityEngine.CoreModule.dll
UnityEngine.UI.dll:
/ [PROJECT] /Library/ScriptAssemblies/UnityEngine.UI.dll
verbal dome
#

Functions and booleans are everywhere

#

Nothing suboptimal about those

#

You could use OnTriggerEnter to detect when you enter an area, for example

#

And then display some UI text that tells the objective

#

Ofc it's still missing the objective logic itself

#

You need to think about its arcitecture, yes

#

Booleans don't really cost anything

#

I would probably make the objectives into separate objects that get added to the player's list, or set as current objective

#

Not necessarily monobehaviours, could be plain C# classes. Or instances of a scriptableobject

#

Can't really give any detailed suggestions without knowing how your game works and how you want it all to work

ivory bobcat
#

Bools and functions are completely fine relative to performance. If you're trying to make something extendable/complex.. you can opt for other solutions.

buoyant knot
#

the main cost is architecture

#

storing more shit means more shit to manage

upbeat yacht
#

Hi there, pretty noob in C#. I'm making a little shmup like where the player can move right/left and can fire a triple shoot. When the player flip on left i struggle a lot with the gizmos (fire points/origins of the bullets) that shoot up and down cuz there are not symetric at all with the player's right position/rotation. Have some advices or tips for flip correctly ? (i'm looking in quaternions or gizmos.matrix documentation but not sure at all) thx for ur time

buoyant knot
#

for adding booleans:
the performance and memory cost is completely negligible. but the cost to your ability to manage the state of the whole machine is NOT negligible

#

and that is the main consideration

ivory bobcat
cosmic dagger
carmine sierra
#

hi could anyone briefly explain how line renderer arrays work please?

ivory bobcat
#

How you should post !code

eternal falconBOT
carmine sierra
#

i mean just how that bit works

#

I get the rest

#

what is the bandPositions array for

verbal dome
#

It's not a standard thing, are you following a tutorial?

eternal needle
#

It's just an array, seemingly of transforms. It has absolutely nothing to do with line renderers specifically

verbal dome
#

I assume they are transforms

ivory bobcat
carmine sierra
#

yeah woops

verbal dome
#

It seems to be using transforms as a source for the positions for the linerenderer. Presumably so they are easier to edit than adjusting position values in the inspector/code

carmine sierra
#

if i put in an element 2 as one transform component (for example the center between the bands) how could i reference that

#

in a line of code where id set the bands index of 1 vertex to that element

ivory bobcat
#

Maybe lookup a tutorial

verbal dome
#

So myArray[2]

carmine sierra
#

like lineRenderers[0].SetPosition(1, bandPositions[2].position);

verbal dome
#

Note that the first element is 0

#

Second is 1, and so on

ivory bobcat
#

I'm not really understanding what you're wanting to do. Simply tryitandsee . You'll immediately know if what you're doing is practical/doable.

buoyant knot
carmine sierra
shell sorrel
#

though i would look at if flags are better with that many

verbal dome
shell sorrel
#

but not for perf reasons just for keeping it cleaner

buoyant knot
# shell sorrel 19-20 is still nothing

it is when you have to juggle combinations of booleans being set true and false, while others change the flow for others being set true or false…
It’s part of why player movement scripts can get very complex

shell sorrel
#

though really it sounds like you should just be using a fsm

buoyant knot
shell sorrel
#

but like would worry about just keeping it clean and easy to understand

ivory bobcat
shell sorrel
#

like at work the main character class and its support data structures like like 5 or 6 kloc

#

and its all still fine

buoyant knot
verbal dome
#

TIL what kloc is

shell sorrel
verbal dome
#

Yep I did google it 😄

ivory bobcat
#

Just make it readable.

buoyant knot
shell sorrel
#

but yeah anyone worry about performance, the order you do things is
make it work, make it clean then only make it fast if required after profiling

verbal dome
thorn kiln
#

Whats the easiest way to tell an element of a prefab to move to the right a bit on a trigger?

verbal dome
#

And do you want it to actually teleport instantly

night sparrow
#

Why does my code Debug.Log() Blank!

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

public class MainMenu : MonoBehaviour
{

    public static MainMenu Instance;

    public GameObject UICam;
    public GameObject Menu;
    public GameObject Play;
    public GameObject ChangeName;

    void Awake()
    {
        Instance = this;
    }

    public void OnNameChange(string _name)
    {
        Debug.Log(_name);
    }

    public void OnPlayPress()
    {
        Debug.Log("Pressed Play!");
    }
}

UnityEngine.Debug:Log (object)

I have the Input detect On Value Changed with string set up to the Main Menu script to the OnNameChange function

thorn kiln
verbal dome
shell sorrel
#

guessing you are expecting to pass data along in the event?

north kiln
verbal dome
night sparrow
thorn kiln
verbal dome
#

You should add to it +=

#

So transform.position += someVector
Which is just shorthand for transform.position = transform.position + someVector

harsh sandal
#

Newbie question. How do most people handle saving stuff in scenes? Like i have procedural terrain generation, Is simply deactivating the chunks to unload and save them sufficient or do i need a proper save system?

#

Or should i be finding a way to store the data to a file or something for long-term and just read off it to generate what i need? Completely new to this part tbh

verbal dome
#

You could either store all the terrain data in a file, or just use the same random seed to generate it again

#

You're talking about runtime, right? Not in edit mode?

harsh sandal
amber veldt
#

Making them a prefab is an option?

harsh sandal
verbal dome
harsh sandal
verbal dome
thorn kiln
verbal dome
#

new This() is calling a constructor

#

Which is what you want

thorn kiln
#

So how do I make it move to the right an exact amount?

shell sorrel
#

what do you mean

#

you just create a vector with the value you want

#

transform.position += new Vector3(1, 0, 0);

rocky canyon
#

new Vector3(0,0,0);

shell sorrel
#

though in your example case you could just do transform.position += Vector3.right;

thorn kiln
#

Well yeah, but that doesn't let me get it down to the pixel where it ends up

shell sorrel
#

figure out exactly where you want to put it

#

set its position to that

rocky canyon
#

ur setting the position.. thtas what transform.position is.. its the

shell sorrel
#

if you want to do it over time so it smoothly moves there, use a lerp

rocky canyon
#

you can set it to be exactly anywhere u want it to be

#

use a variable.. use the variable instead of hardcoded magic numbers.. and u can just tweak the value in the inspector until it is exactly where u want it

shell sorrel
#

or find a procedural way to get the point

verbal dome
#

Since this is called from OnTriggerEnter, you need to add an offset while taking into account the trigger's position

#

If you want it to be precise

#
Vector3 pos = transform.position;
pos.x = thatTrigger.transform.position.x + someFloat;
transform.position = pos;```
#

You are using OnTriggerEnter right? @thorn kiln

thorn kiln
#
    private void OnCollisionEnter2D(Collision2D collision)
    {
        if (collision.gameObject.CompareTag("projectile"))
        {
            StartCoroutine(MyCoroutine(lowerPipe));
            spriteRenderer.sprite = buttonPressed;
            transform.position += new Vector3(2, 0, 0);
        }
    }```
verbal dome
#

(Sorry other josh that i pinged)

thorn kiln
#

Im basically just changing a buttons sprite when I shoot it

verbal dome
#

In that case it looks correct. Just need to tweak the vector value to your liking

#

Could make a serialized Vector3 and tweak that from the inspector

verbal dome
thorn kiln
#

Well I want it to go from -5.01 to -2.23

verbal dome
#

So what is (-2.23 - -5.01)

cosmic dagger
thorn kiln
#

It doesn't like decimals.
"Argument 1: cannot convert from 'double' to 'float'"

amber veldt
#

Hey guys, how would you store a local position y value at a certain frame? And use it later as a direction? Not sure if I'm precise...

thorn kiln
#

2 also already moves it too far, so that's confusing

cosmic dagger
timid badge
#

What PC build would be the best for making games, under $400.

summer stump
summer stump
amber veldt
#

!code

eternal falconBOT
amber veldt
#
    {
        if (ninjaTimeMB.NinjaIsShootPressed && arrowInstanceGO != null)
        {
            StartCoroutine(MoveArrowInstance(arrowInstanceGO));
        }
    }


    IEnumerator MoveArrowInstance(GameObject arrowInstanceGOParam)
    {
        // Vector3 directionOfTheArrow = 

        while (arrowInstanceGOParam != null)
        {
            arrowInstanceGOParam.transform.Translate(Vector3.up * arrowSpeed * Time.deltaTime);
            yield return null;
        }
    }```
shell sorrel
#

cs goes on its own line

amber veldt
#

oh okay

summer stump
amber veldt
#

For multiple instances of arrows, no?

shell sorrel
#

yeah but it never ends

summer stump
#

Looks like for the same instance of arrow
Can't tell from this alone though

amber veldt
#

Yes there is a Destroy(arrowInstanceGOParam) somewhere

#

Isn't that enough?

spiral narwhal
#
public static class StateChangeList
    {
        private static readonly List<IStateAction> _changeActions = new();

        static StateChangeList()
        {
            SubscribeAll();
        }

        public static void Clear()
        {
            _changeActions.Clear();
        }

        public static IStateAction[] GetAll() => _changeActions.ToArray();

        private static void SubscribeAll()
        {
            DrawService.OnCardDrawn += SubscribeDrawEvent;
        }

        private static void UnsubscribeAll()
        {
            DrawService.OnCardDrawn -= SubscribeDrawEvent;
        }

        private static void SubscribeDrawEvent(int ownerIndex, CardSO drawnCard)
        {
            Debug.Log("Ok");
            _changeActions.Add(new DrawAction
            {
                OwnerIndex = ownerIndex,
                DrawnCard = drawnCard
            });
        }

Why doesn't the subscription work? Ok is NOT printed to the console

shell sorrel
#

also will run mulitple times on the exact same arrow

amber veldt
#

Got it, will fix it

#

My question was about the direction of my arrow

shell sorrel
#

and will fight with the other coroutines over its position

queen adder
#

the thing is, dont mix Update and coroutine if you dont know what it's doing

amber veldt
#

I want to move it along its local Y axis

#

Meaning adding Vector.up basically

shell sorrel
queen adder
#

in this case, it will likely make the bullet very fast

amber veldt
#

it's in glocal no?

#

transform.up is in World Space?

shell sorrel
#

Vector3.up is world

thorn kiln
shell sorrel
#

transform.up is local up axis

amber veldt
#

It does not work in my case

#

Kinda drives me crazy

shell sorrel
#

oh dont use translate

amber veldt
#

Bad idea?

shell sorrel
#

well you can adjust local position

#

or you pass the 2nd arg to translate

shell sorrel
#

public void Translate(Vector3 translation, Space relativeTo = Space.Self);

amber veldt
#

it says "green axis of the transform in World Space"

#

Not local space

shell sorrel
#

says where?

#

the green axis in the scene view being world or local depends on your viewport settings

amber veldt
#

yes

#

But how do I get the local green axis inside the code, is my question

summer stump
amber veldt
#

if I press global, it will always be up

#

(world space)

thorn kiln
#

Okay, I think it's... going into the pipe? Not disappearing

shell sorrel
#

code is not effected by that

amber veldt
#

If i press local, I get the axis I want in green

shell sorrel
#

translate works in local space unless you tell it to use world space

amber veldt
#

Do you mind looking at a screenshot?

shell sorrel
#

otherwise its just a matter of using local or world position

#

vector3.up is world up transform.up is local up

thorn kiln
#

I can't figure out what number this thing is looking for me to tell it to determine how much to move to the right using a number I can easily find

amber veldt
verbal dome
amber veldt
#

transform.up is the green axis of the transform in World Space, sorry but I don't get it

#

Trying to read the documentation but it's driving me crazy

shell sorrel
#

transform.up is the local space green axis on a object

verbal dome
# verbal dome So what is (-2.23 - -5.01)

Here @thorn kiln Goddamnit I pinged the wrong josh again
Just calculate it with a calculator or something. Then put that value into a variable and use that variable in your Vector's x parameter

shell sorrel
#

Vector3.up is world up

thorn kiln
verbal dome
#

Make sure it only runs once

queen adder
#

magic numbers UnityChanOops

thorn kiln
#

I could keep messing with it until I find the exact number, but that seems woefully inefficent

eager meadow
#

I have been unintentionally summoned

verbal dome
#

Either a float or just a Vector3

verbal dome
#

Welcome to the josh meeting

frigid sequoia
#

You guys told me I should avoid to use references by name, is there a way of doing this without that, or this is fine?

slender nymph
#

Camera.main exists

frigid sequoia
#

How can I set which is the main camera?

amber veldt
cosmic dagger
frigid sequoia
#

I mean, I am only using one, but just in case I wasn't

shell sorrel
slender nymph
shell sorrel
#

also you are calling GetComponent to see if something is null literally throwing away that reference then calling it again

#

hold it in a temp var, or use TryGetComponent

shell sorrel
frigid sequoia
verbal dome
#

Yep, you can instantiate a prefab by its component. It will spawn the whole prefab @frigid sequoia

shell sorrel
frigid sequoia
verbal dome
slender nymph
shell sorrel
#

but yeah all get components in that can be avoided as well as the camera find

cosmic dagger
shell sorrel
# frigid sequoia What do you mean by that?

your showDamageUIPrefab you have as a GameObject, make it be the type of the component you want on the prefab. if you do that when you instantiate it returns that component reference on the instantiated prefab not the gameobject

thorn kiln
verbal dome
#

Nice progress btw

cosmic dagger
thorn kiln
#

For it to move an exact amount. It's moving too far to the right and into the pipe.

wintry quarry
#

Use that object's position in code

verbal dome
#

Empty object is an option too.

thorn kiln
# verbal dome Nice progress btw

Thanks, Im basically done. Adding in a "pressed button" change was supposed to be a victory lap, and it's taken loger than even adding the high score function.

verbal dome
#

Another reason that I can think of why it moves more than you expect is that you have scaled the parent pipe

#

The pixels do look a bit streched horizontally

thorn kiln
#

If I set it to 1.5f, it only goes in this much

#

So there's a magic number somewhere, I just need to know how to find it logically

verbal dome
#

You could also just make a serialized Vector3 and set its local position to that

thorn kiln
#

The pipes and button are scaled, yes

verbal dome
#

I still think your pipe is scaled unevenly though

#

Yeah

#

That's why the localPosition when you were testing, doesn't match what you set the position to

wintry quarry
verbal dome
#

Because the local position gets scaled by the parent pipe's scale

frigid sequoia
verbal dome
frigid sequoia
verbal dome
cosmic dagger
#

you can reference the main camera at any time, that's not an issue . . .

mild osprey
#

If I don't see "Console App.Net Core" then what do I choose instead?

slender nymph
verbal dome
mild osprey
# cosmic dagger 🤔 context?

Reading from the guide I was told to check out instead of Unity Learn. One of the steps says create a new project in VS with Console App .Net Core but it's not showing

slender nymph
#

that doesn't sounds like a unity learn step 🤔

verbal dome
#

@thorn kiln Try to write the code for that, if you can't we can help.

mild osprey
frigid sequoia
slender nymph
mild osprey
cosmic dagger
slender nymph
mild osprey
mild osprey
#

But if I'm asking in the wrong place point me in the right direction please lol

slender nymph
#

!cs

eternal falconBOT
summer stump
#

Was it me, sending you to w3schools?

cosmic dagger
finite chasm
#

hello. noob question, but how can i find all of the bones in my list of bones and print them out using a Debug.Log() statement? when i simply do Debug.Log(chain), it just prints out the reference to the list, "Kinemation.FPSFramework.Runtime.Layers.BoneRef" instead of actually printing the list content out. same with doing it with a foreach statement. anyone know?

mild osprey
thorn kiln
#

Okay, finally Im done

summer stump
frigid sequoia
verbal dome
#

Maybe you are just reading everything in an angry tone

slender nymph
mild osprey
summer stump
#

I figured it was me that sent you somewhere, so I was trying to verify

summer stump
cosmic dagger
mild osprey
#

Could have simply told me that maybe I'm not in the right place.

verbal dome
#

Huge misunderstanding

summer stump
mild osprey
#

Ok well sorry I guess if I'm overlooking it. Definitely seems like something I would say if it was being condescending

#

My bad

shell sorrel
#

in gamedev and programming you will find a lot of people are fairly blunt in their language

#

its nothing against you or anyone

verbal dome
#

We can all still make efforts to not sound like a cunt. But this was just a misunderstanding

mild osprey
summer stump
#

And... i've been blocked I guess...
Kinda shocking, I thought I was being the most helpful here lol

mild osprey
shell sorrel
#

i only been loosely following but think people were missing context of what guide you were following asking for the .net console app stuff

mild osprey
#

Sorry, I've had to block too many people previously

frigid sequoia
#

Am I missing something?

slender nymph
shell sorrel
thorn kiln
#

I'm gonna regret asking this but... how would I make my highscore display "Highscore: {number}" instead of just a number?

slender nymph
#

pretty much exactly that but with a $ before the ""

finite chasm
frigid sequoia
mild osprey
rich adder
#

$"Highscore {highscoreVar}"

verbal dome
slender nymph
frigid sequoia
#

So it should be something like that isn't it?

finite chasm
shell sorrel
rich adder
#

IFormattable 😁

slender nymph
#

or if this is your own type, then go override ToString in that type to return a string containing whatever info it is you want to display

cosmic dagger
finite chasm
slender nymph
#

is this a type that you created?

finite chasm
#

i don't understand your question, sorry

rich adder
#

i guess thats no

slender nymph
#

did you or did you not type the code that defines the BoneRef struct

finite chasm
#

ohh

#

yes, i did.

#

well, part of it. most of it is from a FPSFramework

slender nymph
#

then override ToString in that struct and have it return the name of the transform

slender nymph
cosmic dagger
frigid sequoia
#

I have been instantiating everything as a GameObject for a while now; this is way more effcient now....

verbal dome
#

Yeah, instantiating with a direct component reference is sadly not common knowledge

#

Among beginners I mean

rich adder
#

wait you can override ToString without IFormattable ? huh TIL

cosmic dagger
slender nymph
#

yes, it's declared on System.Object

thorn kiln
#

There, I'm officially bloody done with flappy bird

rich adder
#

Ah that makes sense, no idea why that slipped me

#

here i was doing twice the work lol

thorn kiln
#

I dont know why I always end up doing gamedev right before work, when I should be sleeping

finite chasm
rich adder
#

or which name do you want to print

verbal dome
rich adder
thorn kiln
#

Yeah, I've had dreams like that

slender nymph
cosmic dagger
#

that's what i try to get them to understand . . .

finite chasm
#

i did not mean to write that, lol. im all over the place

cosmic dagger
#

if it's a struct, it has to exist on a Component or C# class . . .

finite chasm
#

im so tired im pretty sure ive made many errors already

cosmic dagger
#

now i'm confused?

finite chasm
#

about what?

finite chasm
sage thunder
#

Hello, I am new to Unity and trying to get oriented. I'm trying to find where I go to write code that alters the geometry of a character. For example, if I want to take the current position of the character's vertices, do vector math on them, and then set a new position. The goal is to recreate some setups I have in Blender's geometry nodes within Unity (custom geo modifiers.) I know how to write the code for the logic, I just don't know where in unity I'd go for this sort of thing.

rich adder
#

where is supposed to get name from, you have to specifiy

verbal dome
slender nymph
finite chasm
#

ill have to research how to do that because i am unsure

#

thank you!

sage thunder
frigid sequoia
#

I am being kinda annoying now, but for this kinds of things is more efficient to check for the name of the object, the components in it, the layer or it doesn't really matter much?

slender nymph
#

do not rely on gameobject names for logic. check for a tag or a component

finite chasm
#

hahah thats the page i just clicked on, thanks!

rich adder
#

if you want to know all c# has to offer I suggest look through those

frigid sequoia
rich adder
#

saves you null check and ensures you only use component when it finds it

#

eg cs if(other.TryGetComponent(out PlayerController player)) { player.DoSomething(); }

frigid sequoia
rich adder
#

well depends if other is collider then its ok, but yeah if its Collision then you need .gameObject for example

#

see how the <PlayerController> is diff green more darkened

#

its telling you it can already Infer the type from the out type you passed

frigid sequoia
#

Oh, I though the other was just a reference to the collider and I needed to tell it to check for its GameObject

#

But it seems to let me remove the .gameObject

shell sorrel
#

in TryGetComponent you only need the <T> part if you used var isntead of a typename after out

#

C# in alot of cases is good at infering the type arg from the method paramaters

rich adder
#

You can do it on all Components

#

if you use it on OnCollision it gives you a Collision type which isn't component so you would need the .collider or .gameObject

wintry quarry
frigid sequoia
#

Why would it let me TryGetComponent from a collider if it just returns... the collider?

#

Seems kinda weird

rich adder
#

wdym it returns the collider?

#

Collider is a component

#

All components are on gameObjects, so you can GetComponent from any other Component

frigid sequoia
#

So GetComponent from a component is the same than GetComponent from its GameObject then?

rich adder
#

if its attached to the same object it works the same

rich adder
#

it looks for it on the gameobject that has that component you GetComponent from

cosmic dagger
cosmic dagger
frigid sequoia
#

Man, I am not progresing at all with this one project, but I am learning so much

shell sorrel
#

is learning not progression?

frigid sequoia
#

Like I am looking at code from a month ago and I am like... wtf was wrong with me?

shell sorrel
#

yeah that never stops, i been programming most of my life and still find that once and a while

frigid sequoia
cosmic dagger
frigid sequoia
#

I am fine with that though, the main goal I had with this one was to do something that was a bit bigger and problably a mess but get to know how doing something more than just a minigame is like

shell sorrel
#

when you come back to project with more knowldge it will move a little further and old problems with move a little faster

#

there is no just knowing everything, its all a cycle of hitting a problem, doing research and learning about the problem then implementing something

#

also bigger things are just lots of small things combined

rich adder
#

its like going from Play-doh to Marble Sculptures

frigid sequoia
shell sorrel
#

yeah 3 months is not a very large amount of time when learning a new skill

small mantle
#

I have two objects that move within a GameObject, however I want the parent GameObject to follow the position as the children. I am going to be switching between these two children objects, how can I make the parent be at the same position as the children actively?

rich adder
#

what is it you are doing, like what kind of game mechanic

#

making parent follow children goes against the whole parenting thing..

small mantle
sour ruin
#

Hi, curious about linking animation events between different game objects. My hierarchy is Player/Model with the PlayerController on player and the Animator on model. I've put my AnimationEventReceiver on the model which I have attached as an image. The functions JumpAddForce and SetCanMove are called by animation events in the animator. These events call the respective events JumpForce and Land and I pass the animationeventreceiver component to player controller which can then read the public events. I'm just getting into the event system and I'm not sure whether or not this is a good way of doing this?

slender nymph
small mantle
#

The shifts cannot be the same object as I want flexibility with the components

frigid sequoia
#

If the component is on the child of a gameObject, I cannot instantiate that component by that component right?

slender nymph
cosmic dagger
slender nymph
shell sorrel
small mantle
shell sorrel
#

like i often have a component on the root of the prefab, i will instantiate that than call a init method on it to ask it to setup everything in the prefab

rich adder
#

other than that I pretty much do the same thing

shell sorrel
#

JumpForce?.Invoke();

#

otherwise if nothing subs it will null ref on invoke

frigid sequoia
#

The DamageRecountCanvas has the followGameObject script (cause it is the canvas what should be looking towards the camera), but the Damage has the actual script that controls the whole thing, it works with an animator (and does other stuff like setting the text, or the size of it), and when the animator finishes the animation, it calls the method to destroy the whole canvas with an animation event, but it can only call it if they are in the same Object if I am not mistaken, so I don't think I can move them without remaking the whole thing

shell sorrel
#

but that script could always have reference to a other script and call its methods when it gets a animation event

frigid sequoia
#

So I make a script with just a method to the destroy the GameObject to use mainly just as a command for animation events?

shell sorrel
#

yeah could work

frigid sequoia
#

I literally just noticed that with SerializeField the references do appear in the script itslef, when inspecting it before attaching it to anything, it doesn't do that when they are just public but not serialized, or maybe I did and I was blind all this time

summer stump
frigid sequoia
#

I mean, public always shows in the inspector when the script is attached, but I did not noticed that references could be directly set from the "script asset itself"

frigid sequoia
#

I don't know if it is only when serialized

summer stump
frigid sequoia
#

Why would I want to set a default reference to the script?

summer stump
wind raptor
#

I have an array of ObjectA and an array of ObjectB. Each instance of ObjectB has a reference to an instance of ObjectA from the ObjectA array.

Setting aside that this I have something ass-backwards going on, given an instance of ObjectA, what is the fasted way to get the instance of ObjectB which has the ObjectA instance referenced? Seems like iterating over the array of ObjectBs and comparing each ObjectA instance can't be right...

frigid sequoia
#

Seems usefull, dunno

eternal needle
#

Other than that, I dont really use it

thorn kiln
#

This might be a weird question, but how hard is something like sonics homing attack to code?

eternal needle
frigid sequoia
#

It doesn't let me assign a List of variants of the same thing though, it doesn't show even when serialized, weird

thorn kiln
rich adder
thorn kiln
#

Have you never played a sonic game?

teal viper
#

I don't think there was such a feature in the classic 2d games

rich adder
#

im old, i played sonic when it was 2D

teal viper
#

But it's not hard, just get the direction to the target and move towards in the preferable way.

summer stump
#

I also remember nothing like that in sonic

rich adder
thorn kiln