#💻┃unity-talk

1 messages · Page 17 of 1

potent geyser
#

You need 150 enemies, grab them from the pool. If there are non left, spawn a new one.

#

When the enemy dies, put it back into the pool.

dire spindle
#

only this part is hard and im working on it for a couple of time

torn galleon
#

Hi. Is it normal that when I enable the terrain (no trees or anything), it takes more than 3.5 ms more to generate the frame...? Is there a way to reduce the terrain's impact on performance please?

pure igloo
#

so...i noticed one thing. while making the spline, i thought that the spline knots would make it such that the mid point of the duck would be present on the knot, instead, it's the head of the duck which is present on the knot. is there a way to somehow offset it?

dire spindle
#

thx

sly lake
balmy kettle
pure igloo
balmy kettle
#

that is what is considered the "mid point" of your object. you need to adjust where the pivot is

torn galleon
sly lake
#

I just leave them enabled at all times

#

If that doesn't fit in memory, you could bake them to meshes and stream the textures on that.

#

Not caring about the 3.5ms spike is also viable though 😅

#

Hate to say it but that's a single frame drop at worst. It's not something people will notice.

torn galleon
#

no no, I mean like it takes 3.5 ms constantly, not as a spike. Like it is reducing the performance a bit too much imo

sly lake
#

What's the pixel error value?

torn galleon
#

5 is the pixel error value

sly lake
#

That's fine

#

3.5ms seems a bit high for terrain. How many terrains do you have?

torn galleon
#

it might also be that there are a lot of terrains

#

255 small terrains, I don't know where I read that it was better to have them separate into smaller parts

sly lake
#

Oh that's definitely too many

torn galleon
#

how do I reduce the count but with them still being rendered far away?

sly lake
#

You'd have to re-create bigger ones.

torn galleon
#

like this is the difference between terrain and not terrain

sly lake
#

Is this 3.5ms in the editor?

torn galleon
torn galleon
sly lake
#

Try in an IL2CPP build

#

Might not even be an issue at runtime

torn galleon
#

oh okay. Thanks

#

last time I tried IL2CPP a lot of things didn't work tho, but I'll try. Thanks

balmy kettle
#

also consider using the profiler for more accurate measuring of performance issues

sly lake
#

The only thing that doesn't work is System.Reflection.Emit

pure igloo
torn galleon
torn galleon
balmy kettle
pure igloo
#

ctrl save, apply changes everything

#

😭

balmy kettle
#

wdym "ctrl save"? did you click the save button in the sprite editor?

#

and no, i don't mean "press ctrl s"

ivory moat
storm patio
pure igloo
#

when it was unedited before, the pivot was set at the duck's head, then i manually repositioned it to its stomach

ivory moat
ivory moat
pure igloo
#

when i opened the project, the sprite pivot was set at its head(in the scene and in the sprite editor), like in this pic.

#

then i went into sprite editor, and repositioned it to here

ivory moat
storm patio
#

the head is in the center of the sprite, so if it's in center mode the gizmo will be placed there

storm patio
#

nope, in the scene view

#

there should be a box in the top left that says pivot or center

pure igloo
ivory moat
#

Does that fix the original issue as well?

pure igloo
#

the duck is staying in the path hehe

naive estuary
#

Now i have much more problems to fix.

strong fable
#

how do I spawn a camera and write the world normals of everything that camera sees to a rendertexture? I've read about RenderWithShader and it apparently isnt supported in urp and I have no idea how else to achieve this.

torpid wadi
#

hey is anyone else seeing this error message in the Event Browser of the Unity Analytics dashboard?

plain dagger
#

Otherwise you may want a custom pass to perform this job

strong fable
plain dagger
#

But having normals in a texture would only help for screen space rain

strong fable
#

if I spawn a camera looking straight down that captures the entire play area that gives me the normals for all the surfaces from the direction (which the rain will also fall from)

#

I dont need those normals updated. spawn cam, snapshot the normals, reuse

#

thats why I'm unsure about a custom pass cuz they run all the time (I think?)

plain dagger
#

Hmm right. I forget if or how we now do a render "now" for a camera with override materials.

vocal heath
#

How to change 3d pivot btw

balmy kettle
#

either make the mesh a child of an empty object which you position as the new pivot or you modify the mesh in your 3d modeling software (ie Blender) to adjust the actual pivot

viral hill
latent lake
#

is the grayish circle to the right the pivot point?

vocal heath
sly lake
#

Unity just uses the vertex coordinate data catshrug

grand bison
#

HA
I managed to figure out the animator component with no tutorials
gun animations work

#

I'm going up the world

#

