#💻┃code-beginner

1 messages · Page 365 of 1

dense root
#

If Im checking for colliders in the long grass do I want to use Update or FixedUpdate?

timber tide
#

with what method

shy ruin
#

No way

#

I solved it

timber tide
#

honestly, if you're not shooting projectiles at 50+ units a second you can use either

shy ruin
#

I was changing the transform of the player, which held the camera, and then I set the camera to the correct rotation. They conflicted with each other it seems.

#

Someone gotta write that down.

queen adder
#

anyways, is there a way i can have a float[] with multiple slider like this?

#

in editor

timber tide
shy ruin
#

I also got a lighting problem that only occurs in the Build.

timber tide
#

so then you probably* had some race conditions on the execution ordering

shy ruin
#

No idea why this happens on the build 😭

#

Not in the editor

timber tide
shy ruin
#

oop

eternal needle
lavish magnet
#

How should i modify this alpha value?

glossy turtle
lavish galleon
#

Is anyone available for like 3 min? that knows about A* Pathfinding, Ill share screen to make this faster, but I am having an issue where if i have multiple units, and they collide (40 units) they start floating, Im also usin a rigidbody for the colliders

dense root
#

How do I avoid using a RigidBody2D for my TileMap?

private void CheckForEncounters()
{
    if (Physics2D.OverlapCircle(transform.position, 0.2f, grassLayer))
    {
        if (Random.Range(1, 101) <= 10)
        {
            Debug.Log("Encountered a wild pokemon");
        }
    }
}
#

So I can run through the grass as intended, instead of being blocked by the RigidBody

lavish magnet
glossy turtle
lavish magnet
#

Yes the code works gbut the zombie doesnt become trasnaprent

#

Alpha is 0 but its still visible

glossy turtle
eternal needle
lavish magnet
#

I want a smooth fade out

lavish magnet
eternal needle
#

It would have to be transparent but there are other issues if you make it transparent. Like you'll see the arm render through the body

lavish magnet
#

I made the surrfcae type transparent but now I just cant see the shadows?

eternal needle
# lavish magnet

Well yea there are issues with making it transparent, as I said. Look into other methods like possibly dithering

#

This would be more of a shader solution

lavish magnet
#

Its really this hard just to make something fade out 😭

eternal needle
#

I wouldnt call this hard, considering it's just the first thing you tried that didnt work.

glossy turtle
lavish magnet
glossy turtle
lavish magnet
#

Rendering Mode? Thought you meant surface type

eternal needle
lavish magnet
#

i dont know where rendering mode is

glossy turtle
#

apply a standard shader and change it to fade

lavish magnet
#

im in URP

glossy turtle
#

you need to learn shader graph if in urp.

#

writing custom shaders. etc.

rocky gale
#

is 20-30k batches a lot

eternal needle
void seal
#

Would a coyote timer best be put into void Update()?

willow scroll
#

Then yes, you can put it into Update

void seal
#

Gotcha. Still getting acclimated to the Unity API again. Been a hot minute.

summer stump
#

Update makes the most sense though for something like that imo

eternal needle
willow scroll
void seal
#

Gotcha. Yeah doing something simple. 0.0 on ground with += Time.deltaTime and then a check for amount of time passed.

eternal needle
#

I really wouldnt go with a coroutine here. You're likely checking if the player is grounded anyways, during this same check you can just store a float saying what time is still valid to jump. Like Time.time + someAmount.

void seal
#

Ye. I like that approach because it's pretty universal and not spaghetti.

willow scroll
#

Coroutines are never spaghetti UnityChanFrustrated

viral shadow
#

hey can someone please help?

wintry quarry
void seal
#

Wasn't referring to courtines specifically. I respect what they bring to the table.

viral shadow
wintry quarry
#

new Color() is to create a Color object

#

you don't want to do that

#

you just want to call a static method

viral shadow
#

ohh so no new needed

wintry quarry
#

new is only for creating objects

viral shadow
#

hmm im getting this error now

wintry quarry
willow scroll
# viral shadow meaning?

Static methods don't have an instance of the class created. Instead, reference the class to access them directly

viral shadow
#

so no brackets

#

thanks so much

wintry quarry
viral shadow
#

sorry im very very new

willow scroll
viral shadow
#

and how do I get a random value?

#

figured it out

void seal
#

I'm mostly rubber-ducking here but I think this would be the spot where I run the check for the coyote timer, yeah? Not currently worrying about double jumps at the moment for it, just my jump count leaving a ledge. If jump count = 0 and coyote timer is not equal or greater than "insert value here"?

ruby flower
#

Im new what is the difference between if and boolean

#

When do you use them

solar agate
summer stump
stray pivot
#

in other words boolean is a variable if is a statement

eternal needle
ruby flower
#

But i want to become Game dev

#

I learned Blender past 2 months

#

Now coding 💀

eternal needle
#

just so i can put it into perspective, a blender comparison would be giving someone whos never used a computer blender and told them to make a full character model.

ruby flower
#

For starting

#

I know the ui and Where i Can find all the stuff

#

Know some of the small basics

ruby flower
#

And That’s how i started

eternal needle
#

otherwise for unity specific, there is the !learn site

eternal falconBOT
#

:teacher: Unity Learn ↗

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

ruby flower
#

Oh really?!

#

Didn’t Even know that

#

I am going to take a look but it is early so i am first going to eat lmao

#

The Junior programmer coarse:O

quasi sparrow
#

Hey guys , what's the best free course for unity LTS

fossil drum
#

Just start with the courses pinned in the top right.

burnt vapor
#

Next time you encounter an error when you expect it to work, you can often Google Unity's source code like with this

#

Doesn't apply to everything, though

tulip edge
#

i'm following Brackey's tutorial on the first person camera movement, this Mathf.Clamp here is setting my camera rotation to 90 whenever i start the game, this means that the camera will look down.
If i start moving my mouse then the script will work as intended but i need a way for the camera rotation to start on 0 and not 90

deft grail
tulip edge
#

i need the x rotation to START on 0, sorry

deft grail
tulip edge
#

nope, won't do, because in the very first frame the rotation gets set from 0 to 90

deft grail
tulip edge
#

didn't change anything

deft grail
tulip edge
#

i added it hoping it would fix it, but no, it's useless actually, because even if the rotation gets set to 0 in start, t will be set to 90 in the first update loop

void thicket
#

Does your object have parent?

