#💻┃code-beginner
1 messages · Page 208 of 1
doesnt matter
He is asking us to comment the code
As much as possible, identifiers should be self explanatory. Comments are for when there's something too complex or weird to understand at a cursory reading of the code
Im not commenting on basic things mostly just What does this does
Yes, you're learning and it shows you understand the point of your code
Or for TODO reminders
Writing code as a learning exercise at school is way different
So it's not fair to say that you should not write comments often here
it's like learning how to drive, completely different driving style to pass the driving license test, then you basicalyl learn how to drive "properly" again
-to Order Initiative, probably more to the point so it proves you didn't just copy/paste from someone else and not understand what it's doing
now I do. so adding field makes exposes non fields in unity?
I mean that it exposes non fields
Yeah, nobody is looking over both shoulders and three mirrors before making a turn in a real life scenario, but when you learn this is important so you show you know your surroundings 😄
Even if it's super clear to you, it's now clear to the teacher
Also very true, yep
last year I made end of the trimester project in 1 class. C# non unity.
with 0 comments.
teacher wasnt happy
it was like 2k lines?
doing projects for school is much different than doing real projects
So what are differences?
ah, ok took me a minute but I've honestly been sticking public getters on all my serialized private variables for a while now so seeing it without is alien to me rofl
didin't we like explain that in 10 messages above
no worries 😄
Im kinda here and not here. Discord is on second screen
not our problem kinda
It simply targets the attribute at the backing field of an automatic property
Whatever the attribute is
omg he is still writing
What is this for?
its getting longer xD
Please stop spamming the chat already
spam + full of errors anyway
Yes! And that unfortunately does not compile. There's two Update, the class is not closed, etc.
is your IDE configured Kappa
I didnt even read a line I seen flip() and thats it
Not only is this code completely irrelevant, it's not correctly formatted and above all full of errors. Please stop it already
Ah yep good spot. Flip() is not declared anywhere lol
Gl unity
No because it's unusable
use what
It's not correct code
Since this took so long to type, did you do it on your phone? That makes it tough for avoiding repeated stuff. Like you started update, but then opened another update for example
It's literally broken
2 updates are better then 1
Runs code in parallel
got errors
Always double update
!warn 1205955428760944743 Stop spamming on the server. If you continue you will be banned.
makrusbruh111_45325 has been warned.
new threading. You want to have 3 thread? just run 3 updates
I swear the code I see here gives me ideas for the worst programming language ever
Im having issues with gun of enemies...
private void LookAtPlayerWithGun()
{
var playerPos = _enemyController.Target.transform.position;
var y = playerPos.y;
var yClamped = Mathf.Clamp(y, -10, 10f);
var targetPos = new Vector3(playerPos.x, yClamped, playerPos.z);
_gunObject.transform.LookAt(targetPos);
}```
I wanted lookAt to not look directly at ground or 90 up
then you just pretty much answered yourself
actually, they dont, they resolve to 0-360 but if you want -270 you can have -270
angle%360
just depend on the range (-180 to 180 or 0 to 360 or whatever you like)
and yet you post no code
I will just point out that it's common to do it the way they're talking about. If it didn't work, it's because of implementation
tf
you do if you expect any kind of help
then what's the problem
you know everything
if you want to get help, show the code
we are not wizards
we dont see your code
you said eulers go between 0 and 360
that is incorrect
already explaind to you by 3 people
ok
im tired of you 😄
you can do whatever range you like
-180 to 180
0 to 360
Ok then, all of us doing it that way are just imagining it I guess
do you have some issues with reading things with understanding
What is this lookup overload with second parameter?
It does work, what you have done may not work but if you refuse to show us the code then you are on your own
it does work 😉
Write the first parameter and it should explain the second parameter
Otherwise, 
doesnt work for you != doesnt work
Im looking at docs
Then it rotates the transform to point its up direction vector in the direction hinted at by the worldUp vector. If you leave out the worldUp parameter, the function will use the world y axis. The up vector of the rotation will only match the worldUp vector if the forward direction is perpendicular to worldUp.
just use the world y axis up
It's basically which way is considered up. If you look at someone while standing on your hands with feet up, the up vector will be pointing down
yeah not what I needed sadly
for the majority of cases it works, but say you're tilted at a 45 degree angle and you now want to say hey, my transform up direction is now the world up direction
something like that
yeah I understand
im done talking to you at this point
you dont understand a single word
we just said
roff, do you know how Quaternions work?
No...
-1 to 1
angleDegrees = (angleDegrees + 360) % 360
so what do you think you get when you convert a Quaternion to a Euler, which is what localEulerAngles is doing
Yo, im trying to set up some simple A* pathfinding but im having issues getting it to Scan Obstacles.
- Layer is set to Obstacle on 'ObstacleTest' GameObjects/Prefabs.
-Obstacle Layer Mask set to Obstacle in pathfinder script inspector for A*
Scan still wont recognise the GameObjects with Obstacle Layer Mask :(((
Not sure where to go, from here. Tried adding various components it might need such as Colliders etc and still no luck.
I've 1:1 did everything in the Brackeys tutorial so not sure why :/
yes, but probably not the ones you are expecting to get
Quaternions are complex objects internally, but it's better to work with them compared to Euler angles. They have less limitations.
As long as you know the 4 or 5 methods to manipulate quaternions it's not that hard to deal with them
But that mistake exposes your misunderstanding about eulers.
Here's all I know. I have clamped eulers before. It works as I wanted. If it did't work for you, you should show the code
Euler -> Quaternion != Quaternion -> Euler
and refuses to share code
so what's the point
either a troll or idk
then why are you discussing
if you already know the answer
angle axis is another method you can look into if you can't figure it out
but regarding to your knowledge
it wont work
because you cannot clamp it from negative to positive
and you are CERTAIN you cannot
so how do you want to fix something, that's impossible
i've counted 4 people in this chat
told you that this is possible
Why aren't you using Unity's build in addon for pathfinding?
and yet you are arguing with everyone
and refusing to share the code
so stop wasting our time or just show the code
Thats a thing?
and what did I say here? #💻┃code-beginner message
You're better off storing the X/Y angles in variables in your script, instead of reading the Euler angles from the Transform, operating on them, and applying them back. This is because for one rotation, multiple Euler angles can represent it. So on two consecutive frames you might get two different vectors
Yeah, I am using it
Degrees can and regularly do go to negative numbers. Unity fucking loves turning euler angles into negative numbers
I think you can find it on the package manager if you search for NavMesh or something like pathfinding, I don't remember
similarly, angle axis and store rotational degrees and append the difference in rotations
its AI Navigation
2.5D its like 2D game with 3D objects right?
True
I think of it more like 3D game with 2D sprites n stuff
Nah, more like 3d world with orthographic camera
Edit: on second look, I guess that's kinda what you were saying
Also, not a code question
Oops sorry about that
but tnx any way
for answer
I think it is more like you are using 3D for most of the stuff, but it is just working in layers and one of the axis is barely used
#💻┃unity-talk is this section for asking questions about this stuff?
Yeah, or #archived-game-design
All good!
What you've read is wrong, and you can prove that by just trying to rotate an object in code and looking at the inspector.
To clamp euler angles, the best way is to add 360 to your angle, min, and max, then do the clamp. Unity will handle the rotation being "out of bounds" and convert it back
When I clamp angles I usually just... clamp every axis individually; probably not the best but else I get all confused
You need to post your new code
📃 Large Code Blocks
Use links to services like:
https://gdl.space/, https://paste.ofcode.org/, https://hatebin.com/, https://paste.myst.rs/, https://hastebin.com/
📃 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.
Okay I expected much more lol
man, at this point you are just trolling, either shit or get off the pot
The usual way of applying a rotation is done with the quaternion. At least, that's how I've learnt it and been using it since
thing.localRotation = Quaternion.Euler(-40, 0, 0);
There's also .rotation if you need it in world space.
Quaternion.Euler() constructs a quaternion with the specified angles in degrees
Okay so yeah the lines above are really important, since they also modify the rotation
Until line 13, where you read back the Euler angles despite the advice against doing that
Seems like you're not using two variables like you told me you'd try doing
what did I tell you about this?
Vector3 localRotation = cameraTs.localEulerAngles;
no, that it will not return the values you expect it to
So despite your constant insistence of the latter, the code you've been refusing to show is the source of your problem.
When you get local rotation, you are getting one of infinite possible euler angles that express that orientation. You can do .Rotate on only the X axis, then when you do .localEulerAngles, you could get back an angle entirely in Y and Z
exactly what SPR2 told you to do
I made some simple data save system that saves values from Item class, there is a list of Items that i load, but, i also want to save extra data for manager like LevelSettings, and it should not be in list, can i do that?
sure why not
Am i just need to make another class like Item and put it in file? Or some extra code?
no, this #💻┃code-beginner message
I usually make structs of data inside of each SO that I want to serialize unique data for.
otherwise I just serialize the ID of the SO and make a lookup table of SO/Prefabs
I did same thing in my level editor lol, but how u make IDs? I just put them all in one list..
Thing with SOs is you don't usually serialize by the type, but rather the ID that specifies that specific asset instance.
Oh okay..
you need to store the start rotation in a Vector3, modify that in Update and assign it to euler angles
so what I do is I just generate a GUID for each instance I make from a single SO
Thanks for advice
and on start of the game I generate a lookup table with keys being the GUID and the instance that it points to
Okay ill try
this way works for most presets, but if you do have settings like a volume slider (some float value) that you want to save, then you go with adding these values into a struct which you would serialize instead.
Thank you... i didnt even know about structs lol😅
It will help me a lot
So for example, you have a GunSO that has instance Glock, you'd have a ID that refers to that Glock instance and a struct that has previous session values of upgrades, loaded ammo, ect.
Ye i do same ig, but instead i save pos, rot, and id, and when player load file it create new objects by IDs, ill may add some extra data soon, like customString1/2/3 and etc, cuz i dont want to create tons of code just to keep some stuff, like, if there is a specific item to use with object, ill just get that custom string, and i have different class that get all data from Item and does stuff, so, if ID = 19 it will just add component, and values like object to unlock and etc will be just these custom strings or etc.
Is it good idea? Im still not that good at code..
hi, i am currently programming a evolution simulation and i have problems with the field of view always outputing angle = 0 even though the direction changes. I have print multiple values and aslo tried Vector3.Angle and inputting vector 2 to vector2.angle or vector 3 to vector2.Angle.
// Method to check if a given position is within the angle of view bool IsWithinAngleOfView(Vector2 position) { Vector2 direction = position - new Vector2(transform.position.x, transform.position.y); float angle = Vector2.Angle(direction, transform.forward); return Mathf.Abs(angle) <= angleOfSight / 2; }
Right, overall you want to minimize serialization by using some type of identifiers such as IDs.
then let your load manager handle how this object should be constructed with the limited data saved
Oh okay, thanks
Enum and strings like you've mentioned can be another way to identify what components will be needed to construct these objects.
Ur I.D.E is saying that doesnt make any sense
Why have a parameter when ur just gonna hard set the value anyway?
setTimer is not gonna do what you think it will
setting a method parameter to not use it anywhere makes no sense
but I am using it
no ur not
you are setting the parameter timer not the class variable timer
so why have a parmeter if you dont use it?
do yourself a favor and take a basic c# course
I did myself that favor years ago just gotta remember now
Ive not used this in a long time
this is very basic programming, perhaps you are well named
😂 thanks
You should name your variables better
Not just with this., private fields should start with an underscore
not the style police, again
oh please, they're missing basic of c# you think that code style is relevant now ?
Ive done the int part succesfully
The issue is having similarily named variables, and this fixes it. Get off my back
float part is kinda rough for me
noted
they should learn what is even the point of having method params 
says who
the c# president?
This is basic c# conventions
says basic c# naming conventions
And considering the issue is similarity of variable names, worthy to point out
Basic convention is starting a function with a capital letter. Underscore is definitelly not enforced.
well what I did was pretty simple just get set and return
yes _ is def for private but no one forces you and you should not care to enforce it
I was planning on using it later
https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/identifier-names#naming-conventions
Private instance fields start with an underscore (_).
The style police, people who cannot think for themselves and want to impose their misguided view on everyone else
You're missing the point. This is a basic way to fix the issue that is commonly used, even if it's purely style.
you shouldnt argue here please
he gave me a recommendation taking it or not taking it is up to me
How do I check if the PlayerInput.currentActionMap == a certain action map. I'm having trouble actually referencing the target map I want to check the epression on
Code style is a fix to the issue they were facing, see the exception to the rule you just pointed out
Now stop the bickering unless you're actually here to help, both of you
"unless actually related to" 1 line below
Yes, an _ will fix his problem.
rolf, no it wont
its not related though
Thats not his problem
Exactly, that's the point.
His code doesnt make any sense
their original issue is they dont understand how method params work
it was a sarcasm xd
He has a float parameter he then hard sets the value anyway making the parameter portion make no sense
https://hatebin.com/lnaifawrvh
For some reason healthbar appears really suddenly.
Even with _timeAlfaChange set to 1 second. It shoud take 10 seconds to appear instead it appears instantly.
damn you should really use DOTween
for that
dot?
DO Tween
Pronounced Dough Tween
not dot
This notification is triggered because the local parameter matches the class-scoped variable, and therefore the local one took priority. This means assigning the variable doesn't actually do what they thought it did.
Oh
That's why the underscore fixes it
Relating to this message #💻┃code-beginner message
And that's not code style?
Let's drop the argument here
again ,but thats not the original issue
agreed
In packages?
in asset store
Yeah its a pretty popular package
used in every of my project
just bumping cause it got buried
thx
And how Im supposed to add functions from it?
so you can do
healthbar.DOFade(0, 1).OnCompleted(/* do stuff after the fade is completed here */);
I would check the docs as well as the new Input System is pretty complex
Just download and import?
you put it inside
download and import the package
then you can use it
just add the namespace
Ive fixed it
Lets see the new code
namespace? like using DOTween?
the only thing shitty about dotween is the documentation
hmm not so sure about that. wouldnt want people argue again
how come it's pretty nice for me
Fair enough tbh
anything in particular?
ehh its not a typical API docs
well yea
and linkable snippets with explenation of methods properly
@earnest atlas
DOTween is the very first thing I install upon creating a new project. Animate your position, rotation and scale in a single line of code, with all the customization you could hope for... and that's only scratching the surface.
For the full documentation: http://dotween.demigiant.com/documentation.php
❤️ Become a Tarobro on Patreon: https://ww...
watch this
should help you get started with dotween
amazing asset ngl
and for free
they should use something like DocFX
Unity community stay making unity useable No offense mods
so basically all of your code for showing healthbar
can be litearlly just
healthbar.DOFade(1, duration);
instead of doing coroutine + while loop
yeah Im implementin it
Hi, I want to do equip backpak but if it spawn it spawns somewhere else where I don't want it. How can I spawn object where is his parent?
Show the whole editor instead of cropping
Why are you instantiating it even? Just parent the object
and set localposition to vector3.zero
How can I do it?
by code
why are you instantiating a object and destroying it at the same time
go and look at the Transform docs
Google should easily find you what you want
okay
This works. Instantiate creates a clone of the object.
Then they are destroying the original
It works, but it is unnecessary
The clone stays
They just want to parent the object to themselves
They are destroying one instance and creating another just to parent it
Yeah, just answering that it is not destroying the same object
i see loads of people in tutorials do this, is there any point when its false already
no, only for clarity
It would only matter if the variable was local to a method
or not serialized, it could generate a not initialized compiler error
ah ok thanks, i just do it cuz they did it
tbh it's not a good idea to initialize serialized variables, they can give you a misleading idea of what the value actually is
why is it when slerp is 1 its giving me the wrong angle instead of 45 its giving me 60 while 0.1 gives me around 45 i got two objects that rotate on the x axis [0,90] average should be 45 https://pastebin.com/enBYahjA
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
didint you ask about the same thing
couple of hours ago
yes the other guy just left and it didnt answer why 1 was giving me 60
no it didnt we just said 0.1 was updating every frame which did work like i said but didnt explain why 1 is giving me 60 if i missed it do tell
where do we talk about 1 giving me 60 when it should be giving me 45 am i blind?
it shouldnt give you 45
exactly
transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.Euler((averagerotation / (objectlist.Count + 1)), 90, 180), 1);
you are changing transform.rotation every frame
Using quaternion and attempting to read the euler value is a bad idea. I dont know what these magic numbers are of 0.1 60 etc but dont trust the inspector values. These are euler angles converted from the quaternion
but within 1 frame they both should be at 45 which the average just repeats itself to 45
not this bloody conversation, again
Please reread what bawsi just said
i did i was just answering the other guy but ill just leave it
do not ever expect a Quaternion to give you understandable or expected results
Anyone know how to safely exit this infinite loading loop or is alt + f4 fine?
also anyone know what causes this
private void LookAtPlayerWithGun()
{
var playerPos = _enemyController.Target.transform;
_gunObject.transform.LookAt(playerPos);
}```
Why this happening?? LookAt works weirdly
Since it is entering play, it may be an infinite loop in your code
And yeah, just kill the program any way you wany
Loops are usually culprits, Filling up memory.
Assuming you saved, alt f4 is fine
If you didnt save, your scene will revert to the last save
Check visual studio if you have a break point
There is a single backup you can retreive if you don't open unity again, so you don't lose your progress
okay yeah just checking if hard closing is fine
When its entering play mode like that, your fine to close it. When its doing other things like compiling the project, i wouldnt risk it and just let it sit personally.
awesome, thanks
For compiling, it's actually safer. The code is saved externally
If it is compiling, it is already saved
Oh really? I always just accepted my fate and went for a walk 😂
https://pastebin.com/fJJMBcy2
I'm trying to make a script to change the texture of a material, the material has a shader on it. When I use this function it won't work
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
It's not like a walk would magically solve an infinite loop. You have to close it
The only thing lost is the unity side of things when closing unity
What to do with look at when transform front is Y axis and not Z one?
Fix the model
Where do you call the function? Have you logged any thing to make sure it actually runs
How to rotate this?
fix the model pivot
Either parent it to a empty GO and rotate that so that it aligns, or fix the model properly and rotate it in like blender
i made the function happen in a button, i know for a fact that it works. i tried with the standard shader and it worked, just not with a shader i made
Did you name your texture property correctly
Main texture changes a texture parameter of a specific name
You can see what that is in the documentation for it
WOWW hmm is blocked
so i think i see what youre saying
one sec
Did you name your texture property correctly
Main texture changes a texture parameter of a specific name
You can see what that is in the documentation for it
The name displayed in the graph and the property name are different. Make sure you use the property name, you can see it when you open the settings of your parameter.
isn't Texture2D The name?
It won't always be like that. Sometimes it puts random numbers at the end to make it unique. Make sure to know where the property name is, and how to change it
Ok
i made script that change var from other scriptwithout drag, is this fine or is there better/shorter way?
mainScript main = GameObject.Find("Canvas").GetComponent<mainScript>();
main.health--;
The better way is to drag-drop
thank
don't use Find methods, ever
yes thaat what i was thinking, if i drag drop i dont need Find() anymore i think
I have this object as a child, so when the bullet is spawned in it moves with the player. How can I make it spawn outside the Player but still at that position? cs Instantiate(bulletPrefab, firePosition);
Edit: It was wrong because I needed to do cs Instantiate(bulletPrefab, firePosition.position, Quaternion.identity);
I want to know how I can simply make my direction for where the Player shoots change according to its Y rotation. 2D (Currently I have a script for Bullet and Movement script which is where I flip the Player)
GameController.Instance.GunRotation = _gunObject.transform.rotation;
Instantiate(_bulletPrefab, _gunObject.transform.position, _gunObject.transform.rotation);```
Im thying to spawn a bullet with same rotation as the gun. And its not rotating for some reason?
The gameController one is me trying to force the rotation
What I like to do is get the forward direction of the player and use lookrotation to initialize the rotation of the projectiles
or u can just match the rotation and then launch it forward.. same thing
Its just to make it in a form of a long bulleyt
let me guess I need normal object to rotate it correctly...
make sure u only modify the visuals then, never modify scale of the Main root object
ie visuals always go as child of root
and be scaled individually
idk ur original issue though lol just butting in to say that reminder
yeah I know that issue
I made the prefab now in normal object lets see if it commits die now
Ask
I have some questions that are probably common?
ok what are some good beginner projects for a beginner and should i go with 2d or 3d?
what is the best way to learn without become reliant on videos and such?
what version of unity should i be using and how do i know if unity is for me or not?
i might have some more questions latter down the line too?
- I started with basic 2d then moved to 3d.
- Do things. You will always be reliant on google.
- Dnno download it form unity web. Im using the standart.
is there anything else you would like to add or tell beginner in the world of unity gamedev?
I hate bullets. Im going for raycast
But with raycast enemy is just gonna shred the player omg
- use unity learn (text based (with videos too) https://learn.unity.com/
- read the Docs often when learning new things (they'll go into detail)
- nothing wrong with videos.. you can learn from them (its up to you whether or not your just copying w/o trying to figure out what things are)
- a good example is https://www.youtube.com/watch?v=_cCGBMmMOFw&list=PLFt_AvWsXl0fnA91TcmkRyhhixX9CO3Lw&ab_channel=SebastianLague this playlist.. it isn't just a game video (its a video that walks you through the basics of coding and unity)
- don't be afraid to start over if you're stuck.. learning is trial and error
Thank you both for telling me theses things.
np, good luck 🍀
Yeah hopefully things go smoothly and such.
make sure to get ur IDE up and running w/ unity.. it'll help you along the way by highlighting errors as you code.. !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
• Other/None
visual studio community is my pick of the litter
What you think about this?
if u do the (via Unity Hub) method.. it'll be easier as u'll be downloading unity anyway
looks normal, i dont like the method name
but thats just personal preference stuff
Well imagine your enemy has raycast hit detection
Im just taking a piss at that name
Do not use var when the type on the right of the = is not apparent.
^ good tip
Well there is kinda aparent due to naming
also whatever Extension I have is telling me to throw var everywhere
w/o the tooltips u have enabled. it'd be harder for someone to glance and know
Im curious but what was all of yalls first unity game/build? if you dont mind me asking that is or is this the wrong channel for that?
Platformer 2d
I think the random can be simplified to return player.position + (Random.insideUnitSphere * 5);
But yes it does require you to deduce the type by looking at the expression
cool, im still thinking what my first small project should be its just all daunting so far.
Random.insideUnitSphere * 5);
What does this do?
InsideUnitSphere gets a vector that points randomly, and its length is between 0 and 1
Multiplying by 5 extends the radius to 5
private static Vector3 GetRandomOffset(Vector3 startingPosition)
{
float xOffset = Random.Range(-5f, 5f);
float yOffset = Random.Range(-5f, 5f);
float zOffset = Random.Range(-5f, 5f);
Vector3 newPosition = startingPosition + new Vector3(xOffset, yOffset, zOffset);
return newPosition;
}```
this would be my version.. pretty similar
Passing in a vector3 instead of a transfomr.. since thats what id be grabbing anyway
Also you would use -5f, 5f otherwise it only returns integers
ahh true
yoinked
so its a classic space shooter? Interesting.
yea, highscore games are the easiest to start with
i have abunch of ideas but they seem hard and i dont have time to do them, which i heard all coders struggle with at first.
ya, i didnt move over to 2d until here lately.. (2 years in unity)
angry birds / flappy birds are also a common starting project
did you have to learn 3d modeling?
i already kinda knew how.. as i was a digital artist first
How to upload a video?
someday i want to do a 3d game but im not sure if i can sense i dont have much freetime with school and all, also i struggle with learning certain types of things.
theres 1000s of free unity assets that u can get started with
u don't have to know modelling to do a 3d game
what if there is something i cant find? what are the odds of that?
most common things u think of for video games are there..
that is good to know
theres chances u might not be able to find what ur looking for... but as a beginner ur probably not gonna wanna be too worried about how it looks
cubes and spheres will suffice
lmao, that minigun is wilding out
Never something backfired so fast and so bad xD
my dream games are either an open world game or a visual novel and im not sure how to work towards that or if its possible for me to do.
Sounds interesting.
It is, but most likely is on levels of insanity
possibly but i have no clue.
same
do i need to know 3d modeling to make a 3d interior (like inside a house), or is that what free assets are for?
theres free assets for that too.. maybe not a house
free assets are pretty much the only assets you gonna use when you study
but interior spaces.. besides u can make a house w/ blocks..
1 big block for the wall.. and 2 smaller blocks for the baseboards and crown molding 😄
Enjoy you house
instead of asking lots of irrelevant questions, the answers to which may never apply to you. Just start with !learn and see how you get on
:teacher: Unity Learn ↗
Over 750 hours of free live and on-demand learning content for all levels of experience!
it on up there.. pretty close to MMO
we got us a house you guys...
how can i make a static integer not save between scenes?
you cant
alr shouldd i just set it to 0 on start()?
just dont make it static
//raycast direction
Vector3 rayDir = transform.TransformDirection(new Vector3(0,-0.75f,0));
//actual raycast
if (Physics.Raycast(rayStart, rayDir, out RaycastHit stepLocation, 1.5f))
{
//make bottom of player teleport to point
Vector3 stepLocation2 = stepLocation.point + new Vector3(0, 1, 0);
transform.position = stepLocation2;
}```
Trying to recreate cc step going up and with this I just fall through the floor. I think the problem is it's just putting me down constantly but I don't know how to fix it.
What is its purpose?
it is an integer representing how many enemies are currently alive in the current wave
just have some kind of WaveManager
I wouldn't recommend making that ITSELF static, consider making the object holding it a singleton? I'm assuming static was chosen for ease of access?
Either way, when a new wave starts, just set it to 0, as you said.
So not Start() but the method that begins a new wave
and make normal int
making it static is just you having no idea for good architecture
🤔 didnt I answer to you recently on this or was it someone else? You are likely being teleported into the floor at one point. The raycast will not detect anything it starts inside of so it doesnt see the floor anymore
Also use the debug draw ray methods to visualize where your ray is
I did not know debug draw was a thing but I will be using this constantly for the rest of my days
thank you good sire
What is the difference between **ExecuteAlways **and **ExecuteInEditMode **Attribute?
Did you read the docs?
Yes i did right now :d
It seems the main difference is ExecuteAlways executes even in prefab mode while ExecuteInEditMode protects you
I'm trying to store multiple scripts into a single List.
I'm getting an error about how each script in the list is a "type which is not valid in this given context"
What might be a fix?
Well, 1, this is a REALLY bad idea
2, you have to cast them
Oh, and you don't store the type
yeah i figure it is a bad idea. sorry, but how do you cast them?
You store an instance
you already serialized it, drag the instances of script in the inspector..
Why are you using MonoBehaviour instead of a parent type or interface?
scared of c#
Ok, well you are creating a hell for yourself right now. I would be scared of that first hahaha
And doing what you are doing is c#
OK! I'll try the interface method; I think I saw a tutorial that does that instead. But, just wanted to see if this would even work. Thanks for the help :]!
If I invoke a function in update, and the timer for it to start is longer than the update cycle, will it make multiple calls of the invoked function, or will it wait for it to end first?
Multiple
thanks
Multiple calls, as Update will run a few times before the first invocation
I'm having an issue where transform position is the position of the layout game object, not the item in that layout.
public void AddCard()
{
Assert.IsTrue(_handCardViews.Count < PlayerHandService.MAX_HAND_CARD_AMOUNT);
var newCard = Instantiate(_handCardPrefab, transform);
newCard.Create(this);
_handCardViews.Add(newCard);
RecalculateTransformsAndIndexes();
var drawnCardPrefab = Instantiate(_drawnCardPrefab, _drawnCardTransform);
drawnCardPrefab.MoveTowardsCard(newCard); // <---- Passes the instance of the created card in that layout
}
// MoveTowards:
public void MoveTowardsCard(HandCardView cardView)
{
_view = cardView;
_targetPosition = cardView.gameObject.transform.position; // <---- I expected this to be the position of the card (in the screenshot the one in the center right, for example). But it moves until the start of the layout object
}
question, I'm going to start diving into menu navigation with a gamepad. Few questions:
To help prevent reinventing the wheel, is it common to use the "Input System UI Input Module" component?
If I were to use that does that mean I need to use it with buttons only? reason I ask is tutorials that I'm watching/learning involving inventory systems typically create the slots using empty gameobjects.
...start with that for now
this is a code related channel
Assuming you use UI, all selectables (buttons, sliders, and so on) are navigatable, so that works out of the box
so that removes the option to use gameObjects as slots which can be navigated around, right?
Sorry, sound this be more in the ui-ux or ui-toolkit channel?
I really don't know what you mean by slots
Man, this is REALLY hard to figure out. Now my map sprite disapears and Ctrl Z isn't fixing it
think displaying an inventory grid, each one has a slot but they're really square gameObjects
This is a code channel. Try #💻┃unity-talk
I'll take this to one of the other channels though. Thanks so far
Oh mb
They're all buttons? You can use the Grid Layout, foer example
Even then I fixed it lel.
know this was like a hour ago, but can i tell you about my lord and saviour Random.insideUnitSphere
var pos = Random.insideUnitSphere * 5f; is the same as those 3 random ranges
that random spread got nerfed a bit
||a lot||
insideUnitCircle btw
(You have inside unitY Circle)
Well, yours is inside a sphere and theirs is inside a box so it's different
And the sister method (not relevant here) OnUnitCircle is great too
Oh sorry. Yeah sphere
where its long lost brother OnUnitCapsule?
Yeah I also use sphere more often
yeah i know, edited it
Yeah just noticed sorry haha
i do that typo way to much
I'm getting a "The name 'Instantiate' does not exist in the current context" error. But I have "using UnityEngine;" in the script. Does anyone know what's happening?
what type is this class extending from?
you might have to do a Object.Instantiate instead
You are probably used to extending from MonoBehaviour.
If you don't extend from that (or other UnityEngine.Object classes) you can't just straight up call Instantiate
looks like a class for a fsm
yes its extending from FSMState
keep in mind you also lose StartCoroutine as well, and you need a real instance for calling that
Does that, in turn, extend monobehaviour?
_healthBar.transform.LookAt(_enemyController.Target.transform);
_healthBar.transform.rotation = new Quaternion(_healthBar.transform.rotation.x, 0, 0,0);```
Will this make something looked at but ignore only look at it with X rotation?
Needed only Z one. But anyway same question
Is this error my fault or it just a random Unity error?
quaternion is not what you think
use Quaternion.Euler intead
Cause I don't think I touched anything and I don't know what that message even means
it means you tried to access a array or list with a index that was too high or too low so below 0 or above its count
?? no?
get rid of new
Unity bug, restart your Editor
I mean, I literally did not even run anything
oh it might not be your code
Will this work?
just clear it and see if it happens again
well you are putting your y value into z
is that intended
Yes, totally 🙂
true, i noticed someone else mentioned it as well.. thats def cleaner than randomizing 3 floats
but yeah with a regular Quaternion the x, y ,z ,w do not repersnet what most people think they do. so generally always better to work with quaterions with the static methods it provides and not new
Hello, how can I make it so the game chooses a random scene.
For example: I have 3 scenes of different colors, I want to make it so when I click on a button it loads anyone of these 3 scenes.
Array with scene names
Any documentations or videos would be helpful
Random.Range
and make a array of scenes
Random.Range(0,sceneArray.count)
thanks so much ❤️
have another question, I'm planning on making a level where anvils drop on players and they have to dodge it in 2D how can I make the objects/anvils drop along x axis
I watched videos they all explain on how to make it spawn at random positions
but I want it to be random along x axis
Sometimes I wanna hang chatgtp on a rope
so they are droping down on the y but you want to randomly distrubute then along the x axis?
_healthBar.transform.rotation = _enemyController.Target.transform.rotation;
How to make healthbar rotation face player. Sets its rotation to players rotation
1000iq
YES
❤️
I dont undestand vectors like at all
Then learn them, there's not much to them at all
On some absolutly subcontious level my brain denies their undesrtanding
same function i showed you before, can use it to get a random number in a range, and feed that into the x position of the anvils
Its like division in computer.
so could do like float x = Random.Range(-5f, 5f);
then use that x to overwrite the x position on the objects you want to drop
I love the fact that people are still discussing a way to get 3 random variables
I asked chat gpt for code that destroys objects and he just used Debug.Log("DestroyObject")
alright I think I'll be able to do that tysm
Even better when you ask him why something fails and it spits you back same exact code you just fed him
And I love the fact that people are still struggling with basic stuff, such as vectors, and prefer to use GPT instead, which then fails as normal
IF AI fails with vectors what Im supposed to do
Learn vectors?
FR
That thing is consuming like thousands times of power then I do
its literally something you are taught in regular high school math
I have better undestanding of quantum fisics then vectors
not a concept that takes that long
I just cant understand them, they evade my understanding
Guys, is it worth to buy an horror kit?
Depends, what even is that?
If you plan on making a good game you publish yes. If you need it for school project no
If you have lots of money for some reason then dnno
UHFPS - Ultimate Horror FPS KIT
Yea
What's there to understand, it's literally just 2 or 3 float values bundled together which mean some stuff
I know what they are, I dont understand how they work
for what you want them
I've always wanted to make a good horror game
Can you make a good horror game now without 50 bucks of assets?
Kids learn about basic vector math in the science of physics. How to add vectors using the head-to-tail method and the Pythagorean theorem. Example problems and the commutative and associative laws.
Im learning C# for now
just wanted to update that I am now doing this the correct way lol and it is WAY code-friendlier and better. thx!
Then you dont need 50 bucks of assets
i hate chatgpt code stealers
bruh I know this
I have an idea
gpt code stealers?
Apparently not if you're asking GPT for a solution to your problem
is something stolen considered stolen if its stolen again
yea, like asking chatgpt to generate code and using it for absolutely everything in your game
debug.log("CreateCode")
Ohhh . was about to say GPT code is already stolen
but yeah its nonsense mostly
Before when I was dealing with paradoxscript that is pretty much unkown language for ChatGPT it was constantly hallucinating everything
The less known language is it the more it hallucinates
does it matter if they dont understand it, it will all fall apart when it comes to tweaking and expanding on things
I tried to make a sandbox game with chat gpt, there was soo many errors in the console
Sooner or later everyone doing so will see that it's heading towards nothing good as soon as they try expanding their existing code or doing something more advanced, it's just a matter of time
Yeah you defenetly dont need 50 bucks of assets 😄
Hey all, say i have a ball, thats travelling in a general direction to the right, could be diagonally up/down etc. How would i go about figuring the 2D coordinate where it would pass a certain point? Hope that makes sense. I've drawn a rubbish paint diagram to try and clarify what i mean. (Using rigidbodies for assigning its velocity and gravity does not exist)
if (chatgpt == true)
IQ = 0;
I can download it for free
and = for assignation lol
sorry lol ive been coding in python for the past week so im not the sharpest on c#
im pretty sure that's bannable here
Once I tried to make chatgpt filter me a list from rubbish. Basically was just trying to get mod names without their descriptions.
Im pirating every game/asset and if I like the game/asset Im buying it.
<@&502884371011731486>
Facepalm
Alr, Im dead
Yep
Goodbye guys
On top with at best questionably gotten assets later you wont be able to publish anything.
idiot
admit to piracy , not the brightest tool in the shed are ya
does Standard Unity Asset Store EULA allows to publish paid games if those assets are used in production?
Im just not sure with all that legality
read its license
Im reading the standart one but so far didnt see anything about sharing
asking legal advice on discord would not be your best bet
rather do that then trust random internet people
Anyone?
simple vector math
That's basically finding two lines intersection
well its mostly just shower thought. Im not planning on releasing anything now
That depends if you want to learn the code or use it from the asset. Nothing is necessary to buy, only if you want to put in the work or not . . .
And so far public free assets did the job
I was wondering if there was a more efficient way with some built in unity tool
Lemme check the license
if you want some specific point you can just check for coordinates or trigger
My brain is failing me guys I need some quick help...
How do I get a random point around P but between two radii ?
i need to know pre-emptive to the collision though so that wont work unfortunately
hello. is there a component that automatically creates a bounding box of all children?
pre emtive?
Anyways, Im going to buy the horror kit
whats the problem? u cant just post random code.. and expect us to just guess and look for an unkown issue
You need to pick a random angle, then pick a random radius
The radius sampling is the slightly involved part.
buy 😄
- Get your current x pos
- Get your certain desired x pos destination
deltaX = desiredX - currentXdesiredY = velocityY * (deltaX / velocityX)
As far as I didn't make a mistake somewhere
no way it's that complicated...
RM is the outer radius. Rm is the inner radius
like as in the ball is travelling, but i need to know where it will hit the line before it actually does
normal math
ty!
The formula is pretty simple. Most of the answer is just explaining how they got there
was looking for this too haha i thought had it bookmarked
good stuff!
ha, there you go (:
Im pretty sure you can calculate that with basic physics formula.
Im not exactly sure what you want
what's fisics?
A typo I cant make go away
ohh, physics
.1f?
How have you declared ground
and assigned it?
it will spawn the sphere exactly in middle of groundCheck.position
it being 0.1 it might just not reach it
always best draw the Gizmos when possible to verify those
also considered pros of a sphere allowing to stand near cliffs and such because how it detects collision.
0.1f works more like rayhit but with more calculations
Is it possible to add Corutines to events? I'm trying to do so, but it says that the return type of the corutine function is not compatible with the current event
oh and make sure to add currentY to your desiredY as well
deltaX = desiredX - currentX
desiredY = velocityY * (deltaX / velocityX) + currentY
private void OnDrawGizmos()
{
Gizmos.color = Color.green;
Gizmos.DrawSphere(groundCheck.position, 0.1f );
}```
that ^
What did you try?
just use a void method to call the Coroutine function
You can link an event to a function. Not sure if you can do it with StartCoroutine(smthg());
Wrap the StartCoroutine into a method. Or use a lambda
When I tried to link with lambdas whatever assist I have is complainig about something
you need to debug instead of just sending unrelated info
I have a "StartFirstBattle" event, and a "StartSpawning" function in my spawner. Originally I made it with "async" to wait between spawns, but I'm building with WebGL and it doesn't seem to work, so I just turned the same StartSpawning to a IEnumerator and try to do it with corutines, but that happens
I meant cs public void StartRoutine(){ StartCoroutine(Routine()); } IEnumerator Routine(){ yield return null; }
Ooooh
Okok
Thank you!
what the hell is on the left
I said debug it first visually with gizmos
checksphere sucks to debug because doesn't give any hitinfo , just bool
show the inspector for the script btw the one on the gameobject
ok and can you show you put the floor in Ground layers
send full !code with website link ⏬
📃 Large Code Blocks
Use links to services like:
https://gdl.space/, https://paste.ofcode.org/, https://hatebin.com/, https://paste.myst.rs/, https://hastebin.com/
📃 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.
use components
but it sounds like you need Layers here
for grounds
just put the floor in the Ground layer
I think with the new search
this thing
wait nvm
oh yeah it does work I just renamed the object
I'm using Raycast for enemy detection. Is it better to put it in Update() or FixedUpdate()?
hi, i am currently programming a evolution simulation and i have problems with the field of view always outputing angle = 0 even though the direction changes. I have print multiple values and aslo tried Vector3.Angle and inputting vector 2 to vector2.angle or vector 3 to vector2.Angle.
bool IsWithinAngleOfView(Vector2 position)
{
Vector2 direction = position - new Vector2(transform.position.x, transform.position.y);
float angle = Vector2.Angle(direction, transform.forward);
return Mathf.Abs(angle) <= angleOfSight / 2;
}```
either works, I think they get called on physics step anyway
I usually just use them as NonAlloc and inside of a coroutine
some of my enemies have slower detection rates to keep perfomance up and dont need to be super responsive , even thought 0.1f-ish is pretty responsive
eh? raycasts are performed immediately
You can perform raycasts anywhere. The only thing that might matter is if you've just moved a collider
is there a function that will run when the gameObject becomes active? told by my lecturer there was but forgot the name
oh thats good to know
OnEnable
OnEnable will execute on an enabled MonoBehaviour when its game object activates
the physics system won't be aware of the movement until you call Physics.SyncTransforms() in this case
ty
(or until the next physics update)
doing it in FixedUpdate wouldn't really help, since the physics update happens after FixedUpdate runs
hello, i'm playing around in the inspector and i'm having trouble having the unit going at a constant speed
it keeps accelerating, but if i set acceleration to 0 then it doesn't even move
do i need to hard code this in or is there something i need to do?
Yeah I usually do them in Update or Coroutine, never done it in FixedUpdate myself
well, if your acceleration is zero, you don't accelerate...
If you want to minimize the amount of speed changes, set the acceleration to be much higher than the speed
That will make the agent very rapidly reach its maximum speed
turn AutoBraking off as wel
at least that helped mine when they reached corners or other agents it would slow down
worked thanks 👍
autoBraking controls how it behaves when approaching the destination
ill do that thanks
i wouldn't expect this to change how the agents interact with corners or other agents
Obstacle Avoidance settings will influence this, though
worked for me 🤷♂️
(for other agents, at least)
Trying to make an enemy detection script using Physics RayCast but I can't get it to work. This is what I've got at the moment, but from what I can see, it's not doing anything. I also can't see the option to enable the Raycast gizmo during play mode. Raycast gizmo is not appearing in my gizmo list
there is no "raycast gizmo"
you can use Debug.DrawLine and Debug.DrawRay to draw lines
Is 9 the ID of a layer?
If so, this is wrong. That fourth argument is a layer mask, not a layer ID
use LayerMask.GetMask("LayerName1", "LayerName2", ...) to produce a layer mask from one or more layer names.
LayerMask.GetMask("Enemy", "Map") would be a mask that accepts Enemy and Map layers
Oh, I see
When using Debug.DrawRay, why is the direction and the length of the ray determined by the same value?
That doesn't work, right? Because in my RaycastHit2D, my length and direction are different values
you mean dir*length ?
On the Unity Doc. The second value dir, determines the direction and length of the ray
yea
do what I sent above
Direction multiplied by length?
indeed
Provide a direction that is length of 5
its still the same
But 5*90 would be 450?
Is it possible to make it so that the RaycastHit2D not detect something is there is an object with a collider between it and the target?
filter the raycast by layer masks
and raycasthit just stores info about the hitted object by raycast
it doesnt "detect" anything
Well, right now the raycast only detects my player layer mask, but if I have an object between my player and the enemy, the enemy still detects the player when within range, even with the object in between the two
well yeah ur object isnt in the layers
I'm using that. I have input my player layer mask, but it still detects though objects
ofc
The object is in the environment layer
you only made it want to detect player layer
But it should stop the raycast, right?
no?
It will only detect objects on the layer you provide . . .
Objects not in the mask will not be detected by the raycast
you told it to ignore other layers besides player
Oh
It's the point of a mask, to selectively ignore some layers
So, how could I go about preventing the enemy from detecting the player when an object is between them, like a wall?
You need to use the raycast method that returns a collider or place the group of objects on the same layer . . .
Do not pass a mask?
place it on the same layer
or dont pass a layermask at all
craziness
But if I don't pass a layermask, how would it detect my player?
jezus
if theres a wall in the way it wouldnt
Without a mask, everything is included
if theres not a wall in the way it would.. it would detect everything that has a collider
becareful without masks cuz it might detect the collider from your enemy
if you are casting it from the middle of enemy for example
yup sometimes is easier to just put a ~layersToIgnore
yup
just start using the ray and debugging the hits
experimentation is the best method of learning
https://www.geogebra.org/calculator
just found this really cool calculator 🙂
desmos is the one i use works very similar
ohh ill check it out.. been thinking about doing some Geometry refresher and fiddling with tools like these
Is there a way to destroy a sprite once its animation finishes?
You can use an animation event at the end of the animation to call some function that handles the result of the animation completing, which could be destroying an object.
Hey, I made a minigame on when the anvils fall on the players and they have to dodge it. when a player gets hit the other player gets a point and I set the timescale to be 0 so it pause.
My question is how can I make it continue for 2 more rounds.
I use desmos for 2d and geogebra for 3d visualization.
It was very helpful for university calc
Should be fine to have a game manager either restart the scene after grabbing the scores, or have it reset the objects and then keep track of how many rounds it's been. This would likely be a DDOL object

i wish i woulda discovered this a while ago
What is a DDOL object
Just an object that lives inside the dont destroy on load scene
woulda made the normal vector stuff game devs deal with daily alot easier to understand
to see it visualized on the fly
Im sure a lot of the uni cs/math students know about it. My professor even pulled it up during the lectures because he said it's just not possible to draw some things.
Normalizing a vector is just a simple equation, divide each component by its length
Does this involve adding a state in the animator window?
Hello there, can anyone help me to fix this error:
ya, i built something a while ago with 2d grids in unity with this goal in mind.. i was gonna just have something i could click around and draw lines and vectors to help explain things in here.. and i gave up on it
happen when building?
this is basically what i was gonna make.. - the algorithms / equations lol
are you missing a using directive or an assembly reference?
or is this perhaps when you are trying to build
ohh okay.. i thought it was something simple like that I was really close.. thanks 👍
i was doing the simple.. 1, 1 diagonal input problem
The code is not mine, but my friend is int he bed to sleep and i have to fix for the jam ):
or trying to visualize it atleast.. and i couldnt get the normalization to work
those scripts are using stuff from the editor assembly which is not available while building
you cannot include editor stuff in a build. either put your editor scripts in a folder called Editor or wrap the editor specific stuff in preprocessor directives
are these tools for editor use only or required at runtime
The folder one seem easier, thank you ^^
Just like this i hope XD
just note that anything in the Editor folder will not be included in the build
I've added only the IKSolver file (the one whit the Editor)
Thank you so much!
Okay so because my player character is a prefab, I can't destroy the sprite it spawns
make sure you are trying to destroy the instance in the scene not the prefab
Not sure how to differentiate between the two
prefab is the actual file in the project folder
Instantiate returns a reference to the spawned object, keep that reference so you can destroy that object
instance is what you spawn into the Scene
It involves adding an animation event to your animation
Ah, okay. I'm instantiating it but not destorying the correct one
Hey all. So very very new. First game here. Was hoping someone could help me with shooting my gun. Specifically, there is no muzzle flash. Here's everything I have so far. When I shoot, it does shoot, I know that because it makes the noise. But no muzzle flash.
where are u spawning the object in relation to the barrel
I'm not really sure. I just put the muzzle flash onto my script thing.
Oh let me post my script too
Is there a certain way I should post it?
yes !code read the bottom msg ⏬
📃 Large Code Blocks
Use links to services like:
https://gdl.space/, https://paste.ofcode.org/, https://hatebin.com/, https://paste.myst.rs/, https://hastebin.com/
📃 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.
well something you should probably know 
using UnityEngine;
using UnityEngine.InputSystem;
public class GunShooting : MonoBehaviour
{
public InputAction shootAction;
public Camera playerCamera;
public float shootingRange = 100f;
public ParticleSystem muzzleFlash;
public AudioSource gunShotSound;
public float damage = 10f;
void OnEnable()
{
shootAction.Enable();
}
void OnDisable()
{
shootAction.Disable();
}
void Update()
{
// Check if the shoot action was triggered
if (shootAction.triggered)
{
Debug.Log("Shoot action triggered");
Shoot();
}
}
void Shoot()
{
Debug.Log("Shoot function called");
// Play muzzle flash effect
if (muzzleFlash != null)
{
muzzleFlash.Play();
}
// Play gunshot sound
if (gunShotSound != null)
{
gunShotSound.Play();
}
// Raycast from the camera's position forward
RaycastHit hit;
if (Physics.Raycast(playerCamera.transform.position, playerCamera.transform.forward, out hit, shootingRange))
{
Debug.Log(hit.transform.name + " hit.");
// Add logic for what happens when you hit something
EnemyHealth enemyHealth = hit.transform.GetComponent<EnemyHealth>();
if (enemyHealth != null)
{
enemyHealth.TakeDamage(damage);
}
// Optionally, instantiate an impact effect at the hit point
// Instantiate(impactEffect, hit.point, Quaternion.LookRotation(hit.normal));
}
}
}
I had chatgpt help me make it.
So now I'm receiving constant errors of the animation not having a receiver. As far as I'm aware, the sprite (obviously) has an animator and it also obviously has a script attached to it that the animation calls.
I have a test sprite in the game world that calls the function just fine, but when the player spawns the sprite, that's where the missing receiver error comes in.
whats with the AI code everywhere..
this script assumes the muzzle flash particle system is attached to the weapon already
it doesnt create one
or did spambot not explain that part