now what do I do if I were to add a view model (assuming it's rigged) to the animations

#

if anyone has an answer, please ping me.

viral hill
storm patio
#

make sure you didn't check in anything you weren't supposed to

#

you did use the unity gitignore, right?

glass kraken
#

hi, my player has a reticle UI image, I'd like to make it bigger when it's on an interactable item, I've a good interacting system that works, it simply calls a SetInteractScale(); function when the raycast hits an interactable item and else{SetNormalScale();} here's the script that has those functions: https://paste.ofcode.org/3aiewaVavgf5yAbCndqFGQ8

#

the problem is that the reticle doesn't scale anymore

viral hill
glass kraken
#

yesterday it was working, now that I just opened my project It doesn't work

south summit
#

IDK if this is the correct channel but....

viral hill
#

add more debugs to your code

#

@glass kraken

#

contact the staff using @karmic maple

glass kraken
# viral hill add more debugs to your code

I did add one which made me sure about the problem either comes from the script I've just sent(logic wrong) or it' s an issue with the UI image/ canvas in the setup, but I don't know about those..

viral hill
glass kraken
#

the raycast is for the player to interact with objects,I tried to interact and it works, and if the debug in the other script gets debugged, that means the first one calls it meaning it works lol

nocturne remnant
#

How to setup movement with animations?
a function/Script should only do one thing, so if i am moving jumping character using one script then setting animations in it too.
if i press jump, i do anim.setBool(jump,true)
whats the better way?
it gets confusing cuz its in middle of other code too

glass kraken
#

@viral hill please help me,I'm really stuck and confused...

mellow violet
#

what is gameJam guys ?

stuck flower
mellow violet
#

ooo i see and any rewards ?

modest meteor
stuck flower
sly lake
inland river
sly lake
#

Oh weird

#

Could've sworn they said no prices earlier

inland river
#

effectively 10k

deft rock
#

Pro licenses feel like such a non-prize (unless you're an indie studio taking part).

inland river
#

the real question this year is, how many awards will code-monkey get?

sly lake
#

Still, it's something

tall hearth
# inland river

Curious if the license is like 5 codes or one code with 5 seats (ie if you were a team of 2 you could have 2 years worth)

plain dagger
#

The good stuff from paid licenses is premium support and engine src access

inland river
#

you can manually float it

tall hearth
inland river
#

suppose they mean to give everyone in the jam-team a license, not just one of them

stuck flower
tall hearth
inland river
#

nobody gets edit-source access

#

even if you have source access, its not exactly easy to actually get even read access

plain dagger
#

Read for sure but I think you can modify and recompile the editor but I forget if that is something extra

tall hearth
#

Was asking cause what'd be the point in reading the code if you cant edit any of it

sly lake
#

Oh it'd definitely be helpful

plain dagger
#

Its useful to see the src but if you have premium support you can get actual help with issues and bugs

inland river
#

premium support isn't that useful though, the only semi-useful support is by hiring one of the success consultants.

#

which also drains you bank account - fast

deft rock
stuck flower
#

Yeah, not quite as useful if you're already a major studio, but if that's the case you've probably got better things to do than smurfing in a game jam

plain dagger
inland river
#

possibly, it just not something accessible to indie game studios that dont already have a massive hit

deft rock
# inland river nobody gets edit-source access

I'm pretty sure there is a level where you can get source access. The devs who made Inside did a talk about the development of it, and they mention having source access and having to change something to fix/ improve/ whatever (I forget, I saw it years ago)

sly lake
#

Yeah, a few studios do

inland river
#

we have a source license, but we can't just download the source code

uncut ridge
plain dagger
#

We had a presentation with unity to tell us about it but I never got to see the src 😢

inland river
#

imo unity is one of these engines where, when you make a game that needs engine changes, you should be using a different engine anyway.

plain dagger
#

Tbh thats true but I guess the option is there for the customers who want it

mild radish
#

if ur needing something the engine doesn't handle i would assume ur in the realm of making ur game from teh ground up anyways

sly lake
inland river
#

go make your own SRP and and use DOTS for everything, that gives you more power than any engine otherwise available, from the raw technical capability... but its so much work that it will likely never pay off

mild radish
#

SpawnEngine v0.1 *coming soon

sly lake
#

It's not like the editor is exactly ideal for me either

inland river
inland river
sly lake
#

It's not non-useful but it does get in the way a lot

inland river
#

its certainly more painless to publish to consoles via unity than via godot

mild radish
#

and i bet w/ that license you get pretty immediate support

inland river
inland river
#

technically, if you make adequate community content (via yt etc) you should get some form of more direct access.

#

but i doubt anyone who doesn't make millions in revenue will get any kind of real priority

#

imagine you'd get priority by your helpfulness on the unity-discord. that would be a novelty.

sly lake
#

Just support yourself catsmart

inland river
#

be the expert yourself, i heard you can even get paid for that 😛

mild radish
#

computer rec time comes only after a solid accomplishment (works for me)

#

Hello everyone 👋 Hope you're all having a marvelous day!
I've been adding and testing Script Templates for a day or so
I'm almost 99% certain it's using the Monobehaviour Script I have highlighted above..
but ❔ I've been wondering *is there's a way to change what file the Editor uses when you create a script via the AddComponent Inspector * button..

tall hearth
#

But fair question, i also started working on making scripting templates recently and was curious how to mame them show up at the top with monobehaviour

mild radish
# tall hearth Shocked people actually make new scripts this way

been using my own templates for a while here lately..

Shocked people actually make new scripts this way
^ I don't very often.. but theres times when im working on a large object (w/ many pieces) and its times like those where I may use the AddComponent just so It'll have it attached automatically and I wont need to lose my place and go down thru the hiearchy to attach it..

#

yea, im more curious than anything.. ¯_(ツ)_/¯

#

I also noticed while working in the Script Templates that these two menu items are the same thing

#

[is there's a way to change](#💻┃unity-talk message) what file the Editor uses when you create a script via the AddComponent Inspector button.. but anywho if anyone knows ping or reply.. (its not super important.. i'll just keep it in mind)

tall hearth
mild radish
# tall hearth Quite a few, oh do you know of any way to add scripts that i can use to inherit ...

if ur talkin about script templates.. the only things i can think of is having a hard-coded reference in ur template
where u have already added the base class to the project..

// DEPLOY
using UnityEngine;
public class #SCRIPTNAME# : SpawnCampBase

the other way would be a bit jank...
where you could do something like:

public class #SCRIPTNAME# : #BASECLASS#```
where you'd have an editor script that replaces the placeholders
```cs
       string scriptName = "NewClass";
       string baseClass = "SpawnCampBase";

       template = template.Replace("#SCRIPTNAME#", scriptName)
                          .Replace("#BASECLASS#", baseClass);
tall hearth
mild radish
mild radish
granite sorrel
#

hi guyssss, is anyone going to unite in barcelona next week??

pale coyote
#

Can someone recommend me some good free water systems for URP?

#

**

Script needs to derive from MonoBehaviour

**

shadow heron
viral hill
dapper dove
#

hi

#

im new here

#

gdf

charred fog
#

@dapper dove If you have questions, start by asking one, there's no need to "hi" in every channel.

dapper dove
#

i know

charred fog
#

!ask

vagrant rootBOT
# charred fog !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

dapper dove
#

btw im german so if my english is a bit bad then uhh yeah

south crane
#

Anyone had an issue with the "Start Host" Button not doing anything in the NetWork manager?

south crane
elder haven
#

In FPS games, the guns - are they usually multiple models or 1 model?

vivid cedar
#

every game is different

elder haven
#

And how would you normally go about animating it? Would you create a rig for it or animate each individual part (ie, magazine, grip, etc)

#

Mmmkay

vivid cedar
#

I think in most cases people would rig/animate it the same way you do any other 3d model

#

but since they're mostly made of rigid parts you can probably get away with manual animation using separate renderers if you really want

elder haven
#

What do you mean by seperate renderers?

vivid cedar
#

not sure how to be more clear about that tbh

#

separate GameObjects

#

each with a MeshRenderer

elder haven
#

Ah right

#

But usually they would be just 1 3d model?

vivid cedar
#

yeah I don't see why not

elder haven
#

and I assume the magazine would be seperate, since it has to be removed?

grand bison
#

I love spying on this channel so if someone gets their problem fixed, I won't have to worry about asking for help in the future.

balmy kettle
#

!collab

vagrant rootBOT
# balmy kettle !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**

glass kraken
#

hi,I'm trying to set a GameObject active in a script but he stays Disabled, what might cause this?

#

I've checked my script several times but I can't understand what's the issue

balmy kettle
#

what might cause this?
the code not running would cause that

elder haven
#

A game like Escape From Tarkov, which has modular weapons, would that be modelled with each part seperate?

strange moon
dapper dove
#

what do you mean by that???

balmy kettle
mild radish
dapper dove
#

not bad

uncut ridge
mild radish
#

if you drag the compilation window around a bit faster it'll speed up the process

tall hearth
mild radish
#

thats exactly why we tell people that ask for help in DMs to ask here instead...
there's always someone that comes along with a similar problem

grand bison
tall hearth
mild radish
#

ahh thats true thats true..

glass kraken
grand bison
#

I just look when im bored lmao

balmy kettle
mild radish
grand bison
balmy kettle
glass kraken
grand bison
grand bison
fallen goblet
#

Anyone knows what this is, i downgraded from a rtx 2060 to a gtx 960 as i broke my gpu fan, the game took like 12 hours to compile as if it was the first time now it gives me this and doesn't compile

mild radish
#

some people work in the heat of passion..
scripts get all willy-nilly..
then on some of the calm days.. you can go in and reorganize 🤪

glass kraken
tall hearth
glass kraken
mild radish
#

same thing works for Materials, etc

balmy kettle
tall hearth
fallen goblet
glass kraken
fallen goblet
#

and gpu is brokie

mild radish
grand bison
tall hearth
grand bison
tall hearth
mild radish
#

im an organizational freak.. ironically

grand bison
tall hearth
grand bison
glass kraken
# balmy kettle "i'm not telling assumptions" and yet you're not actually verifying anything so ...

man?? I'm sure about what I'm telling you, sorry if you think I don't care or simply don't want to find the answers/solutions to my problems, that might be my way to talk,I'm not used to talking with people, and when I tell you the script is running, it's because I'm sure, those might be assumptions from your point of view as you can't be sure, but it would be a waste of time sending you my whole project setup with everything in it., the only time I was wrong was with the animation clips that were swapped but it was really a dumb mistake from me,I didn't think the "close" animation clip would in fact be an open one,I'm sorry, I really appreciate your help and I try my best to make you able to help me.

grand bison
#

everyone has their own workflow

mild radish
#

imo ya'll just focusing on unnecessary evils.. its very rare you'll need to peep their project directory to troubleshoot something.. if they're not giving you all the pieces to help simply ask for relevant pieces.. or just let someone else 🫠
and all the "what-ifs"...

glass kraken
mild radish
#

wild comment.. since its typically thoughtless slang..
"hey guys!" 👀 he just didn't... he... ?!

tall hearth
glass kraken
#

or is that some sexidk what bullshit

grand bison
tall hearth
tall hearth
plain dagger
#

native speakers mess up their there they're too

balmy kettle
glass kraken
grand bison
mild radish
mild radish
#

assumptions are the worst during game-dev

tall hearth
grand bison
plain dagger
#

english has rules and also breaks them 😆

#

as a brit, sorry

grand bison
#

I hope we focus on unity talk and not languages ^^

glass kraken
mild radish
#

if only there was a simple way to print something out in the console letting you know it is..

balmy kettle
#

alright, if you're just gonna fucking argue about actually verifying the code is running then i'm 100% done helping you

mild radish
#

legit crashout

grand bison
#

it's tedious yes but not that serious

stuck flower
#

One of them could be

#

Literally just put in a debug log. It should literally have been the first line of code you wrote

balmy kettle
stuck flower
#

That's all you need to do

grand bison
balmy kettle
mild radish
#

confirming the script is running is simple as adding the debug to the Start() method..

glass kraken
balmy kettle
mild radish
#

Start() or Awake() or OnEnable() or even in the Update() to spam a little bit (it'd still let u know its running)
once the script is confirmed to be running. just move the Logs to the Methods your expecting to run

#

rinse and repeat

grand bison
glass kraken
stuck flower
#

We don't have any info about any of the others

glass kraken
#

and regarding the logs, I've already some logs in my script

mild radish
#

of the one thats being troublesome?

grand bison
#

I think I'm gonna head back to my German lesson

glass kraken
stuck flower
mild radish
#

i would also like to know ☝️

stuck flower
glass kraken
balmy kettle
glass kraken
stuck flower
balmy kettle
#

this isn't just a matter of "make sure the script is active". i specifically asked you to verify that specific fucking line of code that you are saying isn't working is running

stuck flower
glass kraken
balmy kettle
#

it's literally what i've been saying this whole time.

glass kraken
glass kraken
#

really sorry man

mild radish
#

if you have a system of code.. some code relying on other code
(perfect example being a raycast with a if/else chain)

dont just debug at the very end.. and then expect to know the reason its not working when it doesn't get called..
b/c theres abunch of other places that could be stopping it from making it to the end.. and you don't really know unless you're aware of what the code is doing.. and how far its gotten..

its best to log every step along the way.. this way you can Easily see where it stops...
you can then pinpoint your energy in troubleshooting why it stopped there..

  • what condition failed
  • what condition should be met but isn't
  • what variables exist that aren't resulting in the outcome you assume will happen..

-> go to those variables and see why they are the way they are..

balmy kettle
#

this is a pattern of behavior at this point. "verify this specific thing is running" "i don't want to because i feel like it is because something else is working so that must be too"

tall hearth
mild radish
#

ooohhh.. yea.. thats more than just code problems.. 🫠

strong fable
#

does a rendertexture of type RenderTextureFormat.Depth provide Linear01 depth values?

mild radish
#

this could have been solved 4 times over by now w/ simple Debug.Logs();
-# jus sayin 👐

glass kraken
mild radish
#

yes!!

#

EVERYTHING!!! (if ur having a problem)

tall hearth
mild radish
#

if ur not having a problem.. theres no need.. thats just silly

tall hearth
mild radish
mild radish
glass kraken
grand bison
mild radish
#

lmao.. dont use that code btw 😄

#

it literally console vomit

grand bison
#

are you using visual studio? if so, can you send me in DMS that code colour pallete or whatever it's called (I think theme?)

grand bison
#

are visual studio code extensions also available for visual studio?

mild radish
#

some, im sure of..

grand bison
#

alright ^^

uncut ridge
#

✋ 😑 whos know?💀

sly lake
grand bison
tiny sonnet
#

Anyone familiar with the Particles System able to help me... understand it? I'm trying to create a burst effect but for some reason it keeps varying the amount of particles actually made, well under the Count i put in. I assume I'm missing some setting somewhere that'd affect this? But I'm at a total loss

sly lake
potent geyser
#

This is how you burst, removing the rate over time and setting a count.

#

If your count is less than the max particles, it won't go above.

tiny sonnet
tiny sonnet
potent geyser
#

Have you changed any of it? Try with with a fresh system and only change the emission to see?

mild radish
#

fun fact, not sure ive thought about it. but you can save a layout and have the search bars populated n they get saved along w/ the layout file i guess.. ❔ neat-ish lol

tiny sonnet
potent geyser
#

Where are you putting these particles?

tiny sonnet
#

wdym by where?

#

I have found my issue and as is tradition I feel very stupid but now I just want to ask more so I understand. When I was first experimenting with the System, I put the texture of The Particle in the Shape section, because I didn't understand that Shape manages the... emission pattern? I don't really know, but it's not the particles' shape. I had left this texture there and removing it fixed it, but what exactly does a texture do in that section?

strong fable
#

can some math wizard explain to me how I can convert a normalized directional vector into euler angles?

fleet warren
#

Hey so I have a shader graph that makes this flashlight beam and it’s brighter at the base than the tip but I want to flip that. Anyone know how by chance?

#

I can give a better picture of the graph parts if need be

strong fable
fleet warren
#

Tried that

#

Just like deletes the shader

#

Put it between the divide and saturate nodes

stuck flower
#

Do it as literally the last thing

fleet warren
#

Between that and alpha?

stuck flower
#

For whichever one you want to invert

fleet warren
#

Yeah…I don’t think that worked unfort

strong fable
#

easiest way of doing it while also having a smaller shader graph would be a uv projection unwrap from the side

fleet warren
#

Forgive me for being stupid, but do you mean to flip everything z-wise?

strong fable
#

I mean doing this

#

then using v to do the gradient

fleet warren
#

I suppose but I’m not sure I wanna call up Miss blender quite yet, seeing as I have to use this shader again on different objects

#

Don’t get me wrong it’s a great option I’d just rather keep it procedural if there’s any chance

strong fable
#

does the light shine towards local Z+ direction? like does the cone get bigger towards Z+?

fleet warren
#

The light is brighter towards Z-

#

The cone is also larger towards z-

strong fable
#

in the picture u provided is the Z+ axis of the cone downwards?

fleet warren
#

Oh my god I’m making such a fool of myself (I’m a student, I’m quite stupid) uhm lemme get you a better picture?

strong fable
#

and it isnt pivot at the bottom or at the top? doing this with object space positions is very dependant on the pivot

fleet warren
#

I’m not sure

#

I guess I was being stupid bc I think it’s brighter y- than y+

strong fable
#

ur using z in the shader so the cone isnt oriented along y

fleet warren
#

Good holy moly you’re so right

strong fable
#

can you select the cone, have the gizmo thingy be in local space and gimme a screenshot of that

fleet warren
#

What’s wrong w me

strong fable
fleet warren
strong fable
#

is this set to pivot or center?

#

for you

#

I'm gonna need pivot

fleet warren
#

Center

#

Got it hold on

#

Pivot

strong fable
#

alrighty simple fix. just use the y of the position node you've split

fleet warren
#

I wish it was that easy, it still looks wonky

#

Might call it a day and head to unity assets

strong fable
#

nah you got this. whats it look like now?

fleet warren
strong fable
#

fiddle with the beam length

#

should be equal to the size of the cone

fleet warren
#

Yep that was the issue, I’m gonna try a one minus now

strong fable
#

you should just get rid of that one minus u already have

fleet warren
#

Or I should get rid of the one minus I already have

strong fable
#

great idea!

fleet warren
#

Omg I have such great thoughts

strong fable
#

as ur dealing with object space lets say the tip is at y = 3. dividing that by the length (3) gives you 1 so the light is strongest up there. right at pivot level y = 0 and diving that by 3 = 0 so no light

fleet warren
#

Aha, I love when math

strong fable
#

love it when it works (its always maths fault never mine)

fleet warren
#

Stupid math, acts like it rules the world or something

#

Okay thank you so much, got it from here

strong fable
#

very good :) have a good one

undone monolith
potent geyser
#

Nope

strong fable
#

is there a setting I am missing or are some nodes in vfx graph impossible to find? I always copy paste the velocity from direction and speed node from an old graph into the new one cuz I cannot get this thing via the search

#

where is it

hybrid fjord
#

Started the Unity course Create with Code, and for Lesson 1.2 chapter 6 when the ridged bodies are added, the video shows the vehicle to continue in a straight line, but my vehicle hits the crate and starts swirling around in the air. Like it hits the crate and gets knocked off course and starts spiraling out of control. Ive double-triple checked thee code and everything is exactly the same.

balmy kettle
#

did you increase the mass on the rigidbody like the instructions said?

oak meadow
#

Do kinematic rigidbodies pass through colliders

balmy kettle
#

yes. kinematic bodies are not affected by outside forces, including collision related forces

radiant pewter
#

idk what they did but the "Browse Channels" thing is basically unuseable - it keeps jittering and moving frantically when you scroll through

#

in the discord*

#

anyone else got that problem?

#

It might be something to do with formatting

balmy kettle
#

yeah seems like it's related to some channels have long descriptions with multiple lines

hybrid fjord
#

its not flying around in the sky anymore, but doesnt go straight.

balmy kettle
#

what did you set the mass to?

hybrid fjord
#

vehicle 100, and the crate 20. BUT seeing he has it set to 1000 and 20, I forgot a 0... man I didn't realize it made much a difference.

fair cove
# strong fable where is it

Does it make a difference if you use the ampersand & symbol instead of the word "and"? Looking at your first screenshot that seems to be the difference in your search and the node name - it also looks like "set" is not a part of the actual node name

gusty topaz
#

I think ive gone crazy

#

for SOME REASON, randomly when i open my project ALL the UI elements get changed to have their positions set as (Nan, 0, 0). I have github version control and not a single file has ben changed since it was fine. this makes absolutely no sense, and I cannot continue to fix this every time

#

If I can't find a fix for this, I might honestly abandon the project

strong fable
south summit
#

ANYONE? It's a Crouch problem (but not the one what you think)

balmy kettle
#

fun fact, you might have gotten a response nearly 3 hours ago when you posted that in #💻┃code-beginner if you had provided literally any context instead of a video where you're just wiggling your mouse for the first half of it

south summit
#

The mouse part are for indication

#

Xd

#

I think you wrong the msg

balmy kettle
#

you aren't a toddler anymore, you can use your words

south summit
#

No, you linked the wrong msg

#

I think

balmy kettle
#

i didn't link any message. i linked the channel you originally posted that in (the one your message says it was forwarded from)

south summit
#

After my msg, even there is no reply to me

#

After and before

balmy kettle
#

i am aware of that. and again, that is because you provided no context and your video was mostly just you wiggling your mouse.

stuck flower
south summit
gusty topaz
#

so what's the issue? is it still getting stuck?

south summit
#

Now, thanks to that math glitch (purely my suspicions), my player is trying to crouch and is pretending to vibrate, since thanks to my detection he can't do that, but I want him to stay at the same crouching height

#

MY ENGLISH is a dog sh**

south summit
balmy kettle
#

you should seriously give a look at #🌱┃start-here so you know what to provide when asking for help rather than expecting everyone to play 20 questions with you until we get any information

south summit
#

Like changing constantly the crouch height (is 0.6f) to 0.8f 0.758395f

south summit
south summit
balmy kettle
#

if it is so specific then it should be easy to determine what you need to provide and how to describe it

south summit
#

Without over passing the ceiling but still scaling

south summit
#

You know how to help me? Or not?

#

The description is at the video too

#

*the visual happening

#

And with this description of words is right

balmy kettle
#

i don't intend to play 20 questions to get more information out of you, so no i will not be helping. see #🌱┃start-here for what you need to include when asking for help

south summit
#

Thanks for nothing 👋

#

Soo why did you replied me if you not know?

#

Or not will?

#

I already provided you with the 100% of the info and more

balmy kettle
#

well i hoped that you would get the hint to provide useful information. like, i don't know, maybe some fucking code?
but you don't want to do that so 🤷‍♂️

south summit
#

It's most a joke the case you don't understand what I'm talking

stuck flower
south summit
#

But a thing you should know

south summit
south summit
stuck flower
south summit
#

That doesn't even know what's a d*MN var

gusty topaz
#

ohhhhh brotherrrr

south summit
stuck flower
#

Which is basically the single most important thing to finding out why the code isn't doing something

gusty topaz
#

: |

south summit
stuck flower
#

you didn't post code

south summit
fair cove
south summit
balmy kettle
south summit
#

I'm having dinner

gusty topaz
balmy kettle
#

they're just throwing a tantrum like a toddler, they don't actually mean that

stuck flower
#

Why do people asking for free help out of the kindness of strangers see fit to make it as hard as possible to help them

gusty topaz
#

fr

stuck flower
#

Like, the easier you make it to solve the problem, the more likely people are going to want to actually do it

gusty topaz
balmy kettle
stuck flower
#

I think if your anchors are based on screen size, the screen loads in at a size of 0,0 before expanding out to fill the screen, so dividing by width somewhere could be causing a problem

viral hill
gusty topaz
balmy kettle
#

i'd consider at least updating to the last patch for that version

#

but also are you using any UI related assets? I recall one asset i used a while back did some weird stuff when a scene was loaded. it was a michsky asset i think

gusty topaz
balmy kettle
#

okay so no asset then. try updating to 2022.3.62f3 then

gusty topaz
fair cove
#

Is there a different UI package version you can try testing with?

south summit
#

This is the crouch code (it's a screenshot bc Im not at PC right now)

#

That's why the bad quality

gusty topaz
#

activates ultra-squint

#

yeah my vision sucks I cant read that

south summit
#

Ahhh damnit

#

You can see it clearly what does means?

#

COME on XD

copper gust
#

its a really shit screenshot

gusty topaz
#

could you please show the code for the functions you're calling? those are pretty important

stuck flower
#

this is basically worthless

south summit
#

NOW? XD

#

or you do need a lupe?

stuck flower
vagrant rootBOT
south summit
#

why you all want my full code?

#

the rest has nothing to do with it

#

im showing the source core problem part

gusty topaz
#

because its called! you are calling a function, and we need to seee the code of THAT FUNCTION

south summit
#

you all dont need it

copper gust
#

what does ceilingcheck do
what does checkheavyobjectabovedo

what else is touching isCrouching
what else is touching canJump

stuck flower
#

All right have fun

#

I have no obligations to actually solve anything

gusty topaz
#

we need the code for ceilingcheck() and other functions

#

like dude, THATS PART OF YOUR CODE WE NEED TO SEE IT

stuck flower
#

why should I put so much effort into getting info from someone, it's not even my problem

gusty topaz
#

i swear this is ragebait

stuck flower
#

obviously you don't want it solved so why should I?

south summit
#

Not to be rude, but it's starting to bother me

slow dirge
gusty topaz
south summit
#

I don't understand. I just come here, explain the details, and show the problem, waiting to hear what's going on, and now they're asking for my personal information?

#

ok its a joke example

#

alright

slow dirge
south summit
#

ok but its understood on screens?

#

even i shared a video

#

come on again

south summit
stuck flower
#

Surely you understand that a searchable, copyable text document is easier to work with than a goddamn picture

slow dirge
gusty topaz
slow dirge
#

You want to make it convenient to help you. Otherwise no one is gonna do it for free.

stuck flower
#

The fact that I have to explain this demonstrates you literally do not care about courtesy or anyone else's experience and just want a code-slave

south summit
stuck flower
#

Why make it hard to help you when you are the one who wants help

south summit
#

ok, can we go back to the issue?

gusty topaz
stuck flower
#

Oh, right, we have a command for this

#

!screenshots

vagrant rootBOT
south summit
#

AGGGHH

#

ok

#

the full code?

#

its most probable the steal but ok

stuck flower
#

At this point it doesn't matter, I'm not gonna be the one to work on it

south summit
#

whatever

gusty topaz
#

nooooo, only the lines that land on prime numbers!

stuck flower
#

I'm done here

copper gust
#

respectfully your code is broken

#

why would anyone want it 😭

gusty topaz
#

no one is stealing broken code

copper gust
#

no one is stealing working code either

south summit
#

nah i know

#

its an example

#

who cares?

copper gust
#

thats not an example

gusty topaz
copper gust
#

your saying words but thats not what they mean

south summit
stuck flower
gusty topaz
slow dirge
south summit
copper gust
#

oh your using ai for this

#

closes tab

south summit
copper gust
#

No

south summit
#

Even those who don't use AI benefit from the code to avoid tiring their fingers

south summit
gusty topaz
#

sigh... there is nothing more I can do here, gentlemen, I had tried. I'm gonna hope my issue with the UI resolves itself with an update and wish you all the best of luck

viral hill
copper gust
stuck flower
south summit
slow dirge
south summit
#

is without character controller

#

ahh ok, see ya

#

and help TacoCat

gusty topaz
#

wha-... n-no..? what do you want me to reitterate, find a synonym for goodbye?

hushed hamlet
# gusty topaz *sigh...* there is nothing more I can do here, gentlemen, I had tried. I'm gonna...

I skimmed what you shared... there aren't a lot of reasons a canvas will become scaled to NaN, especially if you have no magic lerping code or plugin.

You could check it all in source code. When the issue happens, you should see it in the meta file changes. But my best guess is something (autosized to text, a canvas scaler, something is bugging)

My gut instinct, assuming you aren't messing with it or having a plugin mess with it - is a bug in your unity version.

fleet warren
#

Does anyone know a quicker way of transferring textures from blender to unity? I’m tired of applying every single layer

magic pollen
#

[Unity Help] Rubik's Cube Auto-Solving & Prefab Reparenting Warnings
​"Hey everyone! I'm hitting two stubborn bugs on my Rubik's Cube project and I'm stuck 😩. All my relevant code is in the GitHub Gist linked below."
​1. 👻 Critical Issue: Instant Auto-Solve
​"The game instantly solves the cube and progresses levels as soon as it loads. I believe my CubeController.IsSolved() function is being called in an Update() loop before my LevelManager coroutine finishes the scramble. I can't find the source of the early check!"
​2. ⚠️ Prefab Reparenting Warnings
​"I also get 'Setting the parent of a transform which resides in a Prefab Asset is disabled...' when the level loads. This happens during initialization in CubeController.Start() and during the layer rotation in RotateLayerCoroutine when I'm temporarily parenting pieces. Is there a better, more robust way to handle temporary reparenting of prefab instances in Unity?"
​GitHub Gist (All Code Included):

https://gist.github.com/taizeamaron-lab/b0f67b7eca6fb1b6a07190d4be3c8c9c

And I don't know cooding I'm working with AI's because nobody joining me on project unless I have something to show so, please help with this. I don't understand dev language either.

​"Thanks in advance for any eyes on this!"

Gist

Unity Rubik's Cube Debug Code - Auto-Solve and Prefab Warnings - CubeController.cs

hushed hamlet
#

Like, trying to auto unpack it from an FBX, or auto create material if it finds the texture etc.

#

I also tend to use Better FBX Exporter which has some better texture export options. Not always better for rigged models though...

fleet warren
#

Do I have to just give up on that?

hushed hamlet
fleet warren
#

Exactly

hushed hamlet
#

Im trying to think how I handled it last time.. I think I just used glb instead... but its been a while. I do most of my texturing in substance or instamat now.

It might not hurt to ask in blender source discord too. I imagine this is an all FBX export issue...

fleet warren
#

Let me look into baking stuff

hushed hamlet
#

Baking a bit of a pain. But I do that a lot when excessively redoing topology

tall hearth
storm patio
# south summit *doubt* 🤔

is it really that hard to believe that people are capable of creating things with their own hands and knowledge

storm patio
tall hearth
copper gust
alpine knot
#

i need someone to help a coder of mine? we are creating a hollow knight fan game, and i currently have two coders and neither really know what they are doing. we are using C#, any help is HEAVILY appreciated

tall hearth
#

!collab

vagrant rootBOT
# tall hearth !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**

alpine knot
#

oh

tall hearth
nocturne compass
#

heyo people! could it be that the 6000.0.58f2 update to fix CVE-2025-59489 disabled loading libraries with DYLD_INSERT_LIBRARIES? Things like BepInEx just aren't working anymore on MacOS...any alternatives?

tall hearth
nocturne compass
sand kraken
#

Hey all, getting a weird collider issue. I have a fast moving car and a player with box colliders, and OnCollisionEnter is firing for a collision between the two when they're quite far apart. This screenshot shows the exact frame the two collided at, with the red line being the collision point. They're clearly not touching. Anyone know why this happens?

#

If the player walks into a stationary car the collisions work as expected, its only when touching this fast moving one

still stone
#

Where's the centre points for each parent gameobject

slow dirge
sand kraken
#

Why does that happen with continuous detection?

slow dirge
sand kraken
#

Ahh I see

slow dirge
sand kraken
#

Is there any good middleground? I've got high speed cars hitting players in my game, so both precision (at least to the degree shown above) and not intersecting with the car are pretty important.

slow dirge
#

Continuous is the way to go. They only reason you got that inconsistency is probably due to pausing the game manually.

slow dirge
sand kraken
sand kraken
slow dirge
slow dirge
sand kraken
#

I see, so I should have both Interpolation on and Continuous Dynamic?

#

Or speculative, I'm not actually sure the difference

slow dirge
#

Yes, and make sure that interpolation is not broken.

#

Dynamic

sand kraken
#

Why would it be broken?

slow dirge
#

Speculative is cheaper, but it's not precise

slow dirge
sand kraken
#

With both the cars and the player on Interpolate and Continuous Dynamic it's still got the issue of hitting quite far away

slow dirge
#

Then perhaps interpolation is broken.

sand kraken
#

🫠

#

Honestly Discrete works pretty well, good enough for my purposes

#

Occasionally the player glitches into the car slightly but it's not common

#

Better than being hit from 2.5 units away haha

slow dirge
#

Often happens with bullets missing moving targets.

sand kraken
#

The cars are pretty big, I assume that wouldn't happen due to their collider size

slow dirge
#

Despite them physically going through.

little smelt
#

Guys, I have a question, I am new to animating and game designing in general so would it be better to rig animations which use multiple objects (Example: Object 1 grabbing Object 2) in blender or in actual Unity?

My current way of approaching this was doing animations in blender exporting them in different animations and then adjusting them to be executed properly in Unity.
I just wanna know what way I should do.

distant shell
#

can anyone help me out with exporting a blender model into unity

vagrant rootBOT
# viral hill !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

slate magnet
#

Can we use macro graph with changing object variables per instance? The first object that I put the macro graph on is flashing when I flash other objects with the macro graph even though they have independent object variables. Visual Scripting

slate magnet
#

Nevermind, somehow a duplicate of my logic appeared with different grammar usage inside of the script machine

oak meadow
#

Using the new input system can you like set it up for a joystick you got from the asset store

still stone
tall hearth
#

!collab

vagrant rootBOT
# tall hearth !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**

copper gust
#

Anyone know how lenient the licensing is on Philippe St. Amand’s Kinematic Character Controller is? On the Unity Asset Store it’s standard licensing but him working with Unity officially now and I found what seems to be similar stuff on his github under Unity Technologies

#

Curious because I’ve altered his implementation a bit for my preferences and i’d like to put it into my little prototyping package directly

#

I figure vibe wise it’s a non issue but it would be nice to have official approval

still stone
#

Best bet, find his contacts, email him

copper gust
#

Honestly fair

pure igloo
#

is there a way to change unity documentation page to dark mode? using dark reader makes it look weird at best.

storm patio
#

i don't believe it has dark mode built in

#

it's been brought up quite a few times

sly lake
#

Maybe there's a custom CSS somewhere

pure igloo
#

this sounds dumb, but like...is there a documentation on how to read the unity documentation

sly lake
ivory moat
#

The part about package documentation is so accurate, I have been trying to learn Netcode for GameObjects with basically only the documentation so far and it's so incomplete

tender thicket
lapis gate
pure igloo
sly lake
#

Yeah, that's a package 🙂

sage basin
#

it's a package

sage basin
#

(open the package manager and click on the documentation link for the package)

pure igloo
#

ah shiiiiiii

#

i am back at the start all over again

#

what is t supposed to be in splines and how do i even get an instance of it onto the variable

sly lake
ivory moat
ivory moat
sly lake
ivory moat
#

You could think of it like a percentage progress

pure igloo
#

i do get that it's a percentage progress, what i don't get is how i can get to access it.

#

like... float t = Splines.gett or smth

sly lake
#

Doesn't make sense

#

The spline only contains the knot data - what are you trying to do?

pure igloo
lapis gate
#

The only problem really I've had with package docs is just having a shit ton of methods thrown at you with zero description at all (I'm looking at you textmeshpro)

ivory moat
inland river
sly lake
#

Keep in mind, GetNearestPoint is unbelievably slow

sly lake
#

And not thread safe pain

ivory moat
#

Is there an alternative?

sly lake
#

Sample at T is faster

#

GetNearestPoint is basically a search algorithm

inland river
#

nearest point search is precise, and you may not need that precision

#

Typically a spline is converted into a chain of poly-line segments to become useful at runtime.

ivory moat
# sly lake Sample at T is faster

I think from @pure igloo 's situation (with context from a different question in #💻┃code-beginner earlier which I still remember) we can be sure that the object will be located on the spline (since it will be moving back and forth along the spline)

#

Does that change anything?

pure igloo
#

make me understand this then. what the hell is GetPositionTangentNormal even. is it a field, a sub-struct or smth else and how do i even access it

sly lake
#

Eh, doesn't look like what you want

pure igloo
#

if Splines is just a an array...why is it even in this

inland river
ivory moat
#

You would still want EvaluateTangent instead I think

pure igloo
sage basin
#

it's a struct

sly lake
sage basin
#

that implements IJobParallelFor

pure igloo
ivory moat
sly lake
#

Well, you have the component, which is SplineContainer

#

So I'd start looking there

inland river
#

how about not starting in the middle, understand the package architecture and design first

sage basin
#

well, it's literally shown on that page as in SplineUtility

ivory moat
sage basin
#

then you need to look harder

pure igloo
#

my eyes are gone

#

even after this

ivory moat
sage basin
#

the method is not called sample

ivory moat
sly lake
#

🙂

#

Read the quick start

sage basin
#

Evaluate, it's the method that's used on the quickstart page at the top level of the docs

ivory moat
#

I found Evaluate now, (under SplineContainer not SplineUtility), but I don't see how it can be used as an alternative for GetNearestPoint

sage basin
#

It's in both, and as the Quick Start says, use the one in SplineUtility.

#

It's not an alternative, it manually evaluates the spline once, there's no more to it than that

ivory moat
#

You're right there is one under SplineUtility that I now can't believe I missed, thank you

pure igloo
#

guys i am so lost, what am i supposed to do even. i don't understand anything

ivory moat
sly lake
#

You were animating something along a spline, right? So you'd do Evaluate(float t) while t animates.

ivory moat
#

@pure igloo how are you animating the object along the spline? Do you have a script for it?

pure igloo
#
using UnityEditor.ShaderGraph.Internal;
using UnityEditorInternal.VersionControl;
using UnityEngine;
using UnityEngine.Splines;

public class DamnDeseDucks : MonoBehaviour
{
    // Start is called once before the first execution of Update after the MonoBehaviour is created
    public GameObject Duck;
    public SplineAnimate Spline;
    void Start()
    {
        Spline.Completed += onComplete;
    }

    // Update is called once per frame
    void Update()
    {
        float tangent = SplineUtility.EvaluateTangent<T>(Spline, t);
        Debug.Log($"{tangent}");
    }
    void onComplete()
    {
        Destroy(Duck);
    }
}
#

this script is attached to the duck

#

the thing that's supposed to be moving

ivory moat
#

What part of that makes the duck move though?

pure igloo
ivory moat
#

True

wise yacht
#

Does using transform.parent automatically try to keep world position?

#

Because when I use it to parent UI to a canvas at runtime after the object was instantiated in the scene, the rotation and scale is massive and all off + the z value

#

So I'd assume yes

keen lantern
wise yacht
#

OK so I need to use transform.SetParent(parent, false) to stop the behaviour then

#

Thank you!

woeful spear
#

When I play the scene and click in Game window, cursor disappears. I remember I could bring it back maybe by clicking right click. But not able to do so now:

#

I have to switch to some other app to bring it back.

plain dagger
woeful spear
plain dagger
#

This is something special for play mode in editor only btw. In a build pressing Esc wont affect the cursor lock/hide state unless you add that.

summer bluff
#

Hello guys i am a beginner in unity

#

Can anyone help me to make my dream project

ocean pumice
summer bluff
#

I actually cant

#

Even my laptop is outdated and laggy

#

And i am a beginner

ocean pumice
#

But you are the one, who should start and learn and come here when you run into a problem. If you got issues with your laptop, there is nothign anyone here can do about it

summer bluff
#

Anyways you are right although that will take a long time

#

I will start with s 2d game then 3d

#

Going to learn animation first

ocean pumice
next nimbus
#

Anyone know when a new starter bundle will come in the asset store? How longs the current been there

ocean pumice
hexed path
#

Sometimes progress looks like rocks floating in space 🚀🪨

misty bear
#

wow moderators is gold plated

#

anyone can help me on this?
#🌐┃web message

I want to learn how to communicate to website with Unity

summer bluff
#

Hey hru

lunar drift
#

What if we all went to one continent

summer bluff
#

Actually he is 16 and he is my brother i will teach him a lesson when I meet him

next nimbus
#

It’s got assets from multiple different creators

deft rock
# next nimbus Anyone know when a new starter bundle will come in the asset store? How longs th...

Starter Bundle is a very vague name to ask about. If it's one from Unity, a new one will come when the current 'Start Assets' are too out of date it's not worth updating and creating a new one is the better idea. If it's not from Unity, then... same reason and/or whenever whoever feels like it.

You can see when an asset was first published on the store. Click 'Releases' and look at the date under 'Original'

hard relic
tender thicket
#

fellas lemme show you this gem of a mistake XD

#

i have no idea why it works but it works so well

tawdry tulip
#

hi can someone help me :3

#

im a new user on unity

#

and im trying to make a jump button

#

idk whats wrong i did everything correctly added the UI script rigidbody and components

unreal jewel
unreal jewel
#

here, you're calling it every 0.01 seconds, which isn't Time.deltaTime, it's just that - 0.01

#

if you yield return null instead, then you'd wanna multiply by delta time

tender thicket
unreal jewel
#

it's still the time between frames

#

but what you're doing there is not tied to the frames

#

it's tied to your own loop, which gets called every 0.01 seconds

#

you probably want to yield return null, which waits for the next frame, instead of yield return new WaitForSeconds(0.01f)

tender thicket
#

oh i see

#

but i still dont understand how this is working so well considering that last perameter is for the max distance value and not the speed

unreal jewel
#

it's the change in your position

tender thicket
unreal jewel
#

but you still wanna change it to either yield return null or multiply it by 0.01 instead

tender thicket
tall hearth
tender thicket
unreal jewel
#

i mean tbf what you've got is just a very rudimentary tween

unreal jewel
#

yeah, it's an object that can animate a value over time

tawdry tulip
unreal jewel
#

there are a lot of libraries you can use for them

tender thicket
unreal jewel
tall hearth
unreal jewel
tender thicket
zealous grail
#

i'm having this stupid bug when i'm setting up a humanoid ragdoll and trying to make it stable, every body part follows the rules i set but the chest just falls trough the map

#

every setting is the same as the rest of the body parts

unreal jewel
tall hearth
unreal jewel
unreal jewel
# tall hearth Yeah

well guess what tweening libraries have that too, it's just a back in easing

unreal jewel
#

so with prime tween you'd do something like
Tween.Position(transform, player.transform.position, duration: whatever, ease: InBack)

tender thicket
unreal jewel
#

a tween you can just call once and forget

tender thicket
unreal jewel
tawdry tulip
#

Can someone help me fix my jump button? Here is my inspector for the jump button UI and the code.

#

using UnityEngine;

[RequireComponent(typeof(Rigidbody), typeof (BoxCollider))]

public class PlayerController : MonoBehaviour
{
[SerializeField] private Rigidbody _rigidbody;
[SerializeField] private FixedJoystick _joystick;

[SerializeField] private float _moveSpeed;
[SerializeField] private float _turnSpeed = 10f;
[SerializeField] private float _jumpForce = 10f; 

private void FixedUpdate()
{
    Vector3 direction = new Vector3(_joystick.Horizontal, 0, _joystick.Vertical);

    if (direction.magnitude >= 0.1f)
    {
        Quaternion targetRotation = Quaternion.LookRotation(direction);
        transform.rotation = Quaternion.Slerp(transform.rotation, targetRotation, Time.deltaTime * _turnSpeed);
    }
    
    _rigidbody.velocity = new Vector3(direction.x * _moveSpeed, _rigidbody.velocity.y, direction.z * _moveSpeed);
}

public void Jump()
{
    if (IsGrounded())
    {
        _rigidbody.AddForce(Vector3.up * _jumpForce, ForceMode.Impulse);
    }
}

private bool IsGrounded()
{
    return Physics.SphereCast(transform.position, 0.5f, Vector3.down, out RaycastHit hit, 0.5f);
}

}

lapis gate
#

!code

vagrant rootBOT
lapis gate
tender thicket
icy fulcrum
#

anybody had issue with disappearing options? can't seem to find any fix for that

unreal jewel
tawdry tulip
#

i just need help getting it to jump 🙏

lapis gate
#

More code related as the UI binding is fine

#

well, from what I can see here. You need to use debug.logs in your code to check

tawdry tulip
#

chcek what? ion know what the problem is

#

here is my player

unreal jewel
tawdry tulip
random rock
#

hi im having trouble tracking the position of my dolly carts position on the track im trying to track it so i can change the cameras priority when it reaches the end of the spline

unreal jewel
tawdry tulip
storm patio
unreal jewel
tawdry tulip
unreal jewel
random rock
unreal jewel
#

i'm not just gonna give you the solution straight up, that doesn't teach you much does it

tawdry tulip
#

why do I have the feeling that the solution is simple 😭

#

wait am I suppose to link the jump button to the player?

unreal jewel
tawdry tulip
#

but no its all in 1 script

tawdry tulip
tender thicket
vagrant rootBOT
tawdry tulip
#

is it a problem with my script?

unreal jewel
storm patio
tawdry tulip
unreal jewel
storm patio
tawdry tulip
ivory moat
unreal jewel
tawdry tulip
#

Ok so I can CLICK the button

#

but the button doesnt output anything

unreal jewel
#

okay, do you know what Debug.Log() does?

tawdry tulip
unreal jewel
tawdry tulip
#

man I code in python not c# 😭

tawdry tulip
unreal jewel
#

yeah

tawdry tulip
#

w alr

unreal jewel
#

what do you usually use print for?

tawdry tulip
#

to print stuff in the terminal?

#

I usually use it to debug my script in vsc

unreal jewel
tawdry tulip
#

alr w

ivory moat
# tawdry tulip no...?

Simple. It's called that because you could sit down and talk to a rubber duck and figure out your problem (Although you don't need to).

Basically, go through your code line by line and read out what the line is doing. Not what you want it to do, but what the line itself does. At some point you will realise that what you just described the line doing is not what you want the line to do, and you've found the problem.

It's one of the best ways to deal with a logic error, as in your code runs fine, but doesn't do the right thing.

random rock
tawdry tulip
#

wait is it the linearvelocity?

storm patio
#

it's m_pos that doesn't exist

ivory moat
# tawdry tulip alr thx good to know 👍 🤗

One more note is that instead of manually reading the line and thinking about what it does, you can use Debug.Log() to output the actual value changes after that specific line, with those tools you can usually find the source of logic errors (Debug.Log just makes it easier)

unreal jewel
random rock
storm patio
storm patio
ivory moat
tawdry tulip
#

@unreal jewel I managed to add Debug.log to some parts

#

using UnityEngine;

[RequireComponent(typeof(Rigidbody), typeof (BoxCollider))]

public class PlayerController : MonoBehaviour
{
[SerializeField] private Rigidbody _rigidbody;
[SerializeField] private FixedJoystick _joystick;

[SerializeField] private float _moveSpeed;
[SerializeField] private float _turnSpeed = 10f;
[SerializeField] private float _jumpForce = 10f; 

private void FixedUpdate()
{
    Vector3 direction = new Vector3(_joystick.Horizontal, 0, _joystick.Vertical);

    if (direction.magnitude >= 0.1f)
    {
        Quaternion targetRotation = Quaternion.LookRotation(direction);
        transform.rotation = Quaternion.Slerp(transform.rotation, targetRotation, Time.deltaTime * _turnSpeed);
    }
    
    _rigidbody.linearVelocity = new Vector3(direction.x * _moveSpeed, _rigidbody.linearVelocity.y, direction.z * _moveSpeed);
}

public void Jump()
{
    Debug.Log("Jump function got called.");

    if (IsGrounded())
    {
        Debug.Log("IsGrounded() happend. outputing Jump Force.");
        _rigidbody.AddForce(Vector3.up * _jumpForce, ForceMode.Impulse);
    }
    else
    {
        Debug.Log("IsGrounded() failed. Player is hopefully in the air.");
    }
}

private bool IsGrounded()
{
    bool grounded = Physics.SphereCast(transform.position, 0.5f, Vector3.down, out RaycastHit hit, 0.5f);
    Debug.Log("Grounded Check Result: " + grounded);
    return grounded;
}

}

storm patio
ivory moat
vagrant rootBOT
storm patio
#

it needs to be at the start of the message

unreal jewel
ivory moat
storm patio
#

nah, just how the bot was implemented

#

it'll probably check for wordboundaries anyways so no scunthorpe problem

random rock
tawdry tulip
#

wait what

#

oh

#

!code

vagrant rootBOT
tawdry tulip
#

wait how

#
using UnityEngine;

[RequireComponent(typeof(Rigidbody), typeof (BoxCollider))]

public class PlayerController : MonoBehaviour
{
    [SerializeField] private Rigidbody _rigidbody;
    [SerializeField] private FixedJoystick _joystick;

    [SerializeField] private float _moveSpeed;
    [SerializeField] private float _turnSpeed = 10f;
    [SerializeField] private float _jumpForce = 10f; 

    private void FixedUpdate()
    {
        Vector3 direction = new Vector3(_joystick.Horizontal, 0, _joystick.Vertical);

        if (direction.magnitude >= 0.1f)
        {
            Quaternion targetRotation = Quaternion.LookRotation(direction);
            transform.rotation = Quaternion.Slerp(transform.rotation, targetRotation, Time.deltaTime * _turnSpeed);
        }
        
        _rigidbody.linearVelocity = new Vector3(direction.x * _moveSpeed, _rigidbody.linearVelocity.y, direction.z * _moveSpeed);
    }

    public void Jump()
    {
        Debug.Log("Jump function got called.");

        if (IsGrounded())
        {
            Debug.Log("IsGrounded() happend. outputing Jump Force.");
            _rigidbody.AddForce(Vector3.up * _jumpForce, ForceMode.Impulse);
        }
        else
        {
            Debug.Log("IsGrounded() failed. Player is hopefully in the air.");
        }
    }

    private bool IsGrounded()
    {
        bool grounded = Physics.SphereCast(transform.position, 0.5f, Vector3.down, out RaycastHit hit, 0.5f);
        Debug.Log("Grounded Check Result: " + grounded);
        return grounded;
    }
}
#

oo there

tender thicket
#

use the services/links

unreal jewel
ivory moat
tawdry tulip
tawdry tulip
ivory moat
vagrant rootBOT
tawdry tulip
tawdry tulip
ivory moat
tawdry tulip
#

im not using online interpreters 😭 im using vsc 😭

unreal jewel
unreal jewel
storm patio
tawdry tulip
#

it stops logging when A it stops working and B if the if condition arent met

ivory moat
storm patio
#

(what was the original question)

tawdry tulip
#

(idk im getting more confused)

#

IDK WHATS THE PROBLEM 😭 the deadline is tmr and im trying to figure this out for 3 hours im crashing out AHHHHH

icy citrus
ivory moat
# storm patio don't think so.

really? PositionUnits gives position along spline which seemed to be what they were asking for, it's the same thing as m_Position from the other component as well

tawdry tulip
#

im new to c# and unity

storm patio
tawdry tulip
#

usually I use pygame

ivory moat