deft grail
void thicket
#

I don’t think that will clamp to 90

eternal needle
tulip edge
#

ok, found the solution... this might be an editor only issue, if you start the game in the editor and keep the mouse pointer above the game windows, then the rotation will be ABOVE 0

#

this means that the starting rotation of the camera is dependant on the mouse cursor position

eternal needle
#

Theres definitely more issues than just that, if what you described is one.

tulip edge
eternal needle
#

Just a side note, mouse input shouldnt be multiplied by delta time. And same as what gr4ss said above, you shouldnt be directly setting values xyzw of a quaternion (which was done in start) These arent euler angles, so the quaternion you had there was actually invalid

tulip edge
#

alright, i see

idle elk
#

Hi my name is ikmal .. can you help me solve this problem ? im using playerprefs to save and load stoned to others scene .. this game have 5 level and need to collect 1 stone from each level before can colllect the stone player must collect all the calorie then the stone can be collect and go to next level .. after collecting the stone player can see all the stone at others scene name "pyramid stoned" the problem is only 1 stone level 1 save and appear at scene pyramid stoned the rest dont appear .. in debug say the state is same for all stone ..how to solve this?

You can see the script below

https://pastebin.com/jysWPVkh

https://pastebin.com/8PhaYNTz

idle elk
#

Sure wait

ivory bobcat
#

Put a comma and the variable stone after the logs in set stone visibility.cs Debug.Log("...", stone);//Example

#

Then click on the messages in the console and see which objects in the scene are highlighted.

#

Single click

void thicket
# idle elk

FYI PlayerPrefs persists across your levels

#

It’s not like they have separate save per scene

idle elk
#

Do i need to separate save each level so they can display all collected stone?

void thicket
#

Or make proper save file system

#

PlayerPrefs are not for savefiles in the first place

blissful spindle
#

hi, I want to ask for help I am trying to add some kind of recoil to my script so the bullets dont travel in the same direction, any ideas on how to add random offset to the bullet so it goes a little bit to the right or left(that would depend on randomization) https://hatebin.com/aadainnaea

keen dew
#

You have to fix all compiler errors before it appears

#

Find what?

#

Open the console

#

The script is missing the using UnityEngine.SceneManagement; statement

#

Configure the !IDE so that it shows the errors while you're writing the script

eternal falconBOT
upper forge
#

hi guys, i have this script which is attached to my coin prefab which gets spawned with my "Spawner" empty GameObject, which is executed every two seconds, the script is meant to destroy the Coin everytime it collides with an object with the tag "Player" but does not work.

using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;

public class collisionCheck : MonoBehaviour
{
    public GameObject coin;
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.CompareTag("Player"))
        {
            Destroy(coin);
        }
    }
}
#

nevermind, turns out isTrigger wasn't on

#

works now

keen dew
#

If this script is on the coin you can just do Destroy(gameObject)

upper forge
trail gull
#

I have a 2d enemy sprite navmesh, how would i make them jump over a gap instead of just gliding over the gap? No special animations, just up and down

#

I want to see them go up and down rather than just 'walking' over the gap

trail gull
#

Not a sprite navmesh

#

Just a navmesh but its a 2d character

teal viper
#

What? A character is a navmesh??🤯

#

Do you mean a "navmesh agent" perhaps? Because navmesh is the thing that it walks on.

trail gull
#

Yeah

teal viper
#

Ok, well, you could use trigger colliders to detect when you character gets close to the gap and execute a jumping animation.

lost summit
#

its possible to change size of cube to match camera viewport size? what I want to cube always be inside viewport facing only one side

#

match size of face 1 with camera viewport on 2

halcyon shard
#

Hey guys! Trying out the unity beginner course and decided to mess around with the prototypes given, but I keep coming into some clipping issues with the boxes. I was just wondering why this happens and how to avoid it in future endeavors.

#

Apologies for the lack of a gif or video, I have no idea how to record, fit and upload that onto discord

fossil drum
#

My guess is that you move the truck without the Physics methods, but without code its hard to tell.

#

Can you post the !code?

eternal falconBOT
halcyon shard
#

I did indeed, I just put a simple transform script without a physics method since I didn't know how to use one and wasn't shown on the course. I shall go ahead and look up how to do that! Thanks a bunch

fossil drum
halcyon shard
#

Gotcha, I have no idea on where to start understanding physics methods but I shall try my best! Any advice on where I can start learning them?

deft grail
fossil drum
halcyon shard
#

Thanks a bunch!

molten dock
#

is it super hard to add a save game function

willow scroll
# lost summit its possible to change size of cube to match camera viewport size? what I want t...

Yes, it's possible to change the size of the GameObject to match the camera's viewport size.

Orthographic

For an orthographic camera simply calculate the height by multiplying the orthographicSize by 2, as this is the camera's half-height. Then calculate the width by multiplying the height by the camera's aspect ratio.
As you may notice from using the orthographicSize, this won't work properly with a perspective camera.

float height = camera.orthographicSize * 2, 
    width = height * Screen.width / Screen.height;

transform.localScale = new(width, height);

Orthographic & Perspective

To calculate the perspective camera's size, which also works properly for an orthographic one, you have to simply calculate the difference between the world space points and use some mathematical multiplication formula you should have learned at school, which tells you a - b | x - y => a = b * x / y. In our case a is the world space scale you want to get, and the division by y is not required, as this is simply Vector2.one - Vector2.zero = Vector2.one in space coordinates.

float cameraDis = transform.position.z - camera.transform.position.z;

Vector2 dis = GetPoint(Vector2.one) - GetPoint(Vector2.zero);

value.localScale = new(dis.x * Screen.width * sizeMutliplier.x, 
    dis.y * Screen.height * sizeMutliplier.y);

Vector2 GetPoint(Vector2 value) => 
    camera.ScreenToWorldPoint(new(value.x, value.y, cameraDis));

You can also create a static method in some Extension class in your script, and access it when required.

SetCameraSize(transform, Camera.main, Vector2.one * .5f);

In this case, transform's localScale is modified according to the Camera.main's viewport, and it fits 50% of it. In your case, it should be 100%. You can also extend the method by adding overloads.

languid spire
molten dock
#

herm

trail gull
#
    private void Update()
    {
        float distance = Vector3.Distance(target.position, transform.position);

        if (!isJumping && distance <= lookRadius)
        {
            if (!NeedsToJump())
            {
                StartCoroutine(JumpAcrossGap());
            }
            else
            {
                agent.enabled = true;
                agent.SetDestination(target.position);
            }
        }
    }

    private bool NeedsToJump()
    {
        RaycastHit hit;
        bool isGroundBelow = Physics.Raycast(transform.position, Vector3.down, out hit, groundCheckDistance, whatIsGround);

        return isGroundBelow; 
    }

what in this code would cause my enemy to continously jump?

languid spire
trail gull
# languid spire show code for JumpAcrossGap
    private IEnumerator JumpAcrossGap()
    {
        isJumping = true;
        agent.enabled = false;

        Vector3 startPos = transform.position;
        Vector3 endPos = startPos + transform.forward * jumpDistance;

        float elapsedTime = 0f;

        while (elapsedTime < jumpDuration)
        {
            float progress = elapsedTime / jumpDuration;
            float height = Mathf.Sin(Mathf.PI * progress) * jumpHeight;
            transform.position = Vector3.Lerp(startPos, endPos, progress) + new Vector3(0, height, 0);

            elapsedTime += Time.deltaTime;
            yield return null;
        }

        transform.position = endPos;
        isJumping = false;
        agent.enabled = true;
        agent.SetDestination(target.position);
    }
keen dew
#

I don't know if it's just bad naming, but now it reads "if the enemy doesn't need to jump, jump across gap"

trail gull
#

Poor naming

cosmic dagger
trail gull
#

But still need to figure out why its constantly jumping

cosmic dagger
#

you can mix them. performance depends on how the code or visual script is written/setup and its complexity. you won't know until it happens. then you profile and optimize when needed . . .

keen dew
cosmic dagger
trail gull
trail gull
keen dew
#

Have you checked what NeedsToJump returns when it's not on a gap?

sleek pond
#

Why it is throwing this error??

languid spire
#

please do not post photos, use screenshots

sleek pond
#

Ok

cosmic dagger
sleek pond
#

Okk

willow scroll
#

is not a condition

#

Use at least true or false

swift crag
#

ifn't

sleek pond
#

It's error about )

swift crag
#

yes, because that's bogus syntax

#

you are not permitted to write an if statement with no expression inside of it

cosmic dagger
swift crag
#