did you write code you did not understand ?
I didn't write it. I copied and pasted it.
Before today I literally didn't know what code was.
you copied it from where ?
I already said, chatgpt.
exactly why i made my comment
spambot did not explain to you that the particle emitter you're calling play on has to be attached already to the weapon
I would but I don't have nearly enough time on my hands. I mean heck it's taken me about 20 hours of figuring out how to get to where I'm at now.
It's been like 2 weeks.
everyone says the same exact thing
you're gonna spend more time fixing broken code you barely understand
things take time
I get it. But I am just making this one game and then I am probably never going to touch unity again.
you gotta commit
"im just gona make this rq" not gonna happen
"I'm just gonna cure this one cancer and then I'm never gonna use medicine ever again"
I picked unity because I was told it was the easiest to make games for.
Why are you making a game when you don't want to
I just wanted to make a game where I shoot spiders. That's it.
It's for my dnd group
easiest workflow sure, but you still need the basics
You gotta be willing to learn though..
Everything else is fine but coding like hurts my head just looking at it.
you're lucky it aint C++
TRUE
Directly copied code from https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqbWdaM0Z6YkZDZ1RpcnFwbHJweFN2cWtxZTkyQXxBQ3Jtc0trMFNPZUxKeFFiUUZFRFhCTDE5dlVreGlTaW81STNDVHY4WHFQTzJxaVVyMmtZQ25wVzVPR1RuSU1ISDZlM1VmR3p6ZndPcjlra1IxNXotMlZYTWlqbThwaHZIYVpMdGstQi11RWs4WWd0REtOcVplTQ&q=https%3A%2F%2Fpastebin.com%2FxnbsYSSw&v=qNZ-0-7WuS8. When I implemented it in unity, it has this offset from 0, 0. I don't really know how to fix it. Each tile is 36x36, and pixels per unit is set to 36. The coordinate of each tile should be correct, each is just offset by that small amount. How would I try to fix?
wtf is that link 
hehe, 💵
lol redirect flex