#udon-general
59 messages ยท Page 87 of 1
Hello!
I dunno if this is the right place, but I recently finished my world in the old version of SDK and with unity 2018 it works, its uploaded all good - today it told me to update and I downloaded the new recommended Unity and it arrived with UDON . I've never been interested in the programming so I'm not familiar with Udon. I managed to set everything up but it won't launch my world to test. It sends me back to my "home" ? I tried following a udon tutorial without any luck and did my usual troubleshooting - no luck .
Does anyone have time to run me through some other methods of troubleshooting?
- I also tried looking the problem up on the web without any luck
Did you back up the original?
@fiery yoke Thank you very much for replying me, and sorry to be late. JetDog seems to have so many prefabs, but which one can be used for that purpose and how can I do that with it?
I still have the file, yes but had to delete the unity version and re install it
Haven't personally tested it. You can always add another onStart node if not. Anything to avoid using a onplayertriggerstay node
The teleport to home thing happens when you don't have any spawns set
I've made a 3D cube, flattened it, added the VRCWorld component separately (not "in" the cube as in the 2018 version), added an empty object and added it to the "element 0"
Do I need the IsLocal then?
has anybody had any problems with teleporting 30+ players at once, and some not teleporting? (with udon sharp)
Tried adding the spawn the usual way - didn't do the job either
anyone have pointers for doing udon/udon animations?
i'm super new and i'm a bit confused on it x)
on start node on plays locally, so that one doesn't
Here's a tutorial on how to make an animation play when you click an object. This particular example covers firing a trigger on an animator, but hopefully this covers enough to help those wanting to change a int/ float/ bool on an animator as well.
So hopefully this is helpful. As always, if you have any questions, feel free to ask in the comme...
@manic yarrow
Hi guys, I have 2 scripts i need help with.
the first script does when a player interacts it sets playerCount up by 1,
the problem im having is that i want the second script to use playerCount and subtract it by one
but playerCount is in the public override void interact() i cant find a way to get playerCount value and subtract it
any help??
script 1:
script 2:
Is jumping not automatically setup with sdk 3?
ok SO I have an audio player Prefab but when I drop it in the scene it looses all the variables. How do I make it get a specific ingame object, and or audio source instead of having to drag variables? Please help ๐ Thank you !
Does the video player prefab not support autoplay? I checked the box and also tried adding a real simple event (on start, play) and nothing happens. I'm thinking I may need to redefine the starting URL that I have in Video URL for the AVPro player
or at least reference that string somehow
Heyyo, Iโm looking for someone who can point me in the right direction or give me some information about animating NPCs for worlds using Udon, next world Iโm making is narrative based and I only have experience with sliding door animations
Any help is greatly appreciated ๐
To play a video, you need to provide a URL in the Video URL field when you set up your Video Player in the editor, or you can paste a URL into the VRCUrlInputField provided in the prefabs.
I've tried both of these to no avail
its an audio player . the audio is actually uploaded into the world
I'm not sure I understand what you mean
The video player works as expected if I hop into my world and put a URL in, I just wanted it to autoplay a given URL when launching the new instance
ohhhhh lol I thought you were responding to what I posted lol my bad
oh lmao whoops
I was following along with a guide but stopped when I realized it didn't support networking -_-
oh yea the one I made doesnt either
hecc
do you by chance know how to get specific game objects in the Udon Graph?
I'm gonna be honest this is my first ever world and this video player is my first Udon project lol
... so no
this one is set to public variables . It goes to non by default when I turn them into prefabs
oh congrats on your 1st world
Does your prefab include the world objects that the variables are linked to?
Thank ya :D
Ive made like 7 and I still don't really know what I'm doing ๐
I'm actually shocked at how well its coming out lol
I've just gotta put on these finishing touches (mirrors, video player, chairs that aren't broken) and she'll be good to go ๐
do you know how to use prefabs so you dont have to sit there and make a ton of gairs?
Chairs mirror systems etc
I think so, yeah. Also turns out my chairs are working fine I am just dumb lol
Is Udon at present can be used for avatars too, or is it applicable only to VRC worlds?
after 6 worlds I just discovered this time saving thing
It is world only AFAIK
hmmmmmm
thats a good question
Fionna and CyanLaser and the VRCBILLIARD club I owe them all props! and a ton of thanks !
I see. I do wanted to do something using Udon for an avatar, but it also requires the Avatar Dynamics.
Anyways I guess for the meantime I could start practicing using Udon for VRC world applications
have you guys checked out the VRCprefabs website?
Is the website safe?
yup. it's run by cyan laser and someothers
Cyan Laser for school president!
him Fionna Vowgan
I'm going to make something thanking them.
I'll check it out soon
Do you know how to set a specific game object in the udon graph? For instance I want to set a specific audio source . But when I drag a prefab into the scene the audio source window goes back to none by default.
sorry, that's a little too vague for me to give an answer to. mind giving some context?
instead of variables I want these two nodes to be the game objects one is the Music File the other is the audio source. Im putting multiple music players in this world and im trying to see if I dont have to drag an drop every time.
How many music players are you after that the inconvenience of dragging and droping is significant enough that two variables on a script is a problem?
The script needs to know what ones to play. They can't be hard coded into the script, as they refer to things in files or the scene.
That being said however, there are ways to have some gameobjects attached, but honestly, you are already having to drag and drop to set said gameobjects, you might as well do it into the code and save the hassle. If you are really insistant on it, you do have things like transform.getchild or transfrom.getparent that can get either the child or parent of the scripts' gameobject. and from there you can do transform.getcomponent and whatnot.
the odd thing is that the songs are fine but the audio player seems to go default when I drag them from the Prefabs forlder
13 songs 11 players
Lots of dragging and dropping
probably because the audioSource isn't part of the prefab. You can set up one of the prefabs in the scene, and then duplicate tyhe prefab inside the hierarchy, and they will be set up right
let me try that
Odd its remembers the song but not the audio source
this is also troublesome for me because I also have a travel panel with 11 places to go
Looks like lots of copying and dragging until I can figure out how to hardwire prefabs
I just dragged it into the udon graph from the hierarchy
Lets see if this works
yea... this part literally does nothing ...
it wont do anything. does nothing, break nothing
It works perfectly in cyanEmu
this literally just saved my life tysm
This won't work. you cant plug a gameobject into an audiosource node
At this point I don't exactly know where your going wrong... perhaps this might help: https://youtu.be/4ENVC7cCiUU
Here's a tutorial covering how to create a music toggle button for one or many music in your world! The first part only covers how to toggle it for one song/ audio source, but then I expand the script to covering a multi button setup. That does however come at the cost at needing more nodes, which I hope doesn't become too overwhelming...
As f...
Is there a reason everything is shaking in my world?
My character and my hud are extremely shaky and jittery when I am in my world. It happens to everyone in it
too far away from origin, floating point accuracy fails there
Thank you for letting me know
Eh can someone help me with out with this udon tether prefab as when i use it in vr and move it around my whole entire fps drops big big time when it moves into frame like idk if its the prefab or something up with the pickup
I have a UI button that I want to call a void function from my script with an integer value attached but I dont see my function in the list
under UdonBehavior (Clicker) it shows a long list of Udon functions but mine isnt in there
another question, is it possible to have multiple interactable game objects and each one changes the same variable? For context, Im trying to make a simple clicker game as my intro to Udon but I hear you cant use static variables with udon. How can I share variables through different scripts? Or make it so that I have multiple gameobjects that I can interact with that do different things to the same variable?
So I think I have the right think selected in the screenshot, but then how do I pass integer values to it if the input box is occupied with the name of the function?
This is my simple test buying function, and different buttons should pass different values to the buy function in order for it to know which button was pressed, but I dont know how to pass values to the function using SendCustomEvent (bottom photo doesnt work)
you cannot send arguments via this sadly
hmm okay, do I just need a separate function for each "buy" button
if you are dead set on this, that may be one way, yea
also, prefix public functions with _: _Buy
otherwise they can be invoked via the network by remote players
okay
How do i generate random numbers in u# ? I tried Random.Range() and it doesn't work
What do you mean when you say that it doesn't work?
it is generating the same number over and over
That sounds strange, are you sure you're not also setting the random state to the same value right before calling it?
pretty sure, i do something like this: num = arr[Random.Range(0, arr.Length)];
And num is always the same?
sadly
Are you sure that arr[] doesn't just consist iof the same number?
i think im disabled... it was working but i was displaying some other variable
Is there a way to force a player off of their station?
Oh, I see, it's part of the station rather than the player.
Still can't use the build and test without it sending me back to my home world. - does anything look odd?
This looks fine to me
Do you have VRC closed when you click Build & Test?
Hello Everyone, I have a question. Is it possible to call a script from udon graph or use trigonometric functions in udon graph?
Yes
What SDK version are you on?
You can see it in the VRChat SDK window Settings tab
can't use mods for vrchat
how do I do toggles like this?
Is anyone good with UI stuff?
So, for UIs to work in VRC, you need to add the "VRC Ui Shape" script, right... and the documentation says that it will automatically add a box collider.
I have a UI menu that will spawn from a button click. The problem being, is if the menu spawns inside a player, the box collider pushes them back out of the menu.
"The VRC_UIShape component will automatically add a box collider to the GameObject. If you want to walk through your menu, you should add your own collider and mark it as "IsTrigger"."
... but the problem with THAT is then the menu is no longer interactable.
So is there really no way of making UIs that are both interactable AND let you walk through them? Or am I doing this wrong?
Change the canvus' layer to walk through
I know this isn't udon but any quick fixes?
Oh my days, that works.
Really that easy... why is that not mentioned in the docs? X[
You my friend, are the best. ยฆ3
Got enough space on your drive? ๐ค
Yes, even moved it to another driver with more free space
Can I get any good links to setting up guns for some FPS type maps.... Thanks
are you trying to make a VRChat world?
I have returned once again since it appears this technique does not work, it should have gathered 2 but it returns no transforms
Run it as admin? It may be a permissions thing. Like, it can't write to where you're trying to create it.
Yes
If it works as admin then you can narrow it down to permissions.
I'll try thank you!
Ahhh still the same issue
I can't think what else would cause such a generic error, unless it just wasn't able to write to the location for some reason. ๐ค
Can you open existing projects? If so, possibly not a Hub problem.
Maybe the Unity install is borked? Try a different Unity version if you have any others installed already.
It should be 2019 for VRChat stuff anyway.
Here is the "final" logic for the system i was making, it has 3 cycles which is Animators, AudioSource and Lights. it detects them fine (on the bottom the spy part logs the lenghts of the arrays which are accurate but when i make it hit a cycle i get hit with a Cannot retrieve heap variable of type 'Component[]' as type 'AudioSource[]'. as long as i know it follows the instructions i got provided with, any chance someone knows what i do wrong?
i just noticed the quality isnt that great so ill make a close pic of the gathering part and the cycles
gathering the components
Cycles
looks like you're running the wrong editor version for VRChat. Current version as far as i'm aware is 2019.4.31f1
Also do know that if I Manually assign the respective components to Thier array's they work fine
It doesn't work using animations
Via code seemed easier since now it just needs to preform a single cycle, all the animator has to do is spin the hinge
This is... rather hard to read. generally you want to avoid noodles going underneath nodes, as it makes it harder to read
also, why are you changing the lights colour via code when you already have an animation? would be easier and cleaner to do the animator.
also, in general when working with an animator, you generally don't want to use 'play'. instead changing the a paramater on the animator is usually better. could have one mode for off, one mode for yellow lights, and one for red lights. then you can just change the int 0,1 or 2 depending on the setting
The way it currently works is that for example the startup alarm has to go off it will first set the desired soundclip, then which animation, then what colour the lights should be, it also changed the colour and emission of the material. The cycle basically should basically "apply" the settings
As for this, though it's a little hard to see, the 'get components from children' node is grabbing all the children's transform and making a transfrom[], and trying to stuff that into a audioSource[], which doesn't work. I know the output looks green, but it can be literally any component type, thus udon is letting you plug it in despite it not working at all
Bud, it does work tho but there is a different issue
Wait
I just misread that
Now I'm confused, as you can see in the gathering place it grabs the components, they all grab the correct ones according to the lengths I get from them
I had 2 alarms, I received 2 audiosources, 2 animators and 4 lights
wait... now it seems like i miss read the code...
No worries
The cycle and gathering groups should be rather easy to read
The input place is hell tho
can I have a look at the hierarchy that this is being used on?
I currently am in bed but let's say I made a gameobject called alarms which also houses the Udon behaviour. I inside that gameobject are the individual alarms
Basically it's grouped into alarms
If you have broken down the problem to be purely the creation of the arrays, then as far as I can tell, the code should work. I would have to look at how the code is being used in the world, to see if I can spot something there
Can you elaborate further on seeing the code being used in the world?
nothing in particular, just stuff like it instead being a child of a child, or empty audiosources or the likes that are also being added. those kinda mistakes that you already know, but a second pair of eyes is sometimes needed to see
I could screenshare it tomorrow after work if you would like
eh, pics work better. lets other people jump in if I miss something or say something dumb
Ah alrighty
I'll attempt to remember tomorrow
I think it's just the array being built is where it goes wrong since if I make it myself it works, welp tomorrow I'll share more
Hello everyone, its the first time im using udon and i was following a tutorial to make a toggle button for a mirror
the problem is that when i test the world i cant interact with the button
do you have a collider on your button? Mind sharing a screenshot of the button's inspector (windows key + shift + s to screenshot only part of a screen)
nope. first thing first, make sure to drag and drop your mirror gameobject into the script. currently it will toggle this button object instead of the mirror
As for getting it to be interactable... what layer is it on (slightly above what you showed)?
this should be interactive right?
that is just a gameobject variable, that you named mirror. you need to tell it what that gameobject is in the inspector
no its not, it was created when i dropped the mirror object on the udon graph
this is saying it is the button. it defaults to itself if you don't tell it an object
let me check
that shouldn't stop it from being interactable though...
default should be fine. tick 'istrigger' on the box collider? I do it on all buttons anyways, as it stops people from colliding with it
so, to clarify, does it show anything when you hover over it? or does it it just do nothing when clicked?
it doesnt show the hover message saying to use it
neither the usual blue lines that show you can interact with it
it's as if you don't have an interact script on it at all... mind hitting this button and trying again?
my actual script
everything but variable deleted
is the console giving any error messages?
welp, there we go
but now it dissapears the button
its probably what you said above
but I AM dropping the mirror
because you have it set to the button
how do i change it tho
grab the mirror in the hierarchy, and drag and drop it into this slot in the inspector
yea... I just tested that. Didn't know you could add gameobject variables like that... that's actually pretty cool; if not confusing for those new to udon
sweet! ^^
one last question... the only way to give a terrain a collision is setting the collision boxes one by one? or is there an easier way
for example, how could i add a precise collision to this asteroid
you want to create a mesh collider. also, if doesn't need to move, you will want to set the gameobject to be static, otherwise it will optimism the collider
thanx you, i will look into it right now
is it possible to make it collide with the player but not with other things?
How long should I boil my Udon for the perfect texture? I keep boiling for too long trying to get the broth flavor to soak up
Hey, I'm trying to call a function when someone leaves and there's only one player left in the room.
public override void OnPlayerLeft(VRCPlayerApi player)
{
if (VRCPlayerApi.GetPlayerCount() == 1)
{
// Do something
}
}
It seems that in CyanEmu, GetPlayerCount() will include the player that left. So if there is only one person in the room, it will return 2.
Is this also how GetPlayerCount() works in actual VRC? This seems incorrect, and I don't see it mentioned in the docs
https://docs.vrchat.com/docs/getting-players
EDIT: For anyone wondering, this is how VRC works. The player count will include the player that just left
Bump
So can Stations detect is a person is crouching while in the station and adjust accordingly with a custom animation. And is it possible to make a variable animation? My goal is to make a turret that animates the players Avatar while they control it.
Is it possible to publish an Udon world with a different account than you originally published with? My friend is a streamer and I made his world, but we can only invite people to it right now through my account cause I'm not quite User yet to submit for labs.
If we could publish under his vrchat account, then at least we could have him able to send invites himself.
Given it's a friend, you could always send them the files to upload it themselves. You would likely need to hit the detach button on the scene descriptor, but it should be fine. I'm pretty sure vrchat doesn't check for duplicate worlds
I tried to generate a new blueprint id, but it just gave him the same one we detached.
Been a huge headache, but we'll try again tonight.
says he doesn't own the file.
Seems like its some anti theft stuff. try deleting the object with the scene descriptor on it. then get them to remake it. shouldn't be too hard to talk them through adding it back
tried that too. It somehow cloned the blueprint ID there too.
what types of URL's can i use for the video player OTHER than youtube?
like in this area
You can use a direct url to an x264/aac encoded mp4 file
When fix poorly designed udon networking
Got it to work finally. I have no idea why it hit me with a cloned ID the first time I tried it. Didn't the second time. Thanks a lot for confirming the method works.
hey everyone im trying to find a script so it shows Vips and stuff on top of the People Heads
so i can add that to this club im working on
What is the rating for vrchat
Just saying
Bc my little brothers want to play it
?
Ok
Ok
Ok
Bec i was just saying
I've found a bug that make SetProgramVariable function to change variable type to change to Object when checking with GetProgramVariableType function.
I was testing by:
- create a public string variable - any value,
- Debug.Log a result of GetProgramVariableType of the variable - this results in
System.String - use SetProgramVariable to set variable value to a new string value
- Debug.Log a result of GetProgramVariableType of the variable immedietely after setting a new value - this time results in
System.Object
I suspected that SetProgramVariable doesn't account for variable type, and tries to set heap type for that variable to Object regardless of what variable type it originally was.
For context, I was working with an udon function to check if another udon is a correct behavior by checking public variable type with GetProgramVariableType. But later, I updated the targeting udon variable with SetProgramVariable, this causes variable type checking no longer working since it changed variable type to something else.
This happens in both UdonSharp and UdonGraph. I also suspect that it also happens in UdonAssambly, as UdonSharp and Graph generate in to the same assambly.
For workaround, I can still change variable checking to check if the variable exists in targeting udon to make it works again without checking the actual type.
Should I open a canny post or does the related post already exist?
SDK version is 2021.11.08.14.28
i am back once again
How i can get trusted rank?
not an udon question, but basically play the game and upload things, to prove to Vrchat's algorithm that you can be trusted. Usually around 700hours you'll get it, but I got it quite a bit sooner after some stuff I uploaded popped off.
might seem far off, but you do get user and known ranks much sooner than this
are there any pet udon prefabs where you have cats running around the world?
or other animals
alright so from yesterday i think the issue is is that the components are not getting "extracted" in the cycle
Anyone know how to setup a camera such that it renders on the main desktop view?
I thought setting the Target Eye to Main Display would be enough but it doesn't seem to work.
nvm ended up using a screenspace shader!
There's a canny for it already
https://vrchat.canny.io/vrchat-udon-closed-alpha-bugs/p/setprogramvariable-clobbers-data-types
Thank you!
is there a way to see if an instance is public or not?
you can set a ui canvas to do screenspace and put an image on that canvas with the cameras feed
I've asked in the past ~about a year ago, but curious if there has been any new developments.
Any desire or plans to allow arguments with custom network events? Allowing clients to send data to owner would open up a lot of possibilities.
still here with the component issue-
Response last time I asked, does this still hold true?
now you can use OnVariableChange / U# Properties to respond to synced parameter changes, which solves many of the same use cases as Network Events with Parameters
Ohecc really. I will look into this. Thanks so much, been out of the udon loop for a while
detach it
I wouldn't have <13 play this game without parental supervision. There's a lot of weird $^&* people on here.
kk soz just saw it now
got it! thanks! I thought it was possible to do without having a dedicated rendertexture for it but that turned out not to be the case
If I cache, for instance Networking.LocalPlayer in a local variable, will properties such as isMaster be updated as the old Master leaves the instance
Looks like I have to be owner for this to work, maybe I'm reading the docs wrong :P. I was hoping to go from client -> owner, I have some weird owner relationships I am trying to maintain.
Anyways I have an idea how to rewrite this, with access to these new features thanksies. (Especially because SetOwner not being immediate is fixed now)
I've been struggling a bit with a graph meant to change the ambient light with trigger volumes...
It seems to function, but the numbers don't make sense.
I've got three triggers set up with this script:
The first trigger's NewAmbientIntensity is set to 0, second is 5 and third is 10.
In playback, the first trigger returns 1, second returns 2.6666 and the last returns 4.33333 -- which seem to be the value between the default and new....
I can't figure out what math is causing the value to stop halfway -- Don't suppose anyone here can see where I'm going wrong?
Are you supposed to be using isTransitioning somewhere?
at one point, I had that after the update, but I figured checking the Approximately bool did the same thing
maybe that's why it stops halfway :/
I'm not actually sure if it's halfway, I tried -1.5, -.75 and 3 and the outputs were .5, .75, and 2.
I suppose if it's exponential with the lerp, then these make a little more sense. In any case, @mighty fjord you've got me thinkin' that the Approximately node might be the culprit. I'm theorizing that it's increasing or decreasing only until the two values cross -- so it may not end up making it to the exact number in the "New" variable.
Yeah, I'd swap that out to a more proper timer
this stuff makes me feel dumb XD ... like... logically... that should be a smooth count down from the Duration value, right?
the behavior still appears to be exponential
then again... it might never hit 0
hek .. no luck using subtraction, or a combination of division and a minus 1 at the end to zero it out...
perhaps I should just ask... udon pros, how might someone noodle up a simple timer with a public 'duration' variable?
(specifically to be used in a lerp node)
Hello, is anyone able to get the analogue trigger pull value (0 - 1) on an Oculus CV1?
I found this spreadsheet the other day
https://docs.google.com/spreadsheets/d/1_iF0NjJniTnQn-knCjb5nLh6rlLfW_QKM19wtSW_S9w/edit#gid=1150012376
And the following methods
Input.GetAxisRaw("Oculus_CrossPlatform_PrimaryIndexTrigger") // Left
Input.GetAxisRaw("Oculus_CrossPlatform_SecondaryIndexTrigger") // Right
However, this does not work with Oculus CV1, because the trigger pull is not bound in SteamVR.
It seems that it isn't possible to bind the trigger pull to the "Trigger Value" because the item is simply not listed.
Does anyone have a workaround for this?
I found this thread on the topic, but it doesn't have a solution
https://feedback.vrchat.com/bug-reports/p/bring-back-taking-analog-values-for-oculus-controller-triggers-in-the-default-se
On the Index controllers the item "Left Trigger Value" is listed to be mapped to the Pull action (screenshot below)
This list option is not available for the Oculus CV1, even though it does have analog triggers and you can see this in the Steam VR controller tester. Does anyone know why this is?
is it possible to change material properties on udon behavior
whats the best way to find out what is lagging a world?
this world is lagging so bad: 1st it takes for ever to load . It goes to a load screen for like 10 mins then it turns black for like 3 mins then it goes to the loading screen again then it finally loads up and once im in its between 11 and 13 fps ๐ฆ what could cause this ?
It could be any number of things
Check out the optimization guide here if you haven't already
https://docs.vrchat.com/docs/submitting-a-world-to-be-made-public
Aside from that, you can run the world in the editor using CyanEmu and check the Unity profiler to get a general idea of what might be going on.
There are also some links pinned in the #world-optimization channel
thanks !
I'm having an issue with ObjectPool where if anyone aside from the instance owner uses the interact, the item is spawned from the pool, but disappears seconds later. Does anyone know what's causing this?
only the owner of the pool can spawn objects
the default owner of an object is the master
before trying to spawn objects, simply take ownership of it
I have it set to set owner as local player on interaction before running the TryToSpawn
Before I did that nothing happened at all if someone else interacted.
is the instance owner taking it back somehow?
That's what it seems like, but I'm not sure why it would be doing that
Ok upon further investigation its just setting the position of the gun to the origin of the pool if anyone but the instance owner spawns it. That's a bit strange
Especially since it spawns in the correct place initially
Do I have to do a networked event to set the position? Like my only thought is that is sets the position for the person who spawns it then reverts to the intial position on update because that's where it should be for the instance owner
Question; is whether or not an object is enabled synced?
No, you need to sync that yourself
The location of an object is set by the owner of the object, so if you set its owner to the person who spawned it you shouldnt have any issues
with the playertag system is there anyway to count how many players have a specific tag attached to them
Could someone tell me how i can make a bool trigger be global? is there anything i need to add,
My guess is have a common Udon behavior hold your variables where it could also be your datasource to sync on the network instead of per object syncing.
I'm not sure, for now I just put the origin of the item at the desired spawnpoint.
still here with the component issue-
question anyone know how to fix the black screen of death on Oculus?
idk but i dont think that this is the right channel for that
I thought this would be a simple script, I just want to add text to an input field at a custom event, but I can't seem to get any events working at all, not even OnMouseDown is calling the append text Udon Graph. Does anyone know what I could be missing?
i found the issue, in the example that was shown to me they were set to type, i changed them to T[] and now it works
Quick question with the udon method VRCPlayerAPI.Immobilize that locks forwards and strafing movement is there also a way to lock rotation as well?
So does anyone have a simple way to make a pickup return to an objectpool after being unheld for 10 seconds. I tried making a true false using isheld triggered by the drop event, with false leading to a sendcustomeventdelayseconds node. However, nothing happens after 10 seconds
I know this has probably been asked a lot, but is there any way to get a synced random player? For example the master constructs an array and chooses a random player from it, then syncs that value to all players (I know playerapi can't be synced yet). Currently trying to put this into a minigame where players know when a specific player is looking at them, and this player can be different every round.
what version of uity is needed? i cant seem to download 2019 4 3 f1, it doesnt work on either hub or website, it says
Unknown under Editor version
i get this weird error after i install udon sharp anyone know how to fix it?
if anyone knows why im getting this CSharp Error itd be hugely appreciated.
Is there any way to get the players view position?
Or otherwise attach some sort of UI to them without some custom shader jank
playerapi. get tracking data --> tracking data. head
who wanna play vr chat
Hi guys, maybe the wrong place to ask this, but has someone in vrc already figured out a way to make powerpoint work? I know that I can record the slides as video and start/stop playing in a world with video screens, but there has to be a better option than that right? I am considering teaching in vrc for a few sessions this fall
Does deactivating a gameobject in an ObjPool return it to the pool?
A video is probably your best bet. Certainly the easiest option.
You could also livestream a powerpoint window using OBS, then load that stream into a video player in VRC.
The problem with streams is the delay. Probably around ~10 sec or so using Twitch. Not sure about YouTube.
Using a paid service like VRCDN you could get much better latency. I've gotten mine down to < 1 sec on their service.
Other than that, you could set up a custom VRC world and build a powerpoint system with UDON, but then the slides would need to be setup in Unity.
It would be a lot more work, and requires some knowledge of Unity
so i have problem my world its not letting pc join but quest can join just fine
and both sides are update
anyone know where to get Vip system for your worlds
How exactly do synced objects sync between udon and quest?
I added a new object to a group of synced objects, and they all seem to be off for quest now. They say they're picking up one thing but its something else
you need to make sure that both quest and pc have the same objects or else they will assign the wrong network ID's
so its not specifically object name based or hierarchy order or anything?
i guess that would mean i cant remove or add anything to either version without updating the other one because it would throw everything out
it's hierarchy order, yes
you can remove components and disable objects but don't delete objects
Hmmmm ok, ty.
I'm trying to create a teleporter but the eventName part won't allow me to enter a name
your custom event probably isn't connected to anything, so as far as the compiler is concerned, it doesn't exist
what do I connect it to
oh, your trying to call an event on another script? in that case, go create node, string, const string. then plug that into the string slot
thanks
^^
you can also try saving each slide as an image, then design a system which allows you to swap images on a ugui element based on timing
how do i set urls in udonsharp?
What are you trying to do?
Has anyone had an issue with the attachtome script where the item respawns only for the person who itially took it? Like if I drop an item after picking it up, it resets for me after the timer, but is still in the same place for everyone else.
what i'm trying to do is just play a url from a list
I've only used the UdonVideoplayer prefab, and it has a playlist option
Sorry, wrong link. I meant this one. USharpVideo
https://github.com/MerlinVR/USharpVideo
When you click on the prefab in the scene there should be a playlist you can add urls into
i guess i'll just look through it to see how it works
Is there a way in VR Chat for per user lighting? e.g. One person sees the scene lit as total darkness & another can see in twilight?
Everything is local by default already. So if you put a button that change the lighting, and someone presses it, then it will only change for that person.
oh really...dang didn't know that!
Is there a way to toggle access to private rooms?
Yes, there plenty of worlds that do that. But as we established earlier, everything is local, so you have to sync the state of the room yourself.
I'm trying to find the prefab that lets you set up audio zones for avatar voice. Anybody got the link to that one?
Hi, is there a way to make it work on any of the video players on Quest2?
Everything is perfect on PC, but I can't seem to get it to work on Quest2. ๐ฆ
I have tried direct link access, WEBM and and MP4.
I've searched a lot of tutorials on the net too. I couldn't find anything that could help.
I hope someone here knows the solution. ๐
Video players do work on quest but not for anything that uses the youtube-dl library. Direct http streaming should work with mp4s. You'll need to allow untrusted urls in game on the menu system if you have not already done so
Yeeeee, that was the solution.
... really works. Thanks for your help.
How would one make it so a gameobject is toggled locally instead of globally using Udon?
By default all your toggles will be local, you have to call events networked for them to be global
Not nessecarily. Players entering a trigger for example is a common issue that "appears" to be global. But its because the cause is synced, not the effect.
True, some event source can in effect be global. But at least if your going off like a classic button or UI event they'll be local.
Anyone in here know how to make drivable cars? I'm working on Talladega Superspeedway for my community to have Sunday races in
There's a few different prefabs you could try, this is the first i could find but i know there's a carts one out there somewhere too
https://github.com/Sacchan-VRC/SaccFlightAndVehicles
Doesn't this have the ability to run out of fuel and explode if you hit something?
If so, then this is perfect
I havent tested it myself but i do see mention of fuel in the files so i believe so.
Yay
Yeah, I want the cars to run out of fuel and have the ability to be refueled by holding a gas tank up to it (so the drivers are forced to pit) and a health bar for the cars, so every little bump takes a little off the health or a big wreck will take most if not all of the health so cars can be eliminated from the race
For more immersion
Hello! I was wondering if anyone had a trick or method for rendering a world space canvas over anything in the map. For instance I have a hitmarker prefab with a damage UItext element that appears on a collider when you hit it, but the model will block the text
hey how do i customize the TV name and have it work on the VideoPlayerSwap
i only want 3 screens available
(this is on the asset ProTv)
That's the issue I'm having and the cause. I just ended up checking if it was the localplayer
I'm having an issue with the Attach to me package by bd. I am trying to utilize the respawn function, but it is only respawning for the person who dropped it. The gun remains in the same position for everyone else. Does anyone know a way to fix this via Udon graph, because I have no idea how to code UdonSharp atm
How would I go about making an elevator that works?
Either via an animation or math functions to change the height slowly over time, I'd think
I did make an animation back before Udon was released when I was trying to make it work through SDK2 triggers..
If you only care about text and you are using TMPro, then you can switch to their overlay shader.
You are already doing it in your screenshot.
doesnt work tho
What doesn't work? You are using the nodes to convert an int to a string, that should work. What happens after that, I'm not sure about.
Do you get an error?
I got an error in CyanEmu that the sring goes to void
Can you post the full error?
It says a "SetActive" node is failing somewhere.
i'm trying to figure out how to make the animation play once while stepping through a trigger in a fixed animation movements:
i traced the red lines exactly how the particle animation moves, but when it reaches the end, it rewinds and replays the animation, i don't want that, i wanted to play the animation once, is there a way to do it?
does anyone have a recommendation for a website or youtube channel that teaches how to script and use udon for an absolute beginner
honestly have no idea where to start
@visual elm Click on the animation and turn off looping.
ah, there we go, thanks, i forgot to look there
Thank you that worked! Any ideas how to make my text always look crisp? I keep getting these weird lines on the top of the text
Hello, I have a question. He won't let me play the vr chat anymore. I think this. Someone knows what I can do
is there a way to make VRC_ObjSync to stop updating position data so i can have something else start updating its position?
i tried setting its enable to false, but seems it cant move the object at that point.
It doesn't work for me now I enter and open the map but it puts that on the screen
Someone can tell me how to remove that message so I can play
Not an udon question. Try asking in user-support
Is there a way to recreate the sdk wall climb/jump?
Trying to make an easter egg toggle with a public bool variable that changes the bool value as well as the switch's color
Need some help changing the material color
Nvm just needed to use a different set color command
I know there's probably tons of different way to do it, but what's the cleanest way to detect a player "tag" action?
Does Udon support Object tags
if you mean the tags like untagged, no, they are not uploaded
I mean the tag like touching another player with their hand.
One other question, I noticed the vrcsdk combat system is deprecated now and no longer available. Is there any other way we can access to a "ragdoll" effect when a player is being killed?
Also very curious why this system is removed, though I built my own combat system with the help of UdonSharp, it seems a very convenience and fun tool to use lol
Importing the World SDK into an empty project produced these errors after saying things needed to be updated, complaining about VRC.Udon.Wrapper.dll and VRC.Udon.Graph, is this expected?
Can i increase the timeout wait while "updating assemblies"?
It's deprecated, but still usable in Udon. VRCPlayerAPI has some methods related to it, they all start with "Combat". I think all you need is set hp to 0 for the ragdoll to trigger.
does udon or usharp have any sort of unity job system/multithreading support?
hi, is enabling/disabling VRCStation.disableStationExit at runtime possible? sometimes it works, sometimes it doesn't
no
Does anyone know how to make areas appear or disappear in udon. Iโve noticed some worlds have whole sections of areas that unless you trigger a event it doesnโt show up.
This I figure could help optimize my world and hide areas I donโt want shown unless people figure out how to trigger the event.
A better way of optimizing your world is to set up occlusion culling or reducing your camera far plane if your render distance doesn't need to be that large. By default, It's 1000 which is insane.
As for specifically answering your question; You'd have to have an Array of GameObjects in an udon behavior and then toggle the state of the GameObjects when a condition is met such as OnPlayerTriggerEnter or such
Greetings, after uploading my word privately while i am in the game i am not allowed to join in. I only have a black screen and it teleports back into the default word. How can i fix?
Obviously while testing it trought the SDK i dont get any problems there
Maybe this is a better place to ask!
I'm trying to change ownership when a player presses a button. I don't know what im doing wrong at the request! Can anyone tell my how and what I'm doing wrong? :)
Usually, you'd want to use Networking.SetOwner for that kind of thing.
OnOwnershipRequest is a callback that you can use to react to changes, it's not made to be called.
I keep seeing people with that problem, but honestly, I don't think I've ever had that one myself. Can you make sure you have the right Unity version, current VRC SDK version etc?
Ah ok, thank you so much! So the "GameObject" in Networking.SetOwner is the Udonbehaviour?
Yes, ill check again but i am really sure
im tryna doing it from 0
Currently having an issue where OnTriggerEnter isn't firing for Pickups.
The Trigger Collider is on a game object that's moving on the MirrorReflection layer while the Pickup is supposed to collide with the moving Trigger collider.
The Pickup is on layer Pickup and the collider on it is not set to isTrigger like the docs say and does have a rigid body and a vrc_pickup
is there a website where i can find models and textures like glass?
Yeah, I'd try to upload an empty scene as well for testing, just in case.
Yep, you can just type in gameObject to get the object the script is attached to right now.
Thats a good idea
Ok, thank you! :)
This is probably why.
Yeah. That's what I was going to assume
Does collide with walkthrough though. Might just place the player col on that
I will give it a try and it would be a great help if it works, thanks
When I use LayerMask.NameToLayer on one of my custom layers on Start, the value seems to be -1. Do I have to hard code my layer index or is there a proper way to check?
layer names are not uploaded with worlds, so you can't use that for custom layers
Okay. Makes sense. I guess I'll hardcode the index
It didn't seem working.
Maybe you have to call the setup method, or give the player some hp. Check out the "FaxFallDamage" prefab on vrcprefabs.com, I used that one for a world and the ragdolls worked.
I will take a look.
I'm wanting to pick up an object and, when used, a random word from a list will appear on a wall. I'm very new and have tried online resources but I still don't know what I'm doing wrong. My current issue is that I can't get the randomly selected word to toggle on when I use the object. I'm not even sure if a word is even being selected... Any advice would be appreciated
I think it's a local event that has to be triggered across all clients, and it works now lol.
Thanks for sharing it.
This adds so much fun of killing other players.
Anyone know if there's a node for switching a number from positive to negative?
I'm trying to get the absolute difference between two numbers. ๐ค
You could multiply the number by -1
Ahhh. And is there something I can do to check if it IS negative before doing that? Like use a branch to check somehow?
Oh, So you want it to always be positive?
You can use the "Mathf Abs" to find the absolute value or a number, will always be positive
Ah ha~ ๐ฎ
There we go. I think that looks right... Scaling a thing based on the distance between your hands. ยฆD
Hah! It works great. Thanks @night viper ~ ยฆD
Hey guys, I'm attempting to have lights turn on when it turns 1800. Is there anything that may be prohibiting my script from functioning properly?
hey, i have a question. I just got vr on steam and i want to link my oculus account to it, does anyone know how to do that?
The set enabled is not linked to anything, you need to assign a public light variable as the "instance" targeted
thx
Trying to call a variable from another Udon script, but it only wants to call from itself. Anyone know how to fix it?
You need to say what udon behaviour you want it to get it from. Currently, if you look at the variable in the inspector, you will see that it says "self". You will want to change that to be your target udon behaviour
I'm trying, but it refuses to let me
I just made the target UdonBehavior public so hopefully that's all I was missing
It was, and apparently you need to drag and drop the UdonBehavior component of the other object's script into the graph
how do I access the udon graph if I don't see it on the bar at the top of the screen.
if you click on the script in assets then a button that says open udon graph will show up in the inspector
almost at the top
kinda like this?
mine looks like this
the open udon graph button is at the top
ive never seen what you have
Ok i got it to work. Thank you so much. sorry i just wasnt use to udon since it updated a while back
Hey, is it just me and a stupid mistake I made or is the UdonSyncPlayer (AVPro) ignoring audio effects like low-pass and reverb? Because everything works with UdonSyncPlayer (Unity), but I can't watch livestreams on there. Thats why I tried AVPro, but the effects dont work there for me.
is the onvarchange event broken? at least for booleans? ive tried to use it a few times on a graph that i know works with other events but this one just never seems to trigger even when the variable definitely changes
im sorry ive never heard the term local event before, could you explain what you mean?
also dw its not a stupid question, i appreciate that youre trying to help, whether you can or not
As in, an event that only fires for the local player
e.g you and a friend are in a lobby and the event only fires for the user "clicking" and object, that way you may want to send a custom network event to all so that everyone knows that your friend clicked the object
otherwise the event will only run for the user clicking, I'm not sure if every single event is fired for everyone in the lobby
ohh i see what youre saying
See what I mean is that if the boolean isn't synced, or changed for everyone. would it be fired?
Though you are the master of the instance so that shouldn't be an issue...
i dont think thats my issue, im not working on networking stuff rn. I made a simple boat vehicle and at one point i was trying to have a bolean called isMoving which would be true when the boat is moving, and false when it's stopped. The plan was to change it on interaction with a button on the boat and then use the onvarchanged event to cause the boat to start moving
when i tried that it didnt work
im working on rebuilding that graph rn so soon i can send a picture of what im working with
why not just use the oninteract?
oninteract -> toggle boolean
and then just run the code under it
make sure sendchange is on
ah shit and that too, damn I knew I forgot somehing
thanks for letting me know
i tried to look around on the documentation for what that box meant but i couldnt find any info so i kinda forgot it existed
is there anywhere i can read up on exactly what it means?
thank you both so much for the help btw!
it's entire purpose is to trigger onvarchanged locally
Is there someone around that is willing to help me understand the difference between these two Udon scripts?
https://github.com/jetdog8808/Jetdogs-Prefabs-Udon/blob/master/UdonSharp/Teleport_TwoWay.cs
https://github.com/jetdog8808/Jetdogs-Prefabs-Udon/blob/master/UdonSharp/Trigger_Teleporter.cs
A compilation of prefabs and other useful items for vrchat users. - Jetdogs-Prefabs-Udon/Teleport_TwoWay.cs at master ยท jetdog8808/Jetdogs-Prefabs-Udon
How does that exit event make it "two way"?
The only thing the two-way script does is prevent you from getting stuck in an infinite teleport loop by telling the location you're teleporting to to not teleport you back immediately
im trying to make a graph that transfers ownership of the networked object BoatSynced (a simple boat vehicle) to whoever presses a button on it, but for some reason only the player that first loaded in can control it which makes me think that ownership isnt actually getting transferred but idk why. I have the onownershiprequest - setreturnvalue true set up elsewhere and it was working before when i had this graph instead. (I'll post a pic of that in a sec). Does anybody know what im doing wrong?
the functioning graph:
the first branch is just receiving a boolean that is true if the boat's velocity is 0 and false if it's anything else
i couldnt fit that part in the screenshot
so i tested it again with just the setOwner node connected to the interact event and still nothing, could this be a bug? it looks exactly the same to me as the time when it was working
Oof, I'm more of a U# developer, I can't help with the nodes
do you know if there's a way to code just the bit about transferring ownership in u# and leave the rest in node form? i really dont want to rewrite everything in u# but im fairly confident that i could handle writing just that part
You could but you'd need the U#
Unity package
jeesus Sorry for ending my sentence so abrubtly
np lol
thanks for the help!
so once i write the u# script do i just add it as another udonbehaviour on the object or do i need to somehow combine it with the node graph?
ok turns out it was a bug, i reloaded unity once (maybe it was twice i dont remember) but either way after that it works fine
Good to see you were able to fix your issue!
actually it looks like i spoke too soon, the issue that i was encountering was that even though ownership was being transfered, ownership of the 2 synced variables that i was using to control the boat was not. So it seemed like the owner of the object itself was always the player that loaded in first, but in reality that was changing properly, its just that for some reasons the variables didnt go with it. Is there a way to make the variables change owner too or is that not possible?
also is there a known bug with the node graph that makes certain changes not take effect until unity is reloaded? because that's happened to me several times today. I've been doing something, then i changed a value and it appeared to do nothing, then i reloaded unity immediately hit build and test and then the change worked
I see - thank you for that explanation. So that would require both area triggered teleporters to be linked to each other to do this?
Exactly ^^
Great, thank you!!
I'm trying to make a Unity editor tool to automate some simple tasks in U#, but I'm not super familiar with U# lol
I mean the tool itself is written in C# but it's to assist with U# dev
Well I guess I misread something, appologies
no worries! i didn't word it very clear
I'm not sure U# itself could even interact with the Unity editor since it's all via the editor gui libraries
Small chance
If you're really geeky you could try to straight up modify Unity, but I tink you'd need a license for that
do you think it would be possible to make the pitch of an audio loop increase or decrease depending on what the rotation of an object is?
I wanted to make something similar to gmod's wowozela in my world, and I'm unsure of the practicality of that idea
Most definetly
that's basically what the editor gui is meant for, so i think that'll serve my purposes
you're doing good, keep it up!
Sankyuuu
This is for a course project at my uni, pretty fun to get to do VRC stuff for uni
right, so I've almost got it to work properly, but something's off here
I want it to only change pitch when looking up and down, but for whatever reason, it changes pitch when looking from side to side as well
here's the setup, any idea what's going wrong here?
(I tried "Get Rotation" instead of "Get localrotation" as well and it didn't change results)
Is there any way at all to communicate out of VRChat from the game? Like from an avatar to a custom peripheral?
Wait, is that doable with the new OSC features?
You can now set up Open Sound Control to change parameters on your avatar and read parameters from your avatar-- both input and output!
ye, but thats chrrently avatars only
So my goal would be to have a collision on an avatar basically trigger a python script to run, is that feasible?
thats an avatar osc question. i have not touched it until its udonable
Oh I didn't see that there's a channel for it yet
@clever flare sorry, meant to ping for this
Lemme check this out
No, and i dont think they'll ever let you run an eternal script. That'd be a massive security risk.
Unless its just the osc data getting read by a external program that runs it i guess?
Can you share what you are trying to do?
Specifically with the python script. Mostly out of my own interest.
Heya folks, Iโm trying to figure out to do automatic teleportation in vrc unity. (So like after 10 seconds you teleport without interacting with anything). Anyone know how to do this?
Set a trigger for a user to enter the reagion, and then when they do call the teleport function with SendCustomEventDelayedSeconds
SendCustomEventDelayedSeconds("TeleportPlayerFunction", 10, VRC.Udon.Common.Enums.EventTiming.Update);
or whatever that looks like in udon graph
thank you so much!!
I mean the goal of osc is to communicate between applications so I would be reading the osc data with a script ye
Yeah!! My goal is to create a system to let simple peripherals communicate with the game via Python, and rather than doing complicated shader stuff it'd be great to use osc or something similar. To start I wanna make a hat that has haptics for headpats that's super cheap lol
Maybe everyone here is trying to do the same but, is there a way to reference an avatar's animator and read the parameters from it?
Basically i want to find the local avatar gameobject, them get the animator component to read parameters there sent by osc applications
Is there a way to do that?
Not unless the avatar is specifically set up to output the values through something readable by udon, like a pixel on the screen or bone rotations
Oh?
What could i setup like this that works with udon?
Its a map where i will be by myself, for stream purposes
Its fine if its a dirty method
What could my avatar output that udon can read?
I even tried using gameobject.find to find a game object inside the avatar and it did not work
Avatar -> OSC -> Midi -> Udon?
Yeah! I think this should do it
no, you can use midi directly from your computer to a vrchat world
VRChat can connect to a single MIDI device and receive events from it, piping them through to your Udon Programs. To get started with Midi in your scene, add a VRC Midi Listener component to one of your GameObjects. This Component informs VRChat that you want to receive Midi events, and starts up th...
Ah, I missed that they were already using OSC
no avatar requirement
pipe your information via a midi device into vrchat and you can react via udon
Yup
we will get osc for worlds too
but for now that's not the case
Yeah, eventually
hey so i went through all i could think of and i cant figure out how or where to fix this problem when trying to post this to questhere is the error message thats probs the main one thats stoping me
This is an avatar, #avatar-development-links
ok so i downloaded it from a vrc avi downloading site witch i cant say the name bc its banned
and yes it is
This isn't a udon question
Udon is only usable on the world SDK, not the avatar SDK
I was following the VRChat Udon - Building a Networked Slider Video by VRC. till i got to 4:58 Where im suppose to make a Udon Behaviour Script and add new program. witch i did, but the video then tells me to press Open Udon Graph but all i see is this? I followed vid 1 to 1
oh wait nvm CyanEmu broke everything
Ah, so custom hardware interaction. I have no clue how to do that without writing a bunch of stuff yourself. Hopefully, OSC will make that simple for people.
still trying to figure this thing out
I've tried a couple different things in the script and the world itself and I haven't gotten any closer
really unsure what's going wrong here
You don't want to access the quaternion's X component directly. Instead, use localRotation.eulerAngles.x
alright, so I changed the script to this, and it does eliminate the pitch directional issues
but now, the pitch is extremely sensitive
which makes sense, since it's taking the x and applying it to the pitch (90 degree x angle = the pitch being x90)
but as you might expect, it makes my ears bleed
could there be a way to make a certain range of pitches, so there's kind of a maximum and a minimum pitch?
Well you should try to calculate it into a percentage of a range
hmm
Yep. Multiply the source value by a dampening scalar (like 0.5 to make it half as sensitive) and then pass it into Mathf.Clamp to set the lower and upper limits.
alright, I've been playing around with this setup, and I keep getting the same results no matter what value I change
There might be something super out-front that I'm missing
I wish I could help but Udon graphs give me headaches
same lmfao
I make everything in U#, graphical programming doesn't work well for me
Quaternions give me a headache, that's why I usually stick to vectors. You can use something like this:
var lookDir = _player.GetTrackingData(VRCPlayerApi.TrackingDataType.Head).rotation * Vector3.forward;
var val = Vector3.Dot(lookDir, Vector3.up);
who doesn't get headaches when working with quaternions
Val is 1 when the player is looking up and -1 when looking down.
I just googled how to translate that into your own values, this is what I found:
float t = Mathf.InverseLerp(-1, 1, val);
float output = Mathf.Lerp(newPitchLowest, newPitchHighest, t);
Idk if all of this works, but should in theory.
Yep, sticking to eulerAngles is fine I guess, but once you start to deal with applying multiple rotations, when things are in a hierarchy too, stuff just stops making sense.
Your clamping values are too small. The input range is -180 to 180. So, even with the multiplication, you're trying to clamp a 180 unit range to 1 unit. Try something like -40 for the min and 40 for the max and adjust from there.
You can simplify that first line by just referencing the Transform's forward vector directly.
Actually, that whole bit can essentially be boiled down to:
var val = _player.GetTrackingData(VRCPlayerApi.TrackingDataType.Head).forward.y;
Unfortunately, you can't since it's not a transform you receive.
Ah, my bad; you're right.
Thank you, I'll check this out
After inputting those values and then fiddling with them as well as the multiplier, the result is exactly the same every time and I can't really tell why
I would've thought that at the very least changing the multiplier from .5 to .05 would have some sort of change, but it's been the same result
Probably because even if you move by only 20 degrees, that would still be 20 * 0.05 = 1.
Try a much lower value.
I'd still recommend my approach, since it's easier to reason about.
lowered the multiplier down by a ton, and I mean a ton, like to .0001
I'm still not hearing any differences
Altering the clamp minmax values doesn't seem to change it either
wait a minute
what just happened
I just randomly messed with the values on a dime and it did soemthing
let me mess with this
right, so things have changed, and it seems like
Hi guys can someone help me boosting my VR CHAT? fps i am on oculus i have a gtx 1660 i5-9400f intelcore and 16gb of ram
The issue is that i always get 40-35 fps in even empty worlds
I've tried to fix this issue but i cant since theres no graphic settings in VR CHAT
there is, but this question might be better in #user-support-old
the pitch always hits its peak when the object gets to 90 degrees, and then it decreases as it progresses to 180
However, the negative number side is always pitched a lot higher, and acts as an exact opposite to the positive side, peaking at -1 and -180 and reaching its lowest point at -90
Altering the clamp doesn't seem to do anything to change this
How would one go about calling an Udon# script variable in an Udon graph? I don't use UdonSharp but a prefab I use does, but I need to pull a variable from the Udon# script.
You should be able to use UdonBehaviour.GetProgramVariable
Does U# support custom enums? Trying to create states for my script but the U# compiler is not happy and can't find the enum type
Alright so correction, changing the clamp to a small number like 1 or 3 does make the clamp noticeable, but it's not very useful in this case
with the new update are we allowed to access players mic streams?
from the patchnote it sounds like its specifically on the avatar sdk.
So you could make an avatar that when a user uses it it sounds really quiet?
or an avi that mutes people wearing it XD
i just want to access the audio stream to pass through audio link
no, it's a float that is set to the volume of the player's mic
so if they're talking very loudly it'd be closer to 1 and if they're not talking then it'd be closer to 0
and it's only for avatars
yeah makes sense
Oooooohhh i misread it, that makes more sense
Quick question: SDK updated so... i need to update my UNITY version too?
no, just import the new sdk package, the unity version is the same
hello vrc wizards I have a question? is it possible to make a script where a player owns a room and moves them to said room but if other player loads in want the same room they can spawn in other room under it? like this https://cdn.shopify.com/s/files/1/0553/3656/6953/files/gta5_mlo_gnmods_interior_crastenburg_hotel_20_720x.png?v=1621357547
So player one claims room 1 player 2 comes along click the same claim door but it spawn room next to room 1? and so on and so on?
is this possible in vrc?
Alright, thanks!
It is, but why not just say that room is occupied and make they pick a different one?
hello, how would i fix these errors?
They are preventing my VRChat SDK Control panel from showing up
the first error can be ignored, the second error is a script that you imported from an asset pack. It was probably made for a different version of unity. Most likely you can just delete it because you can't upload those scripts to vrchat anyway
So am working on system for player to buy house and it saves but if two players load into the same world it will not give them at the moment same house so need script that goes like player 1 has loaded in here is his house and when player 2 loads in and has the same house it goes house 1 taken but use a modular to load the same house but under it? this is how it works with FiveM MLO mods for player housing but VRC is kind of hard to learn. also wish we could use SQL data base for save system.
Does anyone know how to attach a shader/material [poiyomi] colour and emmision to Udon Graph so i can change hue through a slider
you'd need a reference to the shader and a get shader param node
if they even exist, but I could be confusing it with Godot
yea thats Godot
Well I do know It's possible to change parameters in C#, butI don't know if udon has it
I'm a U# user and I don't know if even that has it
damn... i dont know C#. Wish there was some tutorial on a simple hue shift slider
there should be, I'd look around in Udon for anything related to shaders
There usually isnt any tutorials on specific stuff. usually its general stuff that you need to figure out to edit it to work for something else
I should start making tutorials at this point lmfao
that would be cool and help out the community. but if you where to do so. please to specific stuff like [for eg] how to specifically make a slider that changes hue on a shader
honestly i should do the same, would be sorta fun i guess
That's very specific, but I could check it out in some kind of test world
It's hard to make a tutorial for everyone becquse everyone has different ideas
true it would cost time and work get hopefully get stuff working
oof ok this chat is getting off-topic and dont want to get into trouble. I will try find a way to get a poiyomi hue shift working on a slider
I think it would work, you can do it! Take a cookie for extra luck ๐ช
thank you ๐ cookie taste yummy
The same way you'd do it in C#:
https://docs.unity3d.com/Manual/MaterialsAccessingViaScript.html
Type in those Material methods in the graph and they should appear.
Not sure about poiyomi, but for a general unity shader, here's the steps you need to follow:
- Expose a float variable for the hue in your script
- (optional) make your script run in the editor with [ExecuteInEditMode] (not sure how compatible that is with U# though)
- Determine which color property you need in your shader by switching the unity editor to debug mode and finding the color property in the material's inspector
- Use UnityEngine.Color.HSVtoRGB to convert your hue value into an RGB value.
- Use Material.SetColor (https://docs.unity3d.com/ScriptReference/Material.SetColor.html) with the name of the shader property and your new color to set the hue to the actual in-world material.
Hi, i am trying out the Scroll Texture C#Sharp for my world, I've already set it up, used the play function, it works as the texture of the smoke scrolls, but when testing out in vrchat, the smoke texture is not scrolling, here is the example:
you can't upload c# scripts to vrchat for security
vrchat has a system called udon which allows you to do programming instead. you could either recreate it with udon graph or compile that script into udon with udonsharp
oh, use Udon Sharp instead? i can copy from c# to U#?
or..... can you provide me the formula for Udon graph for texture scrolling with X and Y?
@grand temple
everything the script does should be the same in u#
ah, thank you
make new udonsharp script with udonsharp imported into project, when attempting to convert, there may be issues so be prepared to debug. after making a new udonsharp script and opening it. copy all contents of your script into the udonsharp script under the โUdonSharpBehaviorโ class. and include things included above on previous script and see if that works
ok, i'll go do that
i just made a world and tried to go test it but im getting 3 compiler errors, I have not made anything special in it. There's no UDON Script and im getting these errors
Do methods like OnDrop() get called by all clients or just the (former) owner?
oh, it works now! thanks!
I think that this might be called for the owner, an easy test would be to have a cube with a mesh renderer disable itself when it runs
then you run 2 clients, and if the cube dissapears in both clients it gets sent out to everyone
if it only dissapears for the client doing the action, it's client only, so you'd have to use sendcustomnetworkevent with all as the target
I realised I currently have an issue that if an object starts deactivated, it won't be alive so can't listen for deserialisation events that might 'wake it up'
Yes, that's why I usually create "managers" for these objects, listening for events that have to activate the inactive object
remember, inactive objects can never active themselves<
Yeah, I'm reworking that bit of my logic now
Keep us up to date, and don't be afraid to ask questions if something breaks, alright?
of course :3
sorry, I thought I'd record a demo of this behavior in action, since it was hard to describe
(sound warning, his scream is very annoying and loud)
as you can see, when tilting upwards from 90 degrees, instead of making the pitch raise, it just decreases
and when it reaches past 180 degrees (or -1 degrees) it gives the opposite effect, raising the pitch
This case is super perplexing for me and I have no idea why it's behaving this way, I'm beginning to consider that it might just be impossible with how euler angles function, but then again I don't know
if your goal is to make a texture scroll, id recommend you do that within your shader instead of in a script
i don't have any shaders for it, unfortunately, unless.... @wide basin
the most popular shader is vrchat is https://poiyomi.com/ it has texture scrolling features
also editing standard to add texture scrolling is really easy
Yeah, that's an euler approximation thing. What are you trying to do? Higher pitch when it aims higher? If so, forget rotations, and just use transform.forward.y as your input variable.
I'll try this out, tysm
any shader works on worlds
then i got lied to before....., hmmmm, ok
Tried this out, and it gave different but similar results
Like before, the pitch peaks at 90 degrees, but then it decreases on the way to 180
It did get rid of the very high pitch when in the negative number range
(This recording is very quiet for some reason lol)
Overall, the recurring issue is that the pitch always reaches its highest at 90 degrees rather than the preferred 180
Show your code for that please
(sorry if the visual editor is annoying)
You probably want to add one to the Y, but otherwise, that looks correct.
What do you mean by adding one to the y?
set pitch to y+1
Ohh gotcha
right now it's -1 to 1, which is not a great range for pitches (1 is default)
Just remember the auto locking code won't activate so remember to manually lock the shader before you hit Build.
Otherwise not only will the shader be unperformant, but also will make your build time VERY slow.
ok
yooo I think this actually did it
with a bit of tweaking, I got it to work nearly perfectly
Nice, glad to hear it
Thank you so much, I'll update if anything goes awry
Hmm, so I've got object on/off syncing now with the help of a manager, but the object properties won't automatically update once the object wakes up so other players are seeing default data.
And even if I set the data after the wakeup call, it seems the object data transmits quicker than the object wake up
well, i got the poiyomi toon, tried to find the texture panning and i can't find it
Pretty much all texture fields have a panning option
i saw one in glitter, but i don't want the glitter
Expand the arrow next to any texture slot to see its tiling, offset, panning and UV selector
oooooooooh, i see, ok
there we go, got it
one more thing that still bothers me
the texture i got for the smoke effect like a box
like |, i don't know how to get rid of that
That's the difference between a tiling and non-tiling texture. It takes a graphic artist to fix it properly, but some art tools can do a rough job.
oh, i see, ok
Hey I have a question what does it mean when you see under the username at a person with headphones on and a red X through it slash through it I mean
so completely unrelated to my previous question, I've set up a udon script to make this guy make a screaming sound, do a little screaming animation, and toggle a particle stream when picked up and used, but for some reason it doesn't work as intended
This is the script
It doesn't make any sense to me at all, since I've used almost this exact script before and it worked perfectly in that case
Check that none of your references have been unassigned in the UdonBehaviours' inspector. That can happen after editing scripts.
Alright, I'll check it out
Any ya'll know the UdonSharp equivalent of this?
SendCustomEventDelayedSeconds(ApplyJumpForce, 0.15f, Update);
if i decrease the proximity of an interactable object, would it be normal reach? because most interactable objects i've placed in the world can be reached by far, and i don't like that
How do I enable jump?
For Udon Graph; where do I find the "break;" command for example for breaking out of a for statement?
I haven't used it, but try looking at playerapi > get/set JumpImpulse.
Thank you
There isn't one, afaik. You just stop flowing from that node and flow from the For loop's End node instead. You'd also need to alter the "end" var for the For loop, presumably.
It works, but every time its tested it works once then keeps looping back up to the second point but won't go back to the first one. Any ideas?
They appear to start at 1
i think this is undefined by the api so you should not rely on it
how to make player voice louder in one area ive been trying to find something on that but i cant find it
Anyone know how to do seamless teleportation? Like, teleport someone to a different point, but a positional offset from where they were when the script was activated
Thanks, I thought that might be the case. I just created a skip check, still runs through the entire for loop, but doesn't do anything after the skip check bit is set.
playerapi has these options:
i'm guessing you can't change materials in code with udon, am I wrong on that?
I added the ProTV 2.2 to my world and everytime I try to build and test/upload the world I get this error message
show us your console log
is that all of it or is there more if you scroll?
need to see the whole thing
just asking again for anyone who knows; can you change materials in code on VRC or does it have to be some kind of animation toggle?
Has anyone else experienced MIDI inputs hanging??
anyone have issues with nodes just randomly disappearing I tried to add it back in and as soon as i add the noodle to it the node i just added vanishes.
I'm trying to change this part of the reflection probe through udon, how do I get the instance of the reflection probe I want to edit?
I cleared the log and tried it again and here is everything that popped up
also this
Question
If a player is in a VRCStation, and if that vrcstation is set to mobile, if you move around that vrcstation does it add an offset for that player?
can the probe origin of a reflection probe be changed during runtime? I want to change it but I want the box to stay where it is, basically "probe scene edit more: origin" during runtime
Hey guys, I'm trying to create some code so if 3 objects are placed in specific places they will act as a sort of key combination and unlock a door in my world. Could someone point me in the right direction to get it working in udon?
idk what to connect it to tho ?
Iโm trying to have 3 individual sliding doors next to each other, act independently of one another. When I set them up in Unity using this udon script, it looks good, but when I go into vrchat it appears the doors share the same closed coordinates and stack on top of one another. Any suggestions to fix this? https://youtu.be/-hv9r8s84BY
Thank you! ๐
Iโm trying to have 3 individual sliding doors next to each other, act independently of one another. When I set them up in Unity using the udon script, it looks good, but when I go into vrchat it appears the doors share the same closed coordinates and stack on top of one another. Any suggestions to fix this? Thank you! ๐
Hey, does someone know how I make my voice in a world echoing? The Ambient sounds do echo with the Audio Reverb Zone and the Audio Listener, but my voice dosent.. Does anyone know how I can make this?
im trying to figure out the same thing
@obsidian vapor this what i was shown
but nothing be on tht
Im new to udon and wanted to know how to make physical interactable buttons. I tried looking for a tutorial but could not find one. Can you guys recommend one?
im makign a veicle and im havign a problem where my model is pushed up on test mode
im usign a cahracter controller there, anyone know why?
Because the collider extends below the model? Get those green lines up to the bottom of the wheels.
Then the animation is pushing it to a different origin
Try disabling root motion in the Animator component
oooh
hmm
that may be it
but... all my moviment is root motion based
i cant relly remove it
rly
Then you have to fix the animations
@obsidian vapor i asket the same think over a year ago and nobody know how it working so i test my self and i found the way forget reverb zone and take the audio reverb filter but notice that it got none aerias to do its all the world but it not metter make a entertrigger script and turn the componet on and off dont close the object why wen you close the object wen the vrchat runing in to the world it not gona work with a close object where the audio reverb filter is
atleast it worket then xD
i have like over year to use it
Haven't tried it myself, but could it be a Unity layer issue? Maybe try changing the ReverbZone to the PlayerLocal layer if you haven't already?
Um help....I did something and I can't move at all
I was trolling some people with a few avatars, simple and harmless scares, making everyone laugh, then I pulled up this debug menu...
My avatar isn't working like it should be
I'm trying to make the player move a small amount every frame, but when I load in I'm just stuck in one place and can't move. Does anyone know why?
but shouldn't they still be visibly teleporting?
Teleportation doesn't have visuals in VRChat.
so is there any way to move a player up a small amount at a consistent rate?
Yeah, change MovementPerFrame before you use it for TeleportTo
hm, I have the values edited so that in theory they should be changed and moving
at a rate of .01 per frame
Sorry, we probably weren't clear enough on this. TeleportTo teleports a player to an absolute world position.
It's not a rate of movement or anything like that.
Ahh, so I'm using the wrong function
Try SetVelocity
Yes! That worked. Thank you @wind atlas and @snow arrow
I am learning C# alongside udon and trying to replicate the kinds of things i'm supposed to do to a cube with a player (as a side exercise)
so like moving the cube, etc
how do i get my prefab back
cuz it keep saying prefab not exist when i try upload avataer
Is there a way to make someone load into the world already in a station/chair?
I'd recommend an onplayerjoin event, but I don't know if you can automatically seat a player
if so, you should easily just run a "playersit" event on the localplayer inside onplayerjoin
that way they would "instantly" sit in the chair
Dear god I hope you're using U#
Learning C# and still using node-type udon is such a waste if you could double the learning speed by using U#
Just a suggestion of course, It caught my attention
I'm using the graph because this threw me for a loop:
Ah well yes, that is a pain
especially enums... ugh hate having to work around them
But you keep it up! I know you can do it! ๐ช
I guess I'll take slower learning speed if I can get a better comprehension and avoid setbacks >w<
Setbacks are inevitable, you are using Unity.
Thank you so much โค๏ธ โค๏ธ It's actually kind of funny, I learned C# two years ago but I have memory loss problems and didn't use it so I forgot all of it ๐
I use C# daily, pretty neat language if I do say so myself
I'm enjoying it so far!
Great to hear!
Is there any way to get the vrcplayerapi object when interacting with an object? interact does not include a vrcplayerapi object
interact is local so you can assume networking.localplayer
Alright, thanks!
Is there any list to see which events are local<
?*
Im new to udon and wanted to know how to make physical interactable buttons. I tried looking for a tutorial but could not find one. Can you guys recommend one?
Sorry to ask again, but has anyone experienced this bug where MIDI notes don't release? Other users don't seem to be having this issue so I wonder if it's something entirely on my own end.
Okay I've been trying to make this script synced with other players using this tutorial, and I'm not sure where I've gone wrong
https://www.youtube.com/watch?v=O3VeBzV9HgI
So this took me longer than it should have.
Time to toggle objects again, but this time, for everyone! You'll see that syncing is a little bit more complicated than it was in SDK2, so to set everything up we have to tell every player to toggle that object, but also catch up anyone who joins in after the button was pressed!
All assets are availab...
Now depending on how I rearrange the nodes, it'll either not activate at all, or be activated by the time I get to the objects it affects
Hold on lemme enlarge it
I'm going to do my best to help you, but I must warn you udon-graph confuses me to no avail
I've added comments to make it easier
The difference between this and my old script for the event is that the Activation anim part of the script was all there was, and the Interact node was there in that part as well
I can't help you, I'm not good enough at visual programming to understand the nodes and lines
Can anyone else help?
does udon let you change materials in script or do you have to setup animations to do this?
It allows you to do this, yes
Just get the material from a gameobject, and then another material as a variable, then just assign the new material to the material of the gameobject
ok i'll try it out thanks
Anytime
Does anyone here know how Udonsynced technically works? does it automatically update and serialize or do we have to manually send out a function to sync it? (I'm using U#)
Yes, that's what I'm struggling with. The same tutorial I mentioned earlier has a part for U#
I've removed the late joiner part of the script which has helped some
It depends on your sync mode. If its on manual you have to manually request serliziation.
if you have it on continuous it does it automatically around 5 times a second
So essentially, I'd be better of using an "automatic" sync? to give some context I'm setting up a string array that keeps the names of the "active players" (players that are going to be sent into a game) so the game can register certain events to only those players. but I need the other players to also see the player's name on a "lobby screen", should I sync the array or do it in some other way?
Manual is always better, if set up your logic so it'll always call request sync after anything is updated. Just since it means you have less network traffic clogging your bandwith
Is there some function I need to call for updating the sync?
Edit: "request sync" i assume
Nope I found an article in the docs, Thanks for giving me a lead! ๐ช
Yea its "RequestSerialization"
just remember that it wont trigger a OnDeserialization for the person calling it.
That's the thing. Mine is in continuous sync mode but when I tested the machine in my world with people on both PC and Quest, nothing updated like it did in SDK2
is its good logic to have a state event that updates everything after the OnDeserialization happenes, and you call it from the OnDeserialization and manually if you're the person who called the RequestSerialization
What's your logic? (if its U# feel free to send a screenshot) if its node graph i cant do anything
i hate node graph
Here's the first one, which is less complex
The part with the networking is what needs fixing
Oh wait
How do you tag a variable as synced on graph?
tried changing materials in script, didn't work; am i doing it wrong?
You are not doing the same thing that's been done in the video. Is that on purpose?
Having issues with networking and teleporting players
In my world, when someone has the most votes, they are teleported out of the arena
I did put in the condition that the teleported player is the local player
And during local testing; this condition only worked for player 1
Player 1 can teleport themselves out of the arena if they are the most voted
The video syncs toggling an object on and off, I'm setting variables and using an animator
But if I vote out player 2, player 2 doesn't teleport for some reason
Might be the case that the material instance on the cube is different than the material asset you drag and drop into the array.
Like this. Apparently doesn't work on Animators
i think that if you're teleporting the local player, then the player that gets teleported will be dependent upon who is the owner of the object that the script is on
yes, that is the case. do you know a solution?
That's what I believed; the vote manager script is currently owned by the master
then whoever the owner is will be teleported
@high mural Cache it in code (like on Start).
The master was the only one that can be teleported, but not everyone else if they are the most voted
ouch... ok
Do I have to change ownership to the targeted player for teleportation to work?
or identify which player should be teleported
@pallid roost What I'm trying to do is tell all players to have an animator do its thing once one player clicks on that object
Are you trying to sync variables? The code for that would look very different. You are only syncing via events in your screenshots.
I'm pretty sure i;ve done something like that before
hm
The targeted player was identified through calculation of most votes based on all the vote counters for each player; do I have to change ownership of the vote managing script to the targeted player for teleportation to work?
i can't say for sure; that might work. i'd have to know more. just experiment and see if it works
I think what you are missing is this here:
The tutorial I watched didn't put anything there so I got confused
Ok, maybe I'm wrong then.
I did this, all you'd have to do is swap the bool for a float, and sync that float. every time the OnDeserialization event occurs, porvide the new float to the animator
The thing is, syncing state is easier with variable sync.
I'd recommend recreating the tutorial video first, ensure that it works and you understand it, then modify it to work for your use case.
As the other said, unfortunately I'm not that great at reading udon graph myself.
Anybody have experience following bones of an avatar. I'm trying to figure out an easy way to get my object to orient correctly when following the hand bone position and wrist rotation.
something like this
Make a transform follow the hand, then parent the object to it.
This way you don't have to think about rotations.
ahh yeah thats an easy way
but wait i want it to rotate if people rotate their arm
kind of like a wrist watch
Okay, I've changed the animator to use a float instead of bool. So, change the graph to match and sync that float with what command?
alright i got the materials to swap via script; next question. how much of a performance impact will it have to change materials on a few hundred objects at once?