the compiler sees if followed by a (, so it's now expecting an expression, like true or 3 < 5. but you just gave it a ), which is not a valid expression.

sleek pond
#

I have written

frosty hound
sleek pond
#

Ookk

#

Okk

#

Thankyou

cosmic dagger
sleek pond
#

Sorry

frosty hound
cosmic dagger
sleek pond
#

Ok I got this now

trail gull
#

Im gonna switch to using colliders instead of raycasts, feel it'll be easier

swift crag
#

if you want to check for ground colliders in a volume, use a Check* query

#

like Physics.CheckBox

#

this will be significantly simpler than responding to collision or trigger messages

trail gull
swift crag
#

It tells you if there are any colliders in a box.

trail gull
#

Nevermind there is a far easier way to do this jump thing

willow scroll
trail gull
queen adder
#

i want to make it so when im dragging a object it can build momentum and would get flung when let go any ideas?

hollow dawn
#

My player has some animations. When I move or run or crouch the animations affect the camera as well. How can I make it so the camera still follows the player but isn't affected by the animations? My game is a FPS btw some one please help.

queen adder
#

i dont know hookes law

#

i thought that was for like suspension

#

im a bit confused on k

#

im going to send my code so you know what im working with

#

!code

eternal falconBOT
queen adder
#

oh ok

#

okay

swift crag
#

A spring applies more force as you stretch it further

#

If you double the stretch, you double the force

swift crag
#

ah, it does, given the code

queen adder
#

yes

swift crag
#
                rb2d.AddForce((mousePos - heldObject.position) * 6f);
                rb2d.velocity = ((mousePos - heldObject.position) * rb2d.mass);
#

Just get rid of the velocity assignment and this should be fine

#

This applies more and more force as the object gets further away

#

you're currently setting the velocity every frame (using the mass for some reason?)

#

so the force you apply doesn't do very much

#

Also, consider moving this into FixedUpdate.

queen adder
swift crag
#

I would keep the part where you check if the mouse is clicked in Update, so that it runs every frame.

queen adder
#

ok will this work even with me moving the held object to the cursor

swift crag
#

Physics2D.Raycast(mousePos, mousePos);

#

this doesn't make any sense

#

this is shooting a ray from mousePos...in the direction of mousePos

#

so it'll shoot a ray away from the center of the screen

#

Use Physics2D.OverlapPoint to check if your mouse is over something.

#

Also, this code checks for the object every frame, so you'll lose your grip on the object if your mouse goes off of it

#

You can use Input.GetMouseButtonDown(0) to check if the mouse was clicked this frame

queen adder
swift crag
#

you shouldn't be using a raycast at all

young fossil
#

Hello, I am looking for advice on programming a capture-the-flag, strategy type AI. Been researching into behavior trees, FSMs, utility AI and a couple of others, any advice on which the "best" or generally most accepted one is? thx

swift crag
#

You will want to give the rigidbody some drag, yes

#

Otherwise it'll oscillate back and forth forever

young fossil
#

Have you used them before?

#

How did you implement them?

swift crag
#

Unity doesn't have a behavior tree system

young fossil
#

Animator?

swift crag
#

I imagine there are third party packages, though

languid spire
young fossil
swift crag
#

The first thing that comes to mind is a state machine to control high-level ideas (going for the enemy flag, attacking the enemy flag carrier, defending the flag) and then behavior trees to implement those ideas

languid spire
young fossil
swift crag
#

I haven't done them in Unity (yet). I am actually looking at that right now though.

queen adder
young fossil
swift crag
#

i forgot about Muse Behavior!

#

(which is only loosely tied to Unity's generative-AI Muse ecosystem)

#

the name is very unclear

queen adder
#

ohh

#

maincam.forward

swift crag
languid spire
swift crag
#

a raycast is unnecessary to detect if you have clicked on an object in 2D physics

young fossil
swift crag
#

you aren't shooting a ray from the camera at the object. it's a 2D system.

queen adder
#

yeah

young fossil
#

Can't find info on it

swift crag
young fossil
#

Is it an extension?

swift crag
#

(and it's remarkably hard to find it when searching...)

queen adder
#

so uhhh

swift crag
#

the thing is that it's barely tied to Muse

#

you can just ask it to (try to) generate tree elements

queen adder
#

any help with my "2d drag system"

#

how do i build momentum

swift crag
queen adder
#

i removed the velocity setting

#

and it just falls faster downward

young fossil
#

That's cool, thanks. As for the behaviour trees, how do you implement the pattern?

swift crag
cosmic quail
queen adder
#

i kinda want it to be like the potioncraft drag system

young fossil
#

Is it switches/if statements

swift crag
queen adder
swift crag
swift crag
#

The tree is evaluated from left to right.

queen adder
#

but what im doing is im setting it to a position over and over?

young fossil
swift crag
#

so a very simple tree could be:

  • move to target
  • attack target
#

The first action runs until it succeeds, then the second action runs

cosmic quail
young fossil
#

At least with a FSM or Utility system it's very organised in a sense

swift crag
swift crag
#

a OverlapPoint finds all of the colliders that touch a point

#

Raycast2D is finding all colliders along a line

queen adder
swift crag
#

I don't know how Raycast2D behaves if you give it a length of zero

swift crag
queen adder
#

yeah

#

but i want a simalar effect to where its on the mouse

#

yeah

swift crag
#

to move the rigidbody

ionic plank
#

Hello, i have a script in ZoneTime and I want to collect the boolean in the scrpit in Paterne Hole & Enemy 1. Do you know how to do ?

cosmic quail
swift crag
#

a 2D raycast has no Z direction

#

the raycast is entirely in the XY plane in which 2D physics is being simulated

queen adder
swift crag
#

so it falls down

young fossil
#

@summer stump You reacted to my message, so anything to add to what I said? Truthfully I don't really understand how to implmenent a clean, behaviour tree in Unity, asking here before I delve to research. Any advice?

queen adder
#

cause like i like the falling

swift crag
#

then there is no gravity

#

unsurprisingly

young fossil
#

Pretty much nothing comes up when I search Unity behaviour tree

queen adder
#

i want the gravity tho

hollow dawn
#

My player has some animations. When I move or run or crouch the animations affect the camera as well. How can I make it so the camera still follows the player but isn't affected by the animations? My game is a FPS btw some one please help.

swift crag
summer stump
swift crag
#

That is a reasonable idea.

queen adder
young fossil
swift crag
queen adder
#

okay ill record rq

cosmic quail
swift crag
#

a 2D Raycast does hit colliders that it starts inside of

#

so this will probably work

cosmic quail
swift crag
queen adder
swift crag
cosmic quail
swift crag
#

as I said earlier: you should use GetMouseButtonDown to check for an object when you click

queen adder
#

im holding the mouse button tho

swift crag
#

so what? your mouse went off of the object

#

also, this raycast is still wrong

queen adder
#

okay how do i fix the raycastr

#

one thing at a time

swift crag
#

by getting rid of it

queen adder
#

done its gone

young fossil
swift crag
#

use this to look for a collider wherever the mouse is pointing

queen adder
#

how would i do that

young fossil
#

Seem complicated and an effort to learn, so making sure it's worthwhile

cosmic quail
swift crag
#

that's it.

swift crag
#

I know that you can use depth to do filtering

#

I haven't used that before.

#

Although the Z axis is not relevant for rendering or collisions in 2D, you can use the minDepth and maxDepth parameters to filter objects based on their Z coordinate. If more than one Collider overlaps the point then the one returned will be the one with the lowest Z coordinate value. Null is returned if there are no Colliders over the point.

cosmic quail
#

oh ok, so by default it always returns the object with the lowest z like i expected it to, thats good

swift crag
#

this is from OverlapPoint, mind you

#

Raycast's page doesn't mention this

glossy turtle
queen adder
#

okay so ive changed the raycast to the overlap point

#

and changed where i use the raycast collider to overlappoint

young fossil
queen adder
#

but i like the gravity

young fossil
#

FSM, Utility AI

queen adder
#

fine

glossy turtle
queen adder
#

so when its being held

young fossil
swift crag
summer stump
glossy turtle
swift crag
queen adder
#

how do i enable gravity when its done being held

radiant frigate
#

hi! how do i make a reference to a prefab on a script which isnt instantiated at the start of playtime?

glossy turtle
swift crag
#

then give it to whoever needs it

summer stump
swift crag
#

just drag it in

radiant frigate
young fossil
queen adder
#

i know how i just think i need to move some things

swift crag
eager spindle
#

now that I think about it why doesn't unity discern between prefab and gameobject?

swift crag
#

Ooh, I like the look of this

eager spindle
#

they should make prefab inherit from gameobject

swift crag
#

they're an asset that stores a game object

#

prefabs don't exist in the built game at all

young fossil
#

Because I find very little resources on Behavior Trees in my searches, it's supposed to be "the most versatile" solution yet it seems no information I can find is credible and no one here really knows much about it either

radiant frigate
eager spindle
#

prefabs aren't attached to a scene, gameobjects are

swift crag
#

This is a script asset.

eager spindle
#

which is a difference

summer stump
eager spindle
#

so perhaps prefabs aren't fully gameobjects and could be abstracted

golden ermine
#

Hello guys I need help, I have this patrolling script in which enemy will go from point to point and when it comes to last point it will just stop. I want my enemy to go back to the first point and start looping and I also want my enemy to face where the point is because now he will just walk backwards to the point that is at the back of him for example. This is script: https://hastebin.com/share/abuwegolov.csharp

swift crag
young fossil
summer stump
radiant frigate
eager spindle
#

it would reduce confusion for many if prefabs were different from gameobject

swift crag
summer stump
eager spindle
#

a lot of people I helped kept trying to change the position of a prefab rather than the gameobject they instantiate

swift crag
young fossil
#

@summer stump @swift crag Thanks both of you still, for giving me leads like GOAP and HTN

#

If you have any other buzzwords lmk

eager spindle
#

plus I don't understand why someone would instantiate an object already in a scene

swift crag
#

you can instantiate any unity object

queen adder
#

ima go

radiant frigate
swift crag
#

You are inspecting the script asset itself. This is not an actual component. It's the blueprint your components are made from.

summer stump
swift crag
#

I am very interested in this HTN idea now...

radiant frigate
# swift crag

oh i just totally missed the bubble reference, i dont know how i didnt see it

swift crag
radiant frigate
#

ty fen and aethenosity!

swift crag
#

like, literal one-to-one correspondence with buttons the player can push to trigger actions

#

save for "move to entity" and "move to position"

young fossil
glossy turtle
swift crag
#

I decided to try GOAP beacuse of a very obnoxious situation

#

I accidentally made it so that the enemy was more interested in approaching the player than attacking the player

#

So they'd just get up in your face and...stand there.

#

with GOAP, the enemy approaches you as part of a plan to hurt you

young fossil
#

Lmao, so basically it didn't work, GOAP is the solution I should look for?

#

did you use GOAP with the FSM/Utility or rewrote it

golden ermine
#

Hello guys I need help, I have this patrolling script in which enemy will go from point to point and when it comes to last point it will just stop. I want my enemy to go back to the first point and start looping and I also want my enemy to face where the point is because now he will just walk backwards to the point that is at the back of him for example. This is script: https://hastebin.com/share/abuwegolov.csharp

hollow zenith
#

Hey, is there a way to create preset for textmesh font settings? Such as size.
I want to make few for Header/body/footer for example

summer stump
hollow zenith
#

I guess that kinda makes sense, but I found that there is a setting menu with default font size, but it seems to be per font file.

golden ermine
#

I just followed tutorial

hollow zenith
#

It's basically what I want, without having to make prefabs

#

ah its a dropdown under text field

languid spire
hollow zenith
#

They arent meant to be used that way, its a built in feature.

glossy turtle
languid spire
#

you are missing a class declaration

#

where does the word class normally appear in a script?

rich adder
#

have you tried actually putting these methods inside a class 😐

#

time to do basic c#

#

methods belong in classes/structs

glossy turtle
#

did anyone tried goap before other than @swift crag

radiant frigate
#

im trying to make a reference to a prefab inside of a script asset that isnt atached to anything at the start of runtime but whenever i try to instantiate it, it says that the object is null

#

the left screenshot is for reference of what it looks like, completely different to this scripts for example

glossy turtle
#

in start

rich adder
radiant frigate
glossy turtle
radiant frigate
rich adder
#

change the copy you get from Instantiate

radiant frigate
#

i dont want to change the prefab in any way

#

i just want to reference it

rich adder
#

but you are

radiant frigate
#

where?

glossy turtle
rich adder
#

you got a copy of this script somewhere

radiant frigate
glossy turtle
radiant frigate
#

that?

rich adder
#

@queen adder <@&502884371011731486> is spamming nsfw invite links, but it got deleted might want to keep an eye on this account though

glossy turtle
#

[serializedfield] private gameobject prefab;

fickle plume
#

Yep, bot autodeletes them. Just not always as fast.

radiant frigate
rich adder
rich adder
glossy turtle
#

[serializefield] private gameobject bubble;

#

bubble =instantiate(prefab) in star

rich adder
glossy turtle
#

and use bubble for instantiate

rich adder
#

they literally instantiating a Null object

#

more likely its a copy with prefab not assigned

radiant frigate
glossy turtle
#

its like you are not instantiate null but using the object for instantiating prefabs

radiant frigate
#

i checked and i didnt found a copy of the script nowhere

swift crag
#

searching for t:foo finds everything with a foo component on it

ember gate
#

hi could anyone help me, how do I delete an enemy when I run over them for context my game is a small car that is drifting and waves of enemies come but only way to kill them is by getting them ran over

rich adder
glossy turtle
#

it will not give null refence

rich adder
rich adder
radiant frigate
glossy turtle
radiant frigate
#

but only after this:

rich adder
ember gate
radiant frigate
rich adder
#

seriously lol

ember gate
rich adder
radiant frigate
#

i see that bubble is none

#

but thats my problem since the start

#

i dont know how to reference it

polar acorn
# ember gate did this but does not work

The Three Commandments of OnCollisionEnter2D:

  1. Thou Shalt have a 2D Collider on each object
  2. Thou Shalt not tick isTrigger on either
  3. Thou Shalt have a 2D Rigidbody on at least one of them
rich adder
rich adder
#

aint that diffcult

radiant frigate
#

but i can only do that in run time

polar acorn
#

why

rich adder
#

why

swift crag
#

why are you doing anything other than trying to drag the reference in

radiant frigate
#

because it isnt atached to anything until some ifs are met in runtime

swift crag
#

what isn't "attached to anything"?

radiant frigate
#

the script

swift crag
#

the prefab that Bubble Script is on?

swift crag
#

so what? prefabs can reference other prefabs, as you've been told already

polar acorn
#

You're trying to reference a prefab, right?

radiant frigate
#

no, the script nor the bubble

#

yes

#

inside a script that isnt atached to anything

glossy turtle
polar acorn
rich adder
#

youcan put prefabs inside, they are just assets that live on your HDD

swift crag
#

You need to show us exactly what "a script that isnt attached to anything" means, because I don't understand what you're talking about

ember gate
radiant frigate
polar acorn
rich adder
radiant frigate
polar acorn
# radiant frigate

Ah, okay. So then you'd want this script to reference the prefab you want, and pass that to the script you've just added

swift crag
#

Right.

#

That makes sense now.

#

You'll be instantiating the prefab with the BubbleScript on it (and parenting it to the player)

radiant frigate
#

srry im not english native so i may not use the best words to formulate my phrases

radiant frigate
swift crag
#

You will have two prefabs.

radiant frigate
swift crag
#
  • A prefab with a BubbleScript on it
  • The bubble prefab
rich adder
#

also why are you calling BubbleProtect with a string

radiant frigate
swift crag
#

(you can just do StartCoroutine(BubbleProtect()))

radiant frigate
#

ohhh

glossy turtle
swift crag
#

It's different from something like Invoke

#

where you do have to give it a name

polar acorn
# radiant frigate

This script should have a public field for the bubble prefab.
When you add the BubbleScript component to the player, also set that component's bubble to the prefab you assigned in the previous step.

swift crag
#

Calling BubbleProtect() does nothing on its own. It just gives you an object that you can then run as a coroutine.

polar acorn
rich adder
weary egret
#

Is this how to link an anonymous account? Getting an error

await UnityServices.InitializeAsync();
await AuthenticationService.Instance.SignInAnonymouslyAsync();
var token = AuthenticationService.Instance.AccessToken;
await SignInWithUnityAsync(token);
swift crag
#

well, what's the error?

#

you can't just stop at "there's an error"

radiant frigate
rich adder
radiant frigate
#

ill notify how it goes!

#

brb

weary egret
rich adder
#

SignInWithUnityAsync gets the Token from the browser response

glossy turtle
#

fistly assifn something to that gameobject in the start and use it generate instantiation.

weary egret
# swift crag well, what's the error?

[Authentication]: Request failed: 401, {"detail":"unable to validate token","details":[],"status":401,"title":"PERMISSION_DENIED"}, request-id: 786fb2e8-193d-4b97-b5c8-47ee1db55f26

rich adder
#

exactly

weary egret
polar acorn
#

You're only confusing people

rich adder
#

and that is def against the rules

rich adder
polar acorn
#

It's okay to throw out a guess when you don't know as long as:
A) You acknowledge it's a guess
B) They're not actively being helped by someone who does know

rich adder
#

where did you follow this wrong instruction from @weary egret

weary egret
glossy turtle
buoyant knot
#

synnergy

polar acorn
swift crag
rich adder
buoyant knot
#

teamwork
hegemony
core competencies
Am I helping yet?

weary egret
glossy turtle
polar acorn
glossy turtle
#

it will give null refence untill you assign something in the start.

weary egret
# rich adder https://youtu.be/XVqYIFcjhLE

Oh I started using that tutorial, but I couldn't get my setup to recognize PlayerAccountService and I couldn't add using Unity.Services.Authentication.PlayerAccounts at the top. I have the latest version of the Authentication package.

summer stump
rich adder
weary egret
rich adder
#

also is your IDE properly configured

weary egret
radiant frigate
ember gate
#

good now I kill the enemies but i sometimes get stuck in them

glossy turtle
radiant frigate
#

and ty for your patience!

rich adder
radiant frigate
#

but still ty for helping!

polar acorn
glossy turtle
# summer stump You did not

i think he understood and found a solution. its not the way all others understand but if have that thinking you can understand.

rich adder
#

he understood after digi has explained it to them

polar acorn
glossy turtle
#

anyways. thats it. someone got a solution

summer stump
polar acorn
glossy turtle
#

i really dont like typping. i mean typing the entire code for explaining.

ember gate
#

how do I take the velocity from the carcontroller and check in another code if the velocity is above a certain number to kill monsters or else to not kill

rich adder
#

then refrain from doing so by giving incorrect suggestions

summer stump
polar acorn
weary egret
rich adder
#

did you get the Web browser prompt ?

glossy turtle
glossy turtle
frosty hound
#

Yes, you will, thanks.

polar acorn
# glossy turtle i will type.

Stop trying to answer questions you don't understand when someone is currently being helped. You just make things more confusing for them because they haven't been here long enough to know that you have no idea what you're talking about

rich adder
glossy turtle
polar acorn
# ember gate this seems right to you?

You need to get the Rigidbody component from the collided object, but if you're specifically checking on OnCollisionEnter then navarone pointed out the shortcut to getting that speed that'll also take this object's speed into account, you should use that instead ^

summer stump
ember gate
#

ight lemme try that out

rich adder
#
  if(other.attachedRigidbody.velocity.magnitude > minAmount)
        {
            // do stuff
        }```
#

if you need trigger i guess

ember gate
#

no no its ok

#

I got it

#

this what I wrote

#

and it works now

rich adder
#

🥳

radiant frigate
# glossy turtle nevermind it kid just understand the concept behind.

idk what is happening here but just stop the beef, i understand both points of view since Ninja_dude just wants to help (or so it seems), and i can understand the point of navarone digi aethenosity and fern because he just confuses the matter more, either way i think there is no real benefit on getting so defensive Ninja_dude to the point where you are just saying childish things like i will type or i dont like to type. besides everything thanks to you all for the help and think about the fact that there is no point in being childish or rude

ember gate
#

just gotta change the value from 10 to like 15 or something

#

the enemies can jump on me and throw the car away xD when I stay still

rich adder
ember gate
#

or move me around

rich adder
ember gate
#

no

#

just some prefabs which spawn from certain spots atm

rich adder
#

how do they move though ?

ember gate
#

wanna see their code?

rich adder
#

sure, just seeing if they move with transform

ember gate
#

photo or code

rich adder
#

use the codeblock

#

or link

ember gate
#

ok

rich adder
#

but if they move transform , they will inherently push rigidbodies out of the way

ember gate
#
{
    public GameObject car;
    public float speed;

    private float distance;

    // Start is called before the first frame update
    private void Awake()
    {
        car = GameObject.FindGameObjectWithTag("Player");
    }

    // Update is called once per frame
    void Update()
    {
        distance = Vector2.Distance(transform.position, car.transform.position);
        Vector2 direction = car.transform.position - transform.position;

        direction.Normalize();

        float angle = Mathf.Atan2(direction.y, direction.x) * Mathf.Rad2Deg;

        transform.position = Vector2.MoveTowards(this.transform.position, car.transform.position, speed * Time.deltaTime);

        transform.rotation = Quaternion.Euler(Vector3.forward * angle);
    }
}
rich adder
#

yea MoveTowards will just kinda bulldoze its way through anything

glossy turtle
rich adder
#

Maybe use a rigidbody so you can make them be hit /stopped by the car

ember gate
#

they got one

rich adder
#

then don't use transform.position = to move

radiant frigate
ember gate
#

or wait nvm

hushed hinge
ember gate
#

mb they only have a box collider within the inspector

rich adder
ember gate
#

ive added a rb to every mob

ivory bobcat
rich adder
#

You need to just disable the movement script @hushed hinge

#

ideally you make GamePaused a static event

merry spade
#

My Movement is extremly stuttery, I use the character Controller to move in Update() and My camera updates in LateUpdate()

rich adder
hushed hinge
swift crag
#

Events can call methods when they're invoked

#

So you could have an event called OnGamePaused.

#

You could then add things to it to have them run when the game pauses

#

A static event would just be..static!

rich adder
swift crag
#
public class GameController : MonoBehaviour {
  public static event System.Action<bool> OnGamePaused;
}

then...

summer stump
merry spade
summer stump
#

That is a nice way to do it

swift crag
#
public class Something : MonoBehaviour {
  private bool moving = true;

  void Awake() {
    GameController.OnGamePaused += HandlePause;
  }

  void HandlePause(bool paused) {
    moving = !paused;
  }
}
#

something like this

hushed hinge
rich adder
summer stump
rich adder
swift crag
merry spade
swift crag
#
public void SetPaused(bool paused) {
  OnGamePaused?.Invoke(paused);
}
#

(this would go in GameController)

summer stump
rich adder
swift crag
#

Every method that has been added to the event will run

polar acorn
merry spade
rich adder
#

how do you know?

swift crag
rich adder
#

also you should only call .Move once

swift crag
#

Try viewing it through the scene view

#

That will let you see which it is

hushed hinge
merry spade
swift crag
#

GameController decides when to invoke the event.

#

Something is a class that subscribed to the event.

rich adder
#

Something can be your player movement script for example

summer stump
merry spade
hushed hinge
swift crag
summer stump
swift crag
#

you can't just copy random chunks of my example into your game

rich adder
#

Oh god tell me you're pasting stuff without understanding it

merry spade
hushed hinge
summer stump
rich adder
summer stump
rich adder
#

if pause is your pausing script then put the event in there, simple as that

#

the other scripts just "subscribe" if they need to know game was paused

hushed hinge
merry spade
rich adder
#

look at the examples Fen wrote
GameController is pause
Something is your PlayerMovement script for example

weary egret
# rich adder did you get the Web browser prompt ?

Now I did. It goes through and logs me in. The final piece - it asks me to log in every time in Unity editor. Is this okay (like is it an editor only thing) or do I need to check to see if I'm logged into Unity Player Accounts first? If so, how do I do so?

summer stump
rich adder
rich adder
#

You can sign in an already Cached user without signing in again if they already signed in @weary egret

merry spade
rich adder
weary egret
merry spade
#

no i didnt because I cant imagine that it cant work with the normal camera

summer stump
rich adder
hushed hinge
rich adder
#

its static so you dont need any references, you can directly subscribe to it

#

like pause.OnGamePaused += GamePaused

weary egret
#

@rich adder

public async Task InitSignIn()
{
    await UnityServices.InitializeAsync();
    if (!AuthenticationService.Instance.SessionTokenExists)
    {
        // if not, then do nothing
        return;
    }
    await PlayerAccountService.Instance.StartSignInAsync();
}

If I understand right, this covers what you're talking about here?

rich adder
#

ops here

hushed hinge
summer stump
#

Show OnGamePaused

rich adder
#

also you dont need public pause Pause

#

static members live on the class itself not any instances

weary egret
rich adder
hushed hinge
rich adder
hushed hinge
rich adder
#

there is nothing to search, you're literally adding 2 things

rich adder
#

names dont matter

#

did you add a STATIC event inside your pause script

#

what did you call it

hushed hinge
rich adder
#

i dont care about that

tranquil hollow
rich adder
summer stump
#

It is something YOU make. There is nothing to search

#

If you want to search something, look up events

tranquil hollow
weary egret
summer stump
#

That is not how you do it at all

rich adder
summer stump
#

Put the event in the pause script

rich adder
#

you only SUBSCRIBE to it from the movement

hushed hinge
rich adder
#

you dont Define it inside the movement script

summer stump
#

See the part where you write pause. ?
That means "from pause"

#

So put it in pause

summer stump
frosty hound
#

@hushed hinge make a thread

rich adder
#

seriously how did you get this far and dont know you're obviously missing it inside the pause script

#

thats why its red..

hushed hinge
#

Pause

stuck palm
#

anyone know how to do jump through platforms?

stuck axle
#

I'm using an existing project as a template to get started, and I'm at a loss for why they have basically 3 different coordinates/locations stored for entities. the built in transform.location, then another separate Vector3, and then worldX/worldY ints. Is this just straight up bad code or is there a possible reason why? It's a paid asset so I dont think I can share the code. Its simple though, nothing crazy going on.

rich adder
polar acorn
rich adder
#

interesting method digi suggested, should try that. (oh actually I had it in the code but for some reason commented out lol)
I'm basically using Dot product though, so might not be the most reliable

swift crag
#

i guess i'd check a sphere that's a bit larger than the player

rich adder
#

thats what I do, but my method is not good now that I think about it. it makes whole platform trigger which is bad for others standing on it

#
 if(currentPlatform == null)
 {
     var hits = Physics.OverlapSphereNonAlloc(transform.position + headOffset, radiusCheck, hitCols, platformLayers);

     if (hits == 0) return;

     currentPlatform = hitCols[0];
     currentPlatform.isTrigger = true;
 }```
swift crag
#

I wonder what the cost of IgnoreCollision is. It can't be as fast as a layer mask!

#

(not that it's a problem; i'm just curious)

stuck palm
polar acorn
# swift crag Do you use a physics query to look for "relevant" colliders?

Since it's for a Smash-like, I actually had the Stage object that had a list of all of it's pass-through colliders and their bounds. After the character moves, I just ran a check that looped through the list of pass-throughable platforms for ones whos tops were below the player's bottom and enabled collision, and vice-versa for ones whos bottoms are above the player's bottom

rich adder
stuck palm
#

how can i check what layer a collider is on?

swift crag
#

grab the layer property from its gameobject

#

note that this is a layer index, not a layer mask

stuck palm
rich adder
#

you can check if certain layer on collider matches a certain layermask

stuck palm
#

i'll just use that

#

how do they turn a layermask into an int

rich adder
#

layermask.value

#

so basically layerMask.value & (1 << obj.layer)) != 0

magic panther
#

Update Function --> https://hatebin.com/piwccqgoqu

So the trampoline is not getting detected, even with is Trampoline and other things gpt and intelli suggested. What am I getting wrong here?

polar acorn
magic panther
#

ok, one sec

#

ooooh

#

it detects the literal object

#

not the wrapper

#

so TrampolineObj. Do I just change the name?

#

how would I even check if that got detected

swift crag
#

a Collider can never be a TrampolineObj

#

the is operator is used to check if an object could be assigned to a variable of a specific type

magic panther
#

do I just give the trampoline object itself a collider??

swift crag
#

TrampolineObj isn't even a type here. It's the name of an object in your scene

magic panther
#

what's the best way to do this

swift crag
polar acorn
swift crag
#

what you can do is check if the object you hit has a component

stuck palm
#

Does on Trigger Enter require a rigidbody

magic panther
swift crag
swift crag
#
if (groundHitInfo.collider.TryGetComponent(out Trampoline trampoline)) {
  // do stuff with the trampoline variable
}
stuck palm
swift crag
stuck palm
#

okay, thank you

swift crag
#

Note that for triggers, OnTriggerEnter is sent to both the object with the collider and the object with the rigidbody

#

This isn't the case for collisions. OnCollisionEnter is sent to only the object with the rigidbody

magic panther
#

alright, worked. Thanks guys

cosmic dagger
#

might help to have an explanation in case people can't see what the problem is . . .

fervent abyss
#

how can you not see the problem 😭

#

ok

#

explained

#

uwu

rich adder
#

z fighting maybe?

fervent abyss
cosmic dagger
#

i see moving back and forth while trying to look at a screen?

rich adder
fervent abyss
summer stump
#

Can you show the hierarchy?

rich adder
#

whenever you pop that multiplayer image thats when issue occurs

fervent abyss
#

when i disable it everything works fine

#

but i need the image

#

:(

rich adder
#

well now you know where to check for problem area, narrow down the issue

fervent abyss
#

oh wait

#

i can just

#

use a plane with image

#

💀

rich adder
#

wouldn't it just be easier to use World Canvas ?

fervent abyss
#

huh

summer stump
#

With panels and the image on it

summer stump
fervent abyss
#

it is

rich adder
#

its not , at least not the text you have selected there

#

that looks like a sprite/mesh

fervent abyss
#

the image is a sprite.....

rich adder
#

then why are you mixing Sprite Renderer sprite and UI

#

ui uses Image component

#

sprite renderer uses meshes with sprite

cosmic dagger
fervent abyss
fervent abyss
rich adder
fervent abyss
#

i kinda deleted it already and made a plane with image :3

#

too late!!!!

#

but thanks!!!

stuck palm
#

i made it so there are colliders in each limb. problem is now, each limb detects their own hit, so how can i stop this from happening?

fervent abyss
#

make so same layers dont collide

wintry quarry
#

Well if they're part of the Same Rigidbody they won't collide with one another no matter what

stuck palm
stuck palm
wintry quarry
#

Use layers to separate everything

#

And layer based collisiona

stuck palm
# wintry quarry Use layers to separate everything

wdym? the colliders arent hitting each other, the problem is collisions from another players move hitbox. I seperated out the colliders into seperate limbs to make the collisions feel more accurate and tight

wintry quarry
#

The move hotboxes and these colliders should go on different layers and not be set to collide in the matrix

void thicket
wintry quarry
#

Maybe I'm not understanding the problem

#

Is the problem that you're getting multiple collisions? Or is it that you're getting any collisions on these at all

#

You'll get one OnCollisionEnter per collider pair that touch

void thicket
#

Rigidbody pair no?

wintry quarry
#

Collider pair AFAIK

#

That's how it works for triggers

stuck palm
swift crag
#

I don't know what happens if you have multiple trigger colliders under a rigidbody

void thicket
#

You'd get additional info in contacts in Collision if multiple contact between same rigidbodies
Not sure if that triggers event methods, hm

swift crag
#

oh, wait, that's the problem :p

#

so I dealt with something like this while working on a soulslike

stuck palm
swift crag
#

You can't avoid multiple collisions. You can change how you respond to them, though!

wintry quarry
swift crag
#

I made Hitbox and Hurtbox components that report impacts to the entity

wintry quarry
#

If you are already touching the Rigidbody ignore the collision

swift crag
#

the entity would ignore hits that were not stronger than a previous hit

wintry quarry
#

Just track which bodies you're touching.

swift crag
#

er, or did I do that on the weapon side? I might have done that on the weapon side

stuck palm
#

unity crashed again bruh

eternal needle
#

I did it from the weapon side, and you can simply store the rigidbody in a hashset to know if you've already hit the object.

#

Clear the hashset everytime you want a new instance or tick of damage

swift crag
#

the weapon knew "hey, I already got a hit of quality 0.75, so this new 0.5 quality hit shouldn't even do anything"

#

and a 1.0 quality hit would produce another 0.25 damage

#

that way, clipping an enemy's "weak" hurtbox before whacking their "strong" hurtbox wouldn't make you deal more or less damage than just hitting the "strong" hurtbox

stuck palm
#

basically imagine a move hitbox that was about this size. all the overlapping body colliders recognise it and all tick the same damage

swift crag
#

lest you wind up with a dog that deals 11,640 damage per second

stuck palm
#

i just want it to tick the damage once

swift crag
#

Each collider should not be directly causing damage to be taken

stuck palm
eternal needle
void thicket
stuck palm
void thicket
#

Just ref-count your collisions

swift crag
#

to get rid of an ambiguous situation

#

if you get four trigger overlaps, it's unclear how much damage should actually be taken

#

the individual LimbColliders cannot make this decision

golden blade
#

hello, if I make a new scene in unity and have a camera displayed for that scene in a different scene through a render texture would this work ?

formal venture
#

can anyone explain to me what that thing means and does exactly?

void thicket
eternal needle
#

Is that lambda even needed?

#

Looks like it can just directly subscribe

stuck palm
stuck palm
#

okay

#

shouldnt be too hard to refactor

#

this whole time cus i had a single collider i was making the decision from the victim

wintry quarry
short hazel
# formal venture okay thanks

For completeness, lambda expressions are methods (like void Start()) which don't have a name and can be declared in-place.
Your code is an equivalent of:

button_exit.clicked += ExitGame;
// later...
void ExitGame()
{
    SceneManager.GameExit();
}
formal venture
#

thanks now im slightly less stupid :>

karmic kindle
#

I'm trying to move the camera forward the direction it's facing, but when it's tilted up/down, it will move on the Y axis - how can I get that to stop happening? I found a forum that said to use Normalize()

transform.Translate(Vector3.Normalize(new Vector3(Camera.main.transform.forward.x, 0f, Camera.main.transform.forward.z)));

willow scroll
# formal venture thanks now im slightly less stupid :>

So, you can subscribe to the event only if the method you're subscribing has the same number and type of parameters as the event.

public Action OnSomething;
OnSomething += Update; // works

public Action<string> OnSomething;
OnSomething += Update; // error
OnSomething += _ => Update(); // works

public Action<string, string, string> OnSomething;
OnSomething += Update; // error
OnSomething += _ => Update(); // error
OnSomething += (_, _, _) => Update(); // works

Note that the lambda subscriptions cannot be unsubscribed.

eternal needle
#

Oh actually you might need to use Space.world in the 2nd paramter, I believe it might be using local space here

willow scroll
lusty nest
#

hey guys i was wondering, how do i detect the force applied to a gameobject?

void thicket