#💻┃unity-talk
1 messages · Page 53 of 1
it was merged into #1390346776804069396
Hey umm, I was making Unity project but my charachter kept pass by the wall (but yeah able to walk straight, left, right, or back, but I haven't put code/program to rotate body, and no I don't plan to make it jump
using UnityEngine;
using UnityEngine.InputSystem;
[RequireComponent(typeof(Rigidbody))]
public class PlayerMovementRB : MonoBehaviour
{
public float moveSpeed = 5f;
private Rigidbody rb;
private Vector2 moveInput;
private bool touchingWall;
void Awake()
{
rb = GetComponent<Rigidbody>();
// Safety settings
rb.useGravity = true;
rb.isKinematic = false;
rb.collisionDetectionMode = CollisionDetectionMode.ContinuousDynamic;
rb.interpolation = RigidbodyInterpolation.Interpolate;
}
void FixedUpdate()
{
// If pushing a wall, still allow gravity
if (touchingWall)
{
rb.linearVelocity = new Vector3(
0,
rb.linearVelocity.y,
0
);
return;
}
Vector3 move =
transform.right * moveInput.x +
transform.forward * moveInput.y;
rb.linearVelocity = new Vector3(
move.x * moveSpeed,
rb.linearVelocity.y,
move.z * moveSpeed
);
}
public void OnMove(InputValue value)
{
moveInput = value.Get<Vector2>();
}
void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.CompareTag("Wall"))
{
touchingWall = true;
}
}
void OnCollisionExit(Collision collision)
{
if (collision.gameObject.CompareTag("Wall"))
{
touchingWall = false;
}
}
}
is their some way we can merge different unity projects into one?
Rigidbody and capsule collider is here it is...
!code and post it in #💻┃code-beginner
📃 Large Code Blocks
Use links to services like:
https://paste.mod.gg/, https://hastebin.skyra.pw/, https://paste.ofcode.org/, https://paste.myst.rs/
📃 Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
Export as asset package
aight
Bro unity is really trying to gaslight me into believing there is a preview panel at the bottom of the inspector window
Hey, guys! I was wondering is there a way to actually decrease the enter play mode time significantly without breaking or changing the behaviour of the compiler and to actually behave the same but faster?
I really have trouble with entering play mode all the time it takes like 20-30 seconds all the time and I am wasting time but I am also scared to check the options in preferences window because it will probably break things like the reload domain and reload scene boxes
I’m just pissed bc I failed one their quizzes bc I picked that u can just open media player to preview it but apparently that’s wrong even tho that’s clearly a more consistent way than using the non existent preview panel
I have that problem too though not as long as yours, maybe it's a device issue for me (I don't have a powerful pc)
Yes bro I am wasting a lot of time and I am scared of chaning the reload options because maybe it wont compile properly and it will behave differently
I think it has to do with PC as well
If you had a powerful PC it would be better
10-15 seconds for the reloading of scripts and more 10-15 to enter play mode its annoying
and my project has many files bro if it was a small scaled project with few files then ok I have a lot of assets etc etc
do you close unity when press play? it's significantly longer if I close unity to look at other app while it's starting
oh so you mean I have to look another app while waiting for it to enter play mode?
nono it's the opposite, it took me longer when I close unity and look at other app
You can use the profiler to check what's taking so long
Standalone profiler + Edit mode profiling if i remember correctly
Nothing works the only thing works is to actually close and open again Unity
it will be better for a while but then it will take a lot of time again
can I check reload domain and scene
maybe it will help ?
Or I am going to have weird behaviours?
You can see the domain reload report in the logs. Compare the first one to one that takes a lot more time to see what exactly increases it's time.
It depends on your code. The main issue is if you have static fields that need to be reset on entering/exit play mode.
You'll need to reset them manually.
I have not a lot of static fields only where necessary for singleton nothing else
I have seen many videos to enabled reload domain and scene
and I am really curious to learn if it breaks something or not at the compilation time
It's on by default, and it doesn't "break" anything. It's basically refreshing everything.
@potent geyser So, from here what I am supposed to choose?
wait maybe do not reload domain or scene?
I don't know the context of this question, I was just replying to your latest comment.
Personally I set it not to reload anything.
Yes and whats the behavior?
Instant play mode
I mean for the compiler
it does the same thing as reload domain and scene I dont think so?
I'm not sure what you mean. It does not do the same thing as those things because it's set to not do those things.
if you dont use singleton pattern and statics then it wont break your game logic
if you use singleton which in most cases you will have to use then it will break from what I read
I am using the pattern and have some static fields so it will break my game logic
probably so I will have to be patient 🙂
I think I realized my own mistake, It's not code problem...How to move the collider... That's new question...
You don't have to do anything? If you turn this off, then static values will not reset to their default values after you exit play mode.
This is easily handled by giving static fields a value at startup.
Also if you have static events, make sure you have an unsubscribe somewhere such as OnDisable
hi man sorry to disturb you, I've tried the Enemies scene in a high definiton 3d project and the shaders appear all pink, do you know how I can fix?
the shaders type are set to HDRP Lit which shouldn't cause any issues
Is your project using HDRP?
yes
I imediately created as a hdrp project
I've also allowed to ovveride some project files when importing the asset and there are no errors in the console
Does the project require a specific version of HDRP maybe?
probably, in the quality settings, the fidelity already uses one custom made HDR pipeline asset but there are no default render pipeline assigned in Graphics and in Quality<Rendering< Render Pipeline asset , I forgot what the render pipeline asset in the rendering does but it's probably this, however I can't assign any HDR pipeline asset in it
I've tried to assign one of their custom assets and also one of unity prebuilt one
one of the assets folder contains an asset called "HDRenderPipelineGlobalSettings", however it's not assigned and can't be assigned in the field
You'll need to share some screenshots of what you're trying to do, the assets that you're trying to assign and where.
well, I'm not sure what the issue is but what I guess is there has to be a default render pipeline asset because that's the only thing missing I see(even if someone months ago told me using a fidelity wouldn't require a global asset), here are the 2 things I think are causing the issue
and this is the asset which probably should be assigned in
however now, i just saw these logs , maybe that says what the error is
So, what do you recommend to do to change it to not reload scene and domain?
Yes, you need to assign an hdrp asset here.
Again I don't know the context of your issue. As I said I personally set it not to reload because it means instant play mode.
but I can't...
This is not the hdrp asset.
It wont break the logic are you sure?
it doesn't allow me to slide one in and when I press the 3 points there are 0 in the project
what's a hdrp asset then lol
I have some statics and AI says it will break things if I am gonna do it and its not safe
Dx12_High and others seem to be an hdrp asset.
I've tried with the unity prebuilt one it doesn't work neither
they are too but still not assignable
Select it and take a screenshot
I feel like this is going in circles so I'll just say iit one last time. It won't break logic but it will not reset static fields which you will need to assign default values to at runtime, and in the case of static events will need to unsubscribe from it.
the asset seems to be using all sort of scripts for everything
This one is right, but it seems to not be loaded properly. Do you have compile errors in the console?
no I don't
Can you take a screenshot with the console open?
are you sure it's not loaded? the asset seems to be using all sort of dependant scripts working on top of each other
yes
Yes. It should show hdrp settings.
didn't see there errors, I'm really sorry , I thought it would show compile error before the others
You'll need to fix those.
bruh, I'll try
Or just open the project with the unity and hdrp versions that it was intended for.
yee, that's what I'll do to be honest, maybe the errors would be simple to fix but I don't think it's an easy task, it's better if I could first understand how the project works without errors
Does anyone have any good resource on ynity’s behavior trees please?
I doN't even know where to put this, but does anyone have any clue what causes this?
This hapens with any type of custom pass
hello, I've downloaded an unity version on the unity website, finished the downloading process and now I don't see it in the hub, is there an extra step I forgot?
Normally you would just download a unity version from the hub
You can add one downloaded elsewhere but you won't be able to manage modules or anything from it
ohh so downloading from the unity website is useless? I need the 2023.1.5f1 and it isn't downloadable from the hub
I downloaded and then auto put it on my disk, maybe pasting it in Unity<Hub<Editor would make it appear on my hub no?
Is there a reason you need that exact patch version instead of the latest version of 2023.1?
No, you'd add it on the hub, there should be an add button that gives you the option to locate one
no I need 2023.1 but it's not on hub neither so I found the 5f1 on unity website
Question is there a safe way to downgrade a unity project's version
I can just redo what I have done so far but gen the 6.3 version of unity wants me dead
you can't use unity 6?
I can but when I import the asset using Unity 6, a lot of errors appear
but anyway I think I've just found how to add the downloaded editor version, there's a locate button in the installs in the hub
Enemies by Unity
I'm trying to import Enemies in a project but when I'm using unity 6, there are errors so dlich advised me to use the original asset version instead
yes
i see
Is there any benefit in keeping all my singletons on seperate game objects or can i just shove them all into 1 empty, granted the actual gameobject doesnt do anything apart from hold the scripts inside of the scene
well it wouldn't be an empty once you add the components
Yeah no I Understand, i just meant it as the game object has no other components
for most cases it shouldn't make a difference, but there is an edge case in case of conflict
if you do Destroy(this);, either would be fine, but Destroy(gameObject); might remove other singletons
personally i use gameobjects to group singletons, kinda
one gameobject has the game logic singletons, another has the audio singletons
that makes sense
i wish there was some more intuitive way of doing this than just using empties
like an actual "folder" within the inspector
i get its the same priniciple at the end of the day
but it gets to a point lol
it's just a gameobject in that case, "empty" just refers to what it is initially
just calling it a gameobject is clear enough
makes sense i was just afraid of being misunderstood
i think ill keep them on 1 gameobject for now
its only 5 singletons
gameobject makes that less likely, since you'd be calling it what it is 
yeah but i would assume, someone else would assume that as a gameobject it also had some other properties
by saying empty i was establishing "this serves only one purpose and that is to hold this script and it does nothing else" even though at that point like you said, its no longer an empty
i mean, technically yeah? every gameobject comes with a transform (for now)
but assuming anything else would be wrong
you never know with some of the people here lol
-# just rq, sorry if i seem a bit heated, it seems to be a common thing beginners assume - that "create empty" makes something that isn't a GO
i'm not angry at you or anything
i know lol
a gameobject is a gameobject when you are creating an "empty" you are just creating a gameobject with no other components
but yeah terminology is such a useful tool if used correctly and effectively
calling something that isn't empty an "empty" makes it more obtuse imo, since there are actual usecases to use just a gameobject with only a transform and nothing else
Ya im going to be contacting unity at their home office. I cannot believe the stuff they kick you from this server for
Lol
if you'd like to contact a mod, DM @karmic maple
you aren't gonna get anywhere contacting the unity company lol. they don't have direct oversight of this place, that's handled by community managers and moderators here
also consider reading #📖┃code-of-conduct
chances are, what you got kicked for is prohibited there
Yo, where can i find some help on this server channel? Think that I've some problem of my FPS Controller that cannot move.
ask here
!ask
:thinking: Asking Questions
:mag: Search the internet for your question!
:book: Use the API Scripting Reference and User Manual and this troubleshooting site for commonly posted issues.
:wrench: Attempt to debug your issue.
:thought_balloon: Find an appropriate channel by reading the name and description in #🔎┃find-a-channel
:grey_question: And don't ask to ask, ask a full question illustrating with screenshots if needed.
-# For more posting guidelines, go to #🌱┃start-here
most channels here are help channels
but we need more info and more context
!ask
:thinking: Asking Questions
:mag: Search the internet for your question!
:book: Use the API Scripting Reference and User Manual and this troubleshooting site for commonly posted issues.
:wrench: Attempt to debug your issue.
:thought_balloon: Find an appropriate channel by reading the name and description in #🔎┃find-a-channel
:grey_question: And don't ask to ask, ask a full question illustrating with screenshots if needed.
-# For more posting guidelines, go to #🌱┃start-here
ah goddamnit
They rlly should idk..
yeah i suggested that https://discord.com/channels/489222168727519232/1455286033255104552 but it's probably gonna be a while because of holidays
Thanks!
So im rebuilding ultima online in unity mixed with dungeons and dragons mechanics. My idea is to add the core code in for now and the inputs and then animations later. Any thoughts
Adding animations later
sure, doing one thing at a time and just slapping in placeholders for the time being isn't uncommon
I ran my own servuo free server for ultima online for years and it basically became a different game all my abilities transfer to unity since its also c#
Next question is the add component feature. I see you can turn things off in that. Unchecking it. Whats the rule of thumb for the number of abilities I wanna have per component
there's not really a rule of thumb for "number of abilities", since that isn't something fundamental
in general you'd want to follow single responsibility - each entity (class, function) does some singular specific thing
what that thing is depends on how you want to design it - might be controlling a given ability, might be controlling a given character (with abilities included)
only you have the necessary context and vision to decide
K was just checking for performance issue i dont want down the road
don't worry about perf
computers are fast
it's going to be the same amount of actual work anyways
only worry about perf when a) you have perf issues, b) you are running things in the millions, or c) you are targetting very limited hardware, like an NES
:loudspeaker: Collaborating and Job Posting
We do not accept job or collab posts on Discord.
Please, use Discussions to promote yourself as job-seeking, advertise commercial job offers, or look for non-commercial projects to participate in:
• ** Collaboration & Jobs**
yeah
check the bot message
how do ichange the excact position of this yellow dot?
You cant ask those kind of questions. Kinda weird but you kinda open the door for people to steal your work by doing that
Does anyone know if Unity's behavior trees are good?
Im havving really bad errors with the component itself and I have no clue if this is the usual for it or not after I switched editors entirely
what errors are you getting?
someone can help, where i can go with my github problems? there is no official discord server for that
and my launcher randomly died, and i can log into my account and i see every files, but in incognito mode, its 404 error
many technical support communities would be willing to help with git issues
this one is pretty focused on unity though. is the issue in question with a unity project?
what launcher exactly?
i made a launcher in vs .net for my unity game
there is my account, but
without my dev account, its vanished, and i didnt changed anything
and poor launcher cant download the logs, and the game xdd
Basically
Im having the issue where for some reason where theres ghost connections
for example the attack branch thinks that it already has an outgoing connection node on it and it wont let me add a new connection to it without decimating the performance
I cant figure out how to reset this because the delete just doesnt work either
Please tell me i can post a meme related to this issue
you shouldn't, generally. maybe a thread would be ok but that seems overkill lol
ah, thought you had an actual error
yeah i can't seem to access even the account let alone the repo
Try restarting your computer
@rare holly Don't post off-topic on the server
where can i go with this problem? xd
github support?
have you tried a library reset?
i mean, it seems like an issue on github's end, tbh
oh yeah I do it just wasnt on hand
I swapped editors entirely but atp ill run that too
we are going to need to hear more?
is it the project not found?
what do you see when you go into that folder?
Its the
there was a security bug in the previous versions, it tells you to use a more recent version
It's very unlikely that updating the patch version would break something
Yeah no the library reset didnt do much
I need to talk to anyone whos actually used this component but geniuenly this is so ass to work with if it keeps on
Is this where I ask for help with coding?
If you really have to use that exact version you can ignore the warning and update the build with the patch tool
How do i get the patch tool?
Put the mouse cursor on the red triangle and click "read more" in the popup
What is that? I ask 'cause I want to know and learn it. Looks pretty interesting to me.
Its basically just a visualizer for making game AI
lets you keep track of how an AI thinks in a flow chart rather than code
Is that a plugin or something else?
its a unity package
unity package but it i had to choose a slightly older version to fix my issues now not the recommended
which is better for drawing a grid, a line renderer or a mesh?
for visualization purely? because unity has a built in grid component
yep
how comes
flappy bird
And then we have black desert and TERA
flappy bird in 3d would be interesting
They have real-time, physical combat?
I played tera years ago for 30 minutes
the class in that script has other name than the file
They are both action combat MMOs. When it comes to “best” combat in MMOs, those two are often mentioned
if not, copy the content of the file, delete it and paste in another file
Fair, likely they were well aware how to make combat satisfying, without turning it into pianist fight, like in wow
i think this requirement has been removed lately, class and scriptname can differ now
but it looks like this is the case in this example for some reason
just tested that now, didnt know they did this
Thanks, I'll try it out and let you know how it goes
Hello, I have an important question.How developed should prototype games be?
Do I add every feature I want my main game to have?
Do I let some bugs in the prototype to save time?
After I finish a prototype, do I make another, what is the point of making another prototype?
hm who told you to do that actually
just make a vertical slice of the game, let the bugs be, and after u did the prototype u can make another and then get some feedback on them, choose 1 and go for it
I watched some tutorials about indie games and they told I need prototypes
So I make one part of the game for each prototype?For example prototype 1: map generation , prototype 2: movement mechanics?
And then I combine those if I liked them to make the game?
try to focus on mechanics, map gen isnt that important for a prototype
what u described is iterative development
a prototype is just a way of testing a mechanic/game idea
Aaa
So if I am deciding between 2 games that are similar, I make 2 prototypes and then decide which I like the most?
Or any 2 games I want to make, prototypes will help me decide?
kinda, but u shoudnt make prototypes that are similar
Then second thing I said
Thanks, that’s all
gl :DD
Thanks
I am making a full body fps controller and I want it to feel good. Do you think I should move my player with the animations via root motion? To give it a better feel maybe?
ive always thought of it differently.. sure it'd look nice.. but having ur anims be the main controlling factor of ur movement seems to me like it wouldnt be as customizeable
i've always thought that locomotion should be code-driven
with the animations being reactive (following velocity/blendtree's iks etc)
especially for a fullbody FPS..
figured by using code-based curves and modifiers it'd be more scaleble but im the worst at structuring projects 😅
It just ensures animations match. You have the same level of control.
It’s not less responsive, by definition.
is someone using cursor with unity?
I know people who do and it works, why?
i cant make intellisense to work, c# dev kit and unity extensions are not available in cursor
I already downloaded the plugin in unity with the URL but idk what else i should do
thats on purpose
Cursor isnt allowed to use the vs code extension store but people work around it anyway
so you are on your own if you need ai that badly
in reality i just use it to ask questions, not to generate code, i find it really much more faster than googling for 20 mins really specific stuff
which IDE are u using then? VSCode or VStudio?
vs
i may ask an ai chat something once a week but i dont use it or need it for daily tasks
I prefer my brain
also like if you really really really need ai I don’t see why you can’t just use normal vs code
I believe they have copilot or whatever
cursor is different and has the power to shit on your project
How much does ssd speed matter vs cpu speed when you want fast unity builds?
cpu perf is more important but you want a mid non shitty SSD
VSC with Codex plugin gives you the proper extensions
Bit more jank than Cursor tho
Mostly just want a lot of cores / hyperthreading
Codeium / Windsurf is the AI plugin I use w/ 
Interesting
I personally don’t have any extensions (on jetbrains rider) if I need to use ai then I’ll use a temporary chatgpt chat
Never found a good one for Rider
Always have two IDEs running now. For other plugins too.
I think they have copilot on rider and they’re pushing their new junie ai
yeah I also have vs code installed for anything else lightweight
Rider’s Slang plugin is absolute ass
shader?
Yeah
so i wrote a simple code part with ontriggerenter&exit, if you are in water, your speed = basicspeed/2, and i have 0.7fps, i even restarted my engine xdd
how can i see what causes this?
The profiler
unity relay is deprecated? what is to be used now?
its crazy how I unistalled both github copilot extensiones and im still getting the tab at the right and the red message bottom under
there is no way to remove it completely?
in VSCode
Maybe vscodium won't have it. It's a FOSS fork of vscode
forks don’t get access to the native extension store however
but do you guys also have that github copilot thing even when unistalling? Idk why it should keep staying there if i unistall everything, its really invasive
copilot is like this pestering plague of uselessness
cant get rid of it and its everywhere
even on github desktop for some reason it tries to automatically write commit messages for you?
then @plain dagger must be really upset about it since he already got triggered when i asked something about AI
dont ping me
i use sourcetree, like to check things visually
oh thats actually cool to have, isnt it?
no its not because its useless lol
if you wrote the code you know exactly what youre commiting
the ai has to guess without a lot of context
Its actually great for this kind of tasks
How does it guess when it literally knows the code changes from the commit
it doesnt understand the importance of certain changes
you could make a million changes to a single script that are all important and then adjust a font file once and its going to spend 50% of the commit message talking about the font file
its entirely pointless
write your own commits.
Can this turn into a thread please, this is beyond Unity.
Oh really it focuses on bullshit?
Maybe its your sign to split commits better
One category surely is that unity likes to change one million lines
Maybe it’s your sign to add the proper gitignore
and also um
The thread I think
bro its crazy, i unistall both extensions but as soon as i write in the chat on the right it installs instantly again LOL
.unity surely is something that I wanna track. Plus Im using official gitignore file
don’t write in the chat?
Embrace AI guys. I know that it sucks very often and its important to make it do what you want
no
this is beautiful XD
8K
so umm how exactly do you creat hitboxes
That's what a collider is for
#1180170818983051344 , this is a help channel.
you need to import a crosshair image and set it to be a sprite
like this or no
Yes
Its set to "multiple" mode so unless you configure sprites there are none to use.
Change it to single mode.
Ok thanks
turns out I forgot to apply which is why it didn't show up
does any1 know what happend? i baked the nav mesh and this happend
Hi! I'm playing Fly Like a Bird 3 right now 🐦 Anyone hosting or want to play?
whats that
It's a multiplayer bird flying game by Raven-Woods, pretty chill and fun. Want to try?
damn you unity
Thats only a problem with linux, not unity
Hello
!collab
:loudspeaker: Collaborating and Job Posting
We do not accept job or collab posts on Discord.
Please, use Discussions to promote yourself as job-seeking, advertise commercial job offers, or look for non-commercial projects to participate in:
• ** Collaboration & Jobs**
also you should delete the one in #1390355039272439868
saying again: does someone know what happend? i can respond everything
can someone help me make a fullscreen blur effect in shader graph
Is Animator.Crossfade the exact algorithm that is used for animator transitions internally?
anyone ever worked with wall running before? Im trying to make curves work and it is incredibly frustrating
is this a universal experience that physics based movement is horrible to work with
Difficult that’s for sure. I’m not sure about “horrible”.
What do you need to use curves for?
Curved wall running
I think ive worked out a solution im too lazy to do rn but im 75% sure my issues were coming from the fact my camera script changes my players orientation which messes with the raycast for getting the walls normal and stuff
Ohh yeah so you’re getting into raycasts, snapping, float precision that kinda thing.
Only took like an hour or 2
I hate physics so much
Make sure to brush up on Slerp vs Lerp. Have you watched the video “Collide & slide - actually decent physics” on YouTube?
But hey i want to make a movement shooter there will be physics involved
Lerp is a to b over t or something but i have no idea about slerp
Ive used lerp a few times to smooth stuff
Try finding that video it’s pretty technical. Might open your eyes to new possibilities
And no ive watched a few tutorials about movement controllers realised i dont like any of them and frakensteined the code
Im pretty happy with what ive got rn but wallrunnings gave me the most headaches
Have you watched the Toyful Games video about Springs? I really prefer that to “smoothing with Lerp”
There’s a whole thing with that called WrongLerp which you can find on UnityHowHuh
I really should probably do more actual research but no never watched it
Ill make a note of it
I just use tutorials and API until it works
Start with those 2 videos I’m sure you’ll realize the right route you need to take along the way
slerp is also a to be over t, except not in a straight line - the s stands for spherical, it has some notion of being on the surface of a sphere
Smoothing and physics are two huge topics that can make or break your game
Nearly every game out there involves them
I have 0 knowledge in physics and decided to make a momentum based shooter
(you shouldn't use it directly for that btw https://unity.huh.how/lerp/wrong-lerp )
Applying lerp so that it produces smooth, imperfect movement towards a target value.
Looks like the objects were moved after the navmesh bake.
Ive only used it for minor things but didnt know
Ive used it for like fov change, objects for reference
I added a time slow so i needed something to move to see if it was really working so just lazily lerped it
literally everything is an object so not sure what you mean by that second point
Probably the thing I said afterwards
i needed another object to move back and forth so i could see it move
in testing/prototypes? yeah to get something quick and dirty that's fine
how do you move an prefab to a different folder i moved it in the explorer and it gave me serialization errors
but you shouldn't use it in your actual game
make sure to move its meta file too
If you’re really cooking up a banger maybe you can just proceed that way.
I heard Celeste is kinda poorly coded. Didnt matter 
But ive not lerped any player movement I handle all that with horrible amounts of addforce.force and lineardamping
or try moving it in the Project window in unity instead of outside
Oh god my code is pretty horrible but the movements been solid until wall running
you wouldn't want to use poor lerp smoothing for things that actually matter
I think its an orientation thing
for movement acceleration it might mean a low fps player can't physically clear a jump from standstill, for example
Yeah, i like Springs way more. Real easy to set up once you, well, have the code set up
the main problem with lerp smoothing is the framerate dependence
Yeah it’s amazing how Freya breaks it down in the video that UnityHowHuh references
I think? My movement is entirely detached from frame rate? I just handle it all with add force and damping in fixed update and stuff
So afaik it should be fine
Idk how to test tho
We always want to “just know enough” to make the game. Avoiding the depths of math and analysis
a player doesn't see code, so if the behavior is fine, then the result is fine (it'll just cause headaches to you, updating/debugging stuff, or to modders working with your code)
the problem with wronglerp is that it's not good behavior
Whats springs?
Yeah i did that and it still happened and then i did it inside of unity the side bar with all the projects and it still happened is this normal?
that was just an example of a potential problem from using wronglerp, since it's framerate dependent
Watch the Toyful Games video 
Ill have to get to it at some point
could you show the errors? also, do you have auto asset refresh enabled? (if you don't know what that is it's probably enabled, as it is by default)
I think ive got alot to catch up on but i almost have a base for the player movement
Springs are everywhere now. Even in lots of modern websites. Everyone loves them
So i wanna get it done before I realise i did it all wrong
It’s like a 10 minute video, real well made too. Sold me on the whole Springs thing
springs are just a force that gets stronger with more distance from the target
Looking at the Ryan Juckett code for springs is perplexing for me
I just know it works. So well 
physically irl, springs exert a force F = kx, with x being the distance from the neutral position of the spring (the target position), and k being the "strength" of the spring
It’s the dampening part that is complex
“Critically damped” springs especially i think
Look into PID controllers after, now that’s some tricky but useful stuff (Vazgriz has a video and page on it)
I just googled it
Apparently lots of real life systems use PID controllers. Like aircrafts and sh like that 
Eh, it’s like 30-50 minutes of watching / reading stuff. Up to you if you wanna invest that
Hm i went to check for that setting and then it compiled for like 3 minutes and now its working
Coolest and most useful stuff I’ve seen out there at least
My code is currently held together with glue and 300 else if statements
I think ill stick to basic math
If u can call it math
Been there. Didnt work out well down the line man
Can someone tell me how to fix the move tool, i dont know how to get it out of object selection and it wont let me move a prefab
Its currently working and when it stops ill cry
But hey don’t listen up to you. That’s what this discord is for, for people who’ve already been through that, to tell you, hey it’s better to do it this other way.
Then come back after I realise they were right yeah probably
tip: if you can make your logic generalized, a little basic math applied cleverly can replace some branching
But for now Im learning so i gotta try it all
Oh you’re talking about avoiding if/else statements? I’ve always wondered about that.
See that requires math
Id rather paste 309 lines of code
Like having a “weight” value between 2 behaviors right, instead of if/else
It gets incredibly complicated incredibly fast so I choose to stick with what I know until I cant and im forced to learn a little more math
It’s currently got me to like
it doesn't always
See we’re trying to tell you that it’s better to learn the math up-front.
the things i'm talking about are just stuff like this tbh
from this:if pressA move x -1 if pressD move x 1 if press W move y 1 if press S move y -1to this```
horizontal = pressD - pressA
vertical = pressW - pressS
move x horizontal, y vertical
Its probably faster but i dont like it at all
Id prefer to learn with experience
And it forcing me to learn
not better code, it makes you better
It’s a lot harder to end up with an enjoyable result that’s all
learning is development
And what Chris is saying
Wow nice one… I think something just clicked in my brain. Great example
being forced to learn is generally not fun and can get you burnt out. learn on your own terms
but it's kinda up to you to want that
sometimes you aren't forced to learn something, because there's an alternative that happens to be worse and harder and more fragile. you'd never learn the easier way if you only learn when forced to
It’s only after you try to “hack sh* together” and “Frankenstein” it, for months, and then have to re-write everything,
That you realize Chris and the other discord homies were right
don't get me wrong, it can certainly be fun to try to make stuff yourself. but if you limit yourself to only doing that, that's just a worse experience for you
It depends how far down the yandev code pipeline I go but I get what ur saying
Rn im just making my like first ever prototype
So im just seeing what i can make with the movement
I only have 100 else if statements instead of 1000
i prefer the hands on roadblocks instead of study tho
ngl it sounds like your prototype idea is a bit too ambitious for the amount of experience you have
just keep in mind that studying makes every roadblock easier to overcome
you don't have to study to do something like this suggestion
It’s a phenomenon, that building one’s first character movement controller convinces the Dev that they can Frankenstein up the rest of the whole azz game too 
it's primary school math plus a little bit of adulting logical mindset
I mean im like 75% done with movement which is all I really wanted to play with to learn
Having to learn enemy ai and everything else tho
(doesn't have to be actively reading or watching either, just spending some time thinking/designing instead of brute forcing your way through also helps)
And just gamedev as a whole
math is probably a poor word for a bit of this tbh. it's more specifically thinking about how you can use / reuse numbers in a way that empowers your logic
I wonder how many diagrams were drawn to finish Celeste. Or Dead Cells or Cuphead
I mean holy sh*, edge cases out the wazoo as they say.
i mean, that probably includes level design and concept art/design, so that'd probably be massive lol
(i get what you mean, just joking about the wording)
Yes js meant logic / gameplay systems diagrams
i had a few diagrams deciding on behavior of an ability for a prototype that really helped drive the logic. i wonder if i can dig those up
i'll also go check how many ifs/elses i have... kind of a note to self once i get back on PC lmao
I love to take the mystery out of stuff and just, fully understand what’s actually happening 
What happened to it just works!!
It doesn’t always require math
mate that's a joke
Yes I also made a joke
also that applies when you have deadlines or more important issues to worry about
wait that's on me, i wildly misread this lmao, sorry
Nothing “just works” dude 😭 maybe you can make the next Cyberpunk game with 999 bugs
shouldn't chat and do other stuff at the same time 
any known issue where unity just refuses to use your mouse input until you restart
I can't look around anymore
in the game view?
Editor
in what tab in the editor
the Editor view
That’s legit fair though yeah. Many hit games are known to be poorly coded!
But to make a poorly coded game with 0 bugs is harder than if it’s coded a little better / with more planning & consideration
there's no window called the editor inside the editor to my knowledge
are you in the scene tab, the game tab, or something else
then the Scene view
or is the entire editor unresponsive, including hierarchy/inspector/project/console
only the scene view
i haven't heard of this, what version of unity are you on
is any mouse input being ignored in the scene view? selecting objects, dragging them around, panning, orbiting?
that doesn't include any versions, and it's not even the app i'm asking about
what version of the unity editor are you on, the hub's version is irrelevant
also, this is on arch?
6.3
i don't think arch is officially supported, it might have unforeseen issues - this might be one such case
what patch version
2f1
The whole “held together by duct tape” thing actually ends up being way more difficult down the line. The more you add stuff and, well, build out an entire game
Ive never had any issue holding stuff up with duct tape
other than all the times ive had issues holding stuff up with duct tape
It’s when you find that 1 edge case bug and you’re like…
Ohhh okay I have to re-write the entire system to fix it.
@gusty abyss have you tried a library reset?
Or, adding functionality ? 😂 forget it
It happened again
The initial system is like, 3 pieces of duct tape.
Then to add just 1 basic thing takes 10 duct tape pieces,
To connect it to another system, 30 duct tape pieces
…
Like the grain of rice fable
We need a UnityHowHuh page called “Exponentially Growing Duct Tape”
i'm not sure what tool you have selected there, have you tried the normal pan tool?
the basic create probuilder object
that's pretty interesting
and for reference this project has 2,763 LoC
have you tried the pan/hand tool
nope
can't use it until it happens again
and its rotating the camera
I can move and pan just fine
so what's the issue here?
you said it wasn't accepting mouse input before?
clearly you can zoom there
is it just rotating that's the issue?
can you pan
ok, try that
not until it bugs out again
game design diagrams
Does anyone know of an old (possibly deprecated) unity sound effect pack that had many sounds of fantasy creatures/monsters? Im trying to find it. Particularly used in yamtar games and eternity game arts' mobile games.
sounds like orcs, plants, heavy-bugs, slimes, frogs, other weird sounds.
all had 3 attack sounds, 2 Call/broadcast sounds 2 death
So I am trying to do some animations and for some reason my animation plays twice instead of once before the delay is supposed to occur for next animation. Its just a basic attack animation. When a trigger is set to attack then the animation plays and an idle combat animation plays until the delay is over then it gets triggered again
So I'm going to make a desktop pet, but better. If anybody who's good with coding in unity wants to help, I'd greatly appreciate it. The basic theory is that we have a rigid body controlled by a physics engine, ontop of that, it has an ai model train by something (probably AB videos) on life like things, like waving at the screen, walking, climbing, ect. Then there's a customizable layer on top of the rigid body that acts as what the figure looks l like, do you can just draw a stick figure, it maybe get one off the Internet. You then set up as skeleton for that, and then that skeleton is conformed to the rigid body, so that you have a Stickman, that actually interacts with the environment. It's basically just a desktop ragdoll with a brain
#🏃┃animation and provide more details, screenshots, and/or a video.
Thanks
Don’t think it was a unity pack specifically you would probably have to dig online
unless it was on the asset store
Still would have to dig online
!collab
:loudspeaker: Collaborating and Job Posting
We do not accept job or collab posts on Discord.
Please, use Discussions to promote yourself as job-seeking, advertise commercial job offers, or look for non-commercial projects to participate in:
• ** Collaboration & Jobs**
Oh mb
it’s alr
Hello
I have no patience to make proper light probes
Bro I have a question
yes?
What is this ?
Light probes
Light probs increase graphics?
they give global illumination to realtime objects in a fully baked scene yes
otherwise its useless
Yeah, they add 42 to it.
Btw can we use unitys particle pack for commercial use?
how do i change the excact position of this yellow dot in the editor
what are you trying to achieve there
perfection
also maybe i want to know how to do it in scripts when im going to make a level editor
How’s everyone doing on this saturday?
playing games
türk var mı beyler oyun geliştirmeiy düşünüyorum da unityde pek iy ideğilim
english channel..
Hello,
I've got a question, why do some games have it that when you hold "right" or "left", the characters turns around a circle rather than in place?
Seems to be prevalent in older ps1 and ps2 titles but why?
@storm patio no it does not work
is there some way to set the mouse cursors position in unity?
I'm trying to make the players cursor follow an object but idrk how to do that
the new input system has a method to warp the cursor
i´d simply hide the cursor and replace it with a sprite
changing the cursor position could be tricky
Pretty chill.
Not a social server. Pleese review #📖┃code-of-conduct
Got it.
is it ok to have a 205 line long playercontroller monobehaviour script
or should i split functionality between multiple scripts? i would do that but then it will feel all spread up and messy, but its messy rn as well
or should i split functionality between multiple scripts? i would do that but then it will feel all spread up and messy, but its messy rn as well
wouldnt this just be the exact same amount of processes just in multiple files
you could probably optimise whatever controller you have but as long as its not doing something ubsurd itll be fine
i watched a video once advicing against monolithic monobehaviour classes that do everything. my script does not do everything. only does things triggered by inputs
205 lines is not very long
If it's all serving the purpose of being a player controller leave it all in there
what is the new input system equivalent of Input.GetKeyUp()
Ideally you make an action and assign the key in there and respond to the correct phase of the action
Keyboard.current...
but this doesnt serve the principle of the new input system
If you want to hard code stuff then follow this to see how: https://docs.unity3d.com/Packages/com.unity.inputsystem@1.17/manual/Migration.html#keyboard
But ideally you use actions instead
yep exactly that
are these the ones i need to change
i lack the attention span to read lengthy documentations 🥲 but ok
No you add the keyboard binding and then in code check the phase of the action
I linked a pretty table so perhaps try to read it instead of giving up now
was released this frame() seems right for what i want
yea there are many useful functions to check these things
what is the principle ?
i recommend you research on that, the new input system is based on events
is anyone able to help me?
im struggling to make the characters visible in a close up view
any code or can you provide more infos
is that happening in editor or runtime, sounds like cam frustum / nearClipPlane issue
editor
oh ok focus a small object in your scene by double clicking on it
in the hierarchy
try right clicking it, otherwise idk if thats possible
@craggy pollen
whenever i try to open a c# script
it keeps opening unity hub
and not the script importer
how did you create the script
or did you just find it somewhere and imported to unity
the warning message might be indicating something
no
it opens up
unity hub
when i press
open
What editor is configured in your unity preferences?
unity hub
it asked me which app i wanted to use
so i clicked unity hub thinking it will lead me to it's internal program
Wtf are you doing
its doing what you told it
how do i fix
You told windows to open .cs files in unity hub
You need to install an IDE and use that (VS, VS code, rider)
how do i change it
where is it
where
!ide
If your IDE is not autocompleting code or underlining errors, please configure it.
Select one:
•
Visual Studio (Installed via Unity Hub)
•
Visual Studio (Installed manually)
•
VS Code
•
JetBrains Rider
• :question: Other/None
or visit google
first check your pc maybe you have already installed it with unity. Visual Studio is the name
I would not base splitting a script on the number of lines in it (since theres no context how much of that is comments, blank space, braces, etc) - instead I would base it on what the script is doing, and how much dependencies it needs to do it, as long as it is only doing 1 job then I think its fine, but im not sure if youve shown the specific code your concerned about
You want me to send the entire script?
@plain dagger
i downloaded the manual one
but i cant find it while browsing
this good?
that doesnt look right to me
When installed it should show visual studio as an option in the drop-down
Perhaps you need to restart your pc if visual studio is installed
OR your project needs the visual studio package updating
wym
Check the package manager. Use Google to find where that lives
can you confirm that you have Vs installed on your pc..
Victory
yeah
thanks
ok
If you want feedback about it, you could post it to a code paste site and share the link here
@craggy pollen
Is there any way to make a game without a script
yes, but it won't be very good
Really struggling with making a 3D world

uhh i don't see how scripting relates to that
Are you a beginner in unity?
Yes
games are comprised of many aspects. you can omit them for less work but also for less results
you could have a 2d game with no art at all, just using the built-in sprites, but it wouldn't look very good, because that's the point of art
you could have a game with no code at all, just using built-in components, but it wouldn't be very fun, because that's the point of code
Should be like this
that's definitely way too ambitious
Might take years to do this
you will get burnt out if you try
Ill be blunt
Not even years
As your first project
Youre never completing this
You will burn out before you start making any tangible progress
I think it would attract people
many popular games take years to make, and even then the creators have many many more years or decades of experience
if you try to go for that, you will take 30 years to make
How long have you guys started doing programming
12 years
30 years?
Working in unity for 2
6 now i think, i haven't been counting
I guess you make really good games
yes, because you would be tackling a massive project with no preparation or experience
Damn right i do
I watch YouTube tutorials lol
But so far no one been sticking with the idea of making a dark fantasy game so I’m willing to take advantage
When did you start making your dream game
i promise you if you start with your dream game you will quit durring the first week
Im still far from it
Wow
In both skill and resources
whats considered dark fantasy because shadows of the erd tree was like one of the biggest recent releases
consider making a rocket to the moon from scratch with 0 prior experience vs someone who has experience with robotics and embedded systems and has already made rocket parts for other projects
Honestly programming is hard telling A computer of something that you imagine it in your head won’t turn out to the thing you really imagined
Sorry to break your heart but ive seen at least 20 different independent projects trying to recreate those viral ai dark fantasy videos as games
Programming is hard, thats why its important to practice and to learn
Start small
You learn a lot
So can I master programming in a year
no one masters it
Or is it 7 years
Master? No. But you can get reallx good at it
make something simpler first, so you don't lose motivation and get burnt out. build up your experience
But heres the thing
environment artists and animators are gonna matter far more than programming for that kind of game
Most lovecraft inspired games are dark fantasy, and there are a bunch of really good ones. If you mean more "dark fantasy RPG", there are a ton of those.
<@&502884371011731486>
<@&502884371011731486> compromised account
hello! is it possible to refer to a gameobject using it's prefab?
Can you clarify a bit?
in what situation?
a prefab is a gameobject
So how small do I start what would my resources be
!learn
:teacher: Unity Learn ↗
Over 750 hours of free live and on-demand learning content for all levels of experience!
Start from here
hey guys so i put my character on the map but its not visible in the game section any ideas?
gameobjects at runtime don't have any notion of what prefab they were instantiated from. that's an edit-time thing
gonna need some more info to go off of
im trying to make a health bar but i cant get the public GameObject to refer to the bar in the scene, so i made a prefab for it to work and now im wondering if theres a way to get all instances of a prefab in the scene from the prefab itself
So did anyone start learning programming in university or is it a special hobby
im wondering if theres a way to get all instances of a prefab in the scene from the prefab itself
no
Sounds like camera clipping?
select some object and press f to reset the camera's zoom, make sure you're in 2d mode
oh there we go
what about the
for the game view issue, make sure your camera is behind everything. it should be at -10 Z by default
game issue
where do i configure that
it started as a hobby and i'm learning it formally in university
?ban 445205437323804682 bot
nagyviktor03 was banned.
in the transform of your camera
its not there
select your camera in the hierarchy and view its transform in the inspector
whats a good alternative to alpha clipping because its frying my performance
whats that
400 quads per tree
WOAH
!learn go do unity essentials there 👇
:teacher: Unity Learn ↗
Over 750 hours of free live and on-demand learning content for all levels of experience!
SIR YOU ARE PROFESSIONAL
Thats pretty cheap no?
It’s giving me dreamcore
could you js tell me
where to find camera
400 quads per tree with alpha clipping, 40 trees and the performance is WAYYY down
I swear this is beautiful
i would rather you go learn how the inspector works instead of having to handhold you 5 times through every step of the process of checking various gameobjects
why cant a prefab take in an object (through public GameObject) from the scene?
How did you do the trees pls
wait i found the camera
what settings do i need to do now?
because the scene objects don't exist from the prefab's perspective
the same reason a microwave at the store can't be plugged into your rooms outlet. it's not built for that context
is there a workaround ?
Choose the best way to reference other variables.
Are the trees on unity terrain? Do their materials have GPU instancing enabled?
you need to step back and design your stuff to make it easier to work with
the trees are not on a terrain and the materials have gpu instancing enabled
Was about to say even with 40 trees the performance shouldnt be that bad
make the relations between objects make sense, then it'll be easier to implement
i merged all the trees into one mesh too
@storm patiohello?
Oof that's worse
with alpha clip its 200 fps and when i turn it off its doing 450
This looks amazing
One big mesh that it will often render wastefully because it's too big
In my project i have 40+ something enemies with individual animators and over 7k tris each with minimal performance overhead, i dont get how your trees would be tanking it that much
@elder isle stop spamming please.
transparancy stuff, as they are mentioning
No idea don't ping me randomly
sure but at only 32000 tris it probably isnt that bad no?
i saw a performance boost from merging so i dont think thats the issue
its already at -10
Would it affect it that much though 
do your sprites have appropriate rendering layers set @elder isle
You don't want to merge the trees because the whole mesh will draw when some is visible meaning lots of potential waste.
Let unity handle batching for you via the SRP batcher
can forsure, transparency isn't free and trees are dumb computer wise
i took it from an asset store pack
so im assuming they do
uh, i haven't said anything past that
so just enabling gpu instancing on the textures? because i had that before
they're set in your spriterenderers, not the asset
this is something you have to do
oh
On the material you mean. That helps because the GPU can draw the same mesh in multiple places
You need lods though to improve performance when you have many trees
what are the appropriate layers?
you have to make them
the appropriate layers are ones that are ordered correctly so your characters are on top of the background
note that these are the sorting layers set in the sprite renderer, not the physics layers set in the gameobject header
I'd be curious how much transparency is actually needed to achieve the effect you have there tbh. dunno how to handle it with shaders myself but only the edges are really using it
procedural as in the mesh is created at runtime?
I mean yeah, im assuming its a tree model with a lot of quads procedurally scattered on the branches
Each quad has a transparent sprite/image of leaves on it
Where is this going
its a prefab
Point is, i feel like the effect could be accomplished in a different way if it wasnt procedural but rather just modeled
Ah you want the whole tree to be one mesh with geometry that avoids overdraw where possible
Yeah mesh is one draw call so you want to reduce it to 1 if possible
If that effect is being achieved purely via layered transparency (like it's an actual tree) it probably just actually costs that much to render lowkey
Looks like it could be optimised
a majority of the visual here in theory could be re-created without real transparency
I assumed there was a base "round" mesh in the middle initially
Because you dont need any complex geo for the "core" of the leaves here
Just the silouhette really
its just a bunch of rotated planes with outwards facing normals
Try to reduce overdraw and make an lod with much less geometry
And you can use triangles if you want you know
my characters arent visible in the game
does anyone know a solution
only the map is
make sure the camera can render the objects
this is one of the most common issues
can you try moving back the cam on the z axis
by how many
open transform from the drop down
check the sorting layers on your sprite renderer
is there a workaround to modifying rectTransform.xMax from a script?
oh
As far as I can tell there is no "rectTransform.xMax" on RectTransform:
https://docs.unity3d.com/6000.3/Documentation/ScriptReference/RectTransform.html
Are you talking about something in the inspector?
do you mean its rect's xMax?
i think you're supposed to use its anchors
press play maybe
@elder isle go do unity essentials.
assuming you attached the script to a gameObject.
i did
yeah .rect.xMax is what im talking about
You can fully control the RectTransform using its properties from scripting listed here. Check the docs for more info. The way it works in the API is a little different from the UI in the inspector.
where is it located
rect is readonly from scripting
correct but it's calculated from these properties
by modifying these proiperties like sizeDelta, anchoredPosition, anchorMax etc the rect will change
rect is the end result of all these
yeah, just sounded like you were saying rect was one of the properties that can be used to control the rectTransform 😅
is there a way to mimic modifying rect.xMax?
yes, by modifying those parameters
there are multiple ways to achieve changing xMax. So you really have to be more specific.
e.g. changing the anchored position OR changing sizeDelta OR changing anchorMax these could all modify the rect's xMax
your question is underspecified.
to make it look like its shrinking from that direction
you probably want to modify the sizeDelta then
but it depends on how it's anchored
if it's anchored on the left, modifying sizeDelta will change where the right edge is
and vice versa
ok, thanks
Have you tried adaptive probe volumes?
exaclty what it says
so how do i fix it
It spits out a kernel bug
so I am literally unable to
your project is using the new input system (which is the default now) but this code is using the old one.
You fix it by changing which input system your project is using or you switch your code to use the new system
!unput
There's no command called
unput.
To set Active Input Handling, go to:
Project Settings > Player > Active Input Handling
• Input Manager (Old): Use the original Input settings.
• Input System Package (New): Uses the new input system package.
• Both: Use both systems.
its a hardware issue?
more like a Kernel issue
apv's saved me a lot of time and sanity
I would use it
manually placing probes feels primitive now