#udon-general
59 messages · Page 23 of 1
Yeah. You can encode game states in a string
Doing that efficiently is a little tricky tho
yep, but definitely posible
Plus it requires that you have discrete game states
true
But that also makes syncing easier
although in base36 you could encode quite a lot of data in a very short string
just use base64
I think base 64 is simple enought
Base64. And yeah that is 6 bits per character if my maths isnt wrong
6 bits per character isnt much
or use base2048
@vale current base64 is terrible for a user to remember, as they have to remember upper and lowercase characters
plus two special characters
copy and paste in VR? how does that work? 😄
it's called use your keyboard in vr
You also have to do Ctrl+C, Ctrl+V for Video Players in VR
not really practical
not at all, yeah…
Again VRChat is not a game engine :P
You can use it to make some cool experiences, but its not there to make your VR games in 😉
but well, if all you want is to store a dozen boolean values, a 2-character base36 string would actually be enough.
yeah but having vr games you can play with friends easily is a good thing
^ this 🙂
so making games in vrchat is always a good thing
before udon most worlds were just talking/relaxing worlds
I would disagree
now we can have actual things to do
there were a lot of cool interactive worlds with SDK2 as well
all the climbing worlds were sdk2, yeah
You could have done a lot of stuff with Animators, UI Events and Standard Assets
Minus Standard assets you can still use Animators and UI Events in SDK3 to make a lot of things without even using Udon at all
(to be fair, that one climbing world, climbing carnival, is definitely missing a save game feature :P)
I even managed to make a Trigger-Toggle System with exclusively ParticleSystems and Animators (so yeah you can put it on Avatars). Admittely its pretty Janky. But it works...
welp, I can't find a good solution for my station problem
I guess my world will be vr only
Yup. Unfortunately there is often something that you just cant work around.
maybe
I can detect when you move the camera at the edge of the view angle
and rotate the station
using the mouse X input
btw I got the full list of inputs
and found out that every gamepad inputs are present in the game
like, the standard xbox gamepad inputs
also, is there a way to test a world in local with multiple clients ?
I tried the one in the sdk but it's completely broken
especially with stations
exactly
GotoFinal has a tool that lets you test locally with multiple profiles
You can try that
interesting
I'm trying to make a custom physics with stations but I need to test the safety system I made
so stations respawn when the player in it disconnect
is the tool you're talking about called GotoUdon ?
because it doesn't use actual vrchat clients
Yes
It does use actual clients
it just starts them with parameters for different profiles
oh ok it's just not presented as a main feature
Yeah its the client manager
hmm
just found out that GetBonePosition ignore finalIK
that's an... interesting way of standing in the station
hey
does someone knows why it does that ?
like
the feet stays where they were before I enter the station
When youre in a station, ik is pretty weird
is there a way to know if someone is in a station ?
sad
You can setup your own logic
WIth StationEnter/Exit
But you dont know "who" is in any particular station
well in my case I do
because when someone enter the station they become the owner of the station gameobject
Question again: "OnTriggerEnter" is not working.
graph
inspecter
log
it works on unity On play mode.
I just found out that OnStationExited is not called when the player inside the station quit the world
Well not locally no
obviously not
There is two methods for entering and exiting. One is local, one is remote.
The remote one is hidden in the debug inspector right now
PhaxeNor has a really nice graph on that on his Twitter
it would be awesome that the Station event are called for local and remote and just have the VRCPlayerApi as parameter
that would solve everything
Yeah. But that would be smart API design, and thats a rare treasure in programming :^)
XD
does anybody have an example of how the render settings set skybox node is used? I would like to swap my skybox material on an interact event
now I just need to fix this, when the player quit while in the station, the new master of the world take control of the station without being in it
@vale current Welcome to the world of Networking. Have fun.
@fiery yoke I had seen on a forum or something you mentioned changing skybox mats with that node- do you have an example?
wat. No. You cant "unary negation" a material. You need a variable for a material. And then you get that variable and put it into the node.
help, even OnOwnershipTransferred is not called when the player quits and the new master takes ownership
OnOwnershipTransfered is a Network event. And its only called for the previous Owner of a GameObject.
Because that previous owner left. It doesnt get "called". "OnOwnershipTransferred" is pretty ambiguous
guess I'm gonna make my own check for owner change
yep, it works
I can detect when the player leave
@vale current @fiery yoke stations do in fact have VRCPlayerApi parameter now, however, it returns null at the moment. 😅
what XD
gg wp
but how do you get it, I didn't found it anywhere
Don’t think it was supposed to be added this update, as there is no changelog for it
The new graph has it (beta)
Hopefully. Next update for Udon is supposed to include a lot of goodies
ooh
Soon™️
Hehe, they are currently working on the video player. So that will take some time and testing
ok I got everything working, from the station controls to the player disconnect safety
@vale current @fiery yoke I take it back, tested a bit more (after the recent open beta update) and now the Stations returns VRCPlayerApi info.
hmm. Having an issue with my skybox material changing.
The button does change the skybox material, but instead of changing it to the material specified, it just turns blue, like a flat blue
@flint urchin Thats pretty cool. Thanks 👍
Also I synced the vars and now it will turn from the day to night, but not vice versa
@sharp basin it looks like it just silently fails to do anything after the first time
you dont get a debug message?
this.
it looks like he doesnt like collider equals
Is it possible to update a textmeshpro component's text? I don't see it as a variable
nevermind, it's not supported
i am searching for a way to trigger a function in another node graph and send values over
@sharp basin tested some more, and it does work. What's the settings on your material (shader specifically)
Its a skybox/cubemap shader @flint urchin
do you want to see the settings on the shader?
Nah, it's fine. You can see mine as it's tested and works:
ok lemme see one min
so double check the udon graph
building currently
@flint urchin could you send ur udon graph real quick? a screenshot
@sharp basin
hm ok let me change somehting around I mightve had something goofed
weird. Once it sets night active it wont let me deactivate it
as in, the skybox stays night
isNight var is synced, yes?
and default value is false?
It's not synced in this one, and default is On
do you start in daytime then go to night?
In the test yeah
ok, ig let me try flipping those two settings. dont know why
It's a Udon thing I guess
riiiggghtt
this is so scuffed, I have the exact same graph and settings and it doesnt work. Its like a one way toggle. Ill send another screeny
if your assembly doesn't match your graph, you can select-all, cut and paste to kick-start the compiler. It sometimes keeps a cached version of nodes and doesn't actually compile what's on the graph anymore (fixed in next release)
oh just saw your message now Momo, got it. will try ❤️
this is like almost the SAME issue I had with my brrken teacups before. Once a var was chanegd it would not change back
it wouldent have to do with multiple udonbehaviours being on the same button would it? unrelated functions
even after doing what momo suggested, making a fresh udon graph and psting, double checking, its all fucked still lol.
hi guys, im working in this udon file, its to toggle rooms on teleport, this means, when the onTriggerEnter is activated the "currentRoom" will disapear and the "targetRoom" will be loaded so i wont have all the rooms enabled. This first part works pretty good, both rooms do toggle but the player its not beign teleported. Any idea to fix this?
"target position" is a game object?
@sharp basin i ran into a problem today myself having two 'enable' lines (the white line for lack of better term) going into one node. It was even a debug node at that. I recommend making two debug nodes for each line.
staight up ended making 2 seperate buttons for day and night, which required like 6 different udon scripts but it works
so just said fck the old one for now until I fix it
but the whole process of converting to be able to do day/night balooned world size (prob lightmaps) so gotta fix that
"target position" is a game object?
@zealous mason its a transform
OnTriggerEnter is not working. please help anyone?
Did you set the collider to "Trigger"?
Else you'll have to use "OnColliderEnter" IIRC
Of course. with rigidbody
Then it's likely a bug. Did disabling "Is Trigger" and using "On Collision Enter" work?
I imagine this working just fine, but I didn't play with these kinds of events yet
Can't use OnEnterTrigger? I want to use OnEnterTriger.
p.s. Maybe your graph is not working. collision is not collider.
Does the object with the OnTriggerEnter event have a rigidbody on it? I recall having some weird issue where it would would crash my script most of the time, even though it worked fine in Unity
It have Rigidbody.
You get the idea from the graph 😛
@dusk zealot If the player enters the trigger it will return null as all player objects are protected. Checking null for Collider.Equals will then crash the Behaviour. Use a branch with "ReferenceEquals -> null" before checking the collider.
hi all
I'm little curious about UDON potential
and I'd like to ask couple of questions:
1 are we in UDON will be able to make autonomous AI's NPC idle and behavior's
just like in fallout 3 GECK ?
2 is it possible to make wind particle or some sort of force
to move avatar's body or hair on it moving?
3 is it possible to make new animation for swimming just like in some modern games
when you jump in water and your avatar transform in diving or squbadiving animation ?
4 is it possible when you make your avatar dancing
to move his viewpoint vision as well to make it more realistic ?
5 is it possible in UDON to implement music,video and stream player ?
thanks in advance 🤔
- Yes
- Udon does not currently work on Avatars.
- See 2.
- See 3.
- Soon.
@floral dove
ok thanks
im not much of a modeler so im trying to use assets from unity store - is there a limitation of which models i can use or will that be handled by the sdk somehow?
do the mathf trig functions use degrees or radians?
One swift look into the C# documentation
Is there a way to get the local position of the player headset ?
relative to the room center
Ohh well together as a question. No.
hmm
And yes that is a problem.
yeah, I'm trying to get the player headset movement only
so I can apply that as movement to my custom controller
btw I tested teleportation without lerping and it doesn't use as much network as normal teleportation
but it stills use more than SetVelocity
is there a way to tell if an object with a pickup component is currently being held by a player
i see the vrc pickup get isheld but i cant find anything like a vrcpickup type to actually get the pickup component for that
you can use OnPickup and OnDrop (those aren't the exact names probably but eh)
i need a boolean for whether its being currently held
toggle a boolean when those functions are called then
i guess i could do that
id have to create a separate script with what im doing though
and theres a thing to get the is held boolean i just cant find a way to actually retrieve the actual component
because i cant find a type for vrc pickup
actually maybe i can set a public variable and put the pickup as a literal
There is a field for that
what
So. The type is VRC_Pickup
And there is a field for whether its currently held and by which player
Intellisense helps you out a lot if you use VS (with U#)
theres SDK3ComponentsVRCPickup but i cant put a type for it in the graph
Another reason to not use the graph lol :^)
haha agreed
But it should still be possible in the graph
But for obvious reasons Im neither sure nor do I know how
its absolutely possible in the graph
but yeah who knows how lol
why not just use OnPickup and OnDrop?
What happens if you drag a VRC Pickup to the graph?
will setting the lerpOnRemote to false on VRCPlayerAPI.TeleportTo help with the whole failing to teleport thing?
Is it possible to code udon with written commands, not a node graph? I prefer writing the script to connecting the nodes graphically.
thank you
can an array be synced or does that still not work
Quick optimization question; If I assign the same audio clip to multiple Udon scripts (as in set this clip to an audio source -> play audio source), is it storing a separate instance of that clip for each script, or is it storing a single version of the clip that's called by each script?
hello , just wanted to ask quickly if this is better to start making vrc game with the basic code of unity or to try udon ?
i am totally new on making maps , i have 0 knowledge and i probably couldn't difference those 2 things
your only option is to use udon (or u#)
oh so udon is more simple ?
no you literally cant use sdk2 to create a new world anymore
not true - you can still use SDK2, though we recommend learning Udon + SDK3.
@wanton cliff - you cannot sync arrays yet, but we're working on that right now, should be in a release soon.
Hey guys, new to VR chat.
I wanted to ask if I can write my own C# scripts
And if there's a list of scripts for Udon (with the SDK 3)
Thanks!
@neon badger - welcome! Yes, there is a community solution called 'UdonSharp' that will let you write in a limited C# subset that's compatible with Udon. It's linked in this channel about 10 comments above.
I have trouble finding the "Set variable" node in the new udons. just got tired from copying it from old programs 😄 Where can i find it?
Was either shift or ctrl
@vagrant coral - drag and drop a variable to the graph while holding control. Check this video for quick tips on how to do things in the new graph: https://www.youtube.com/watch?v=IVjEx_H5BZc
VRChat Client Engineer MomoTheMonster walks us through all the brand new stuff in the latest Udon Node Graph!
As of 26 June 2020, this Preview version of the Node Graph is available on our Discord! Join us with the link below and check out our latest Announcements for the lin...
It says that you need to hold control somewhere...right?
does anyone know if Topaz player 2.0 is compatible with udon? know video players in general broke w/ udon but i can dream right? lol
https://booth.pm/ja/items/1752066
専用サーバーを通して、ライブ配信を超低遅延(1秒程度)でVRChatから視聴するためのプレイヤーです。 OBS等の動画配信ソフトを使用して、2000kbpsまでの動画を無料で配信することができます。 音声のみの配信であれば、TopazChat 2.0 Streamerを使ってカンタン操作で配信できます。 https://tyounanmoti.booth.pm/items/1756789 個人利用向けです。法人での利用はTwitterのDM等でご相談ください。 以下のような用途を想定しています。 - 音楽演奏を高音質かつ低遅延でワールド内の人たちに...
a block node in udon basically just lets you run multiple things at once yes?
oh ok
that works for me!
trying to use "render settings set custom reflection" node, but cant seem to hook up material variable to the value on the node?
@steel nova - Video Players are not broken in Udon, they are removed - no external assets will change that. The good news is that we're making good progress on adding them back in with more features than before.
gotcha gotcha, just was curious if some 3rd party stuff may had gotten through.
hm - @sharp basin - that node wants a Cubemap, which looks like it's not implemented. If you file a Canny for it, we'll add it to the backlog and update you when it's available.
will do!
@steel nova - if it had, we'd remove that as it would be a major security risk if someone figured out how to connect you to random servers without going through VRChat.
yeah, i heard about that
momo, would you want it under udon live alpha feedback?
That was going to be my workaround to the reflections not changing when skybox material changes. looks like a reflection probe it is 😦
yes, that's a good place for it, nosferatu.
https://twitter.com/Shiduki_Saku/status/1287402301724880897
How can i change world's gravity?
@light kettle you'll want to change the Gravity Strength for the VRCPlayerApi, like this:
Very similar to how you set Run + Walk Speeds like in the ExampleScene and on the VRCWorld Prefab
@floral dove if i change that, can i walk the wall like floor?
ah, now I understand what you want to do. No, this will just change the effect that vertical gravity has on a Player.
反重力衛星ワールドの進捗。
星にして小さい気がしたので衛星という位置づけに変更 ついでに12個の連星に。ここ数週間、マテリアル調整や小物作成や諸々やってきたおかげである程度形になってきた。あとは軽量化とバグ修正。#VRChat https://t.co/E2GHy6qwB4
253
791
I wonder how can i make this world
Hm - you could change gravity in different zones like this:
#udon-general how does Lolathon make is avatars go invisible and make them scare people pls help me
@fierce turtle Udon does not work on Avatars, sorry.
Ok
how do i import my world on unity version 2020
VRChat don't use Unity 2020
so best use 2018?
Something seems to have gone wrong with my project, Its a fresh one. Tried reimporting the SDK. still i get all these errors. the would runs into VRChat but nothing works in it (sounds & particle collisions) Any Ideas?
not what i can see no
and true 😄 i just started poking around for a reason and they scared me
It's quite normal to have that amount of warnings in your console no need to be scared
still confused as why all runs as it should in unity but in vrc nothing happens
like... "sound play on awake" wont event work
🤦♂️ Spatial audio source script was the culprit. I think I need sleep 😄
@floral dove thank u!
alright, i cant figure this out in the new editor. trying to make a toggle button, and i came across this link here. https://www.youtube.com/watch?v=GWv3zloRWY4 and there is supposed to be an input from what i see in his editor in the "gameobject" node, but i don't get that on mine. theres got to be something im missing. xD
This is a short tutorial on getting a simple button toggle working using Udon, the new VRChat scripting system. As an example, we're using it to toggle a mirror on and off. I've also included a segment on doing the same thing in UdonSharp, the C# compiler by Merlin allowing fo...
@ancient spindle take a look at the VRChat Examples folder for an UdonExampleScene with working Button Toggles you can play with.
iv peeked in that folder, but it doesn't exactly show me how to create inputs for my nodes. the old graph had them already, but im unable to connect any variables because of the lack of knowledge in that area. :c
You GET existing variables and SET them with new information.
You'll also need to click on those variables and make them Public so you can drag the related objects from your world onto the graph values in the component.
@ancient spindle go through the Readme and follow along in the scenes.
anyone know the keyboard shorcut for this
Hey, I've seen some cool FFT demos with audio done with Udon, was wondering if you can do the same with mic input at all? Or is that just for avatars to control their mouths?
@radiant stratus There's a list of probuilder shortcuts here 🙂 https://docs.unity3d.com/Packages/com.unity.probuilder@4.2/manual/edit-mode-toolbar.html
thanks
any time!
how do i pull up a list of udon commands in visuall studio?
I don't think you can. There is autocomplete as usual though, so you can see any properties/methods available on a given object
nice
That only list what U# has available for you
Ah yeah, you're just looking at that specific class 🙂 Autocomplete is probably the best bet. Missing those Udon docs tbh
yeah documentation is rough righ tnow
Udon just uses the normal unity stuff so that's the documentation you just have to make sure it's in udon
How would I go about making pens work with Udon? I've only started learning recently and I'm only able to make things toggleable :/
How can I upload my avatar without using Unity
Don't think you can
will you ever fix the udon issue. where there is always 1 world master who gets screwed over by the voice whenever someone new joins?
buffering sound and more lagg than the others
@mild tiger this room is for questions about building things with Udon - the Canny is a better place for bug reports.
its not a bug repport
its a issue with how udon is build, world master option was intended
im asking if they are going to change it
its a question litterally for this chat and only for this sdk option
We're tracking this issue internally, it's not specific to Udon as far as we can tell. Master does not work any differently in Udon vs SDK2.
Hello everyone! ^__^ I'm extremely new to VR Chat (only a few weeks) but it's quickly consuming my life lol and I'm already working on creating my first world. I have a question hopefully someone could help me with. I want to create a very simple teleportation elevator that goes from one floor up to the next level. Sort of a "Beam me up Scotty" type thing, that when you step into the rings of light, you automatically float up. If anyone could point me in the right direction of how to make that mechanic happen with Udon, I would SO appreciate it! I ❤️ ❤️ -ScreamingColor
Hey guys, I'm creating my first world and was wondering if I needed to clean up all of the unnecessary extra assets that I downloaded that I dont use in the project, in order to optimize; or, does it only use what is active? Thanks!
Only stuff used in the scene itself get's uploaded (also not really a Udon question)
How would one get a list of all the player's VRCPlayerAPI in an instance? I found a method to do this before but didn't save the code.
@edgy moss sounds like you would want to set the player gravity to negative
@neon badger i believe it only uses active stuff
@chilly aspen you can get a list of players, but currently list<T> isn't available in udon
so you can't do anything with it
there are other ways of doing it, but they get veeery complex
at least for what i can think of
Use an Array of type VRCPlayerApi with a fixed size, OnPlayerJoined find the first element that is null, set element to the player that joined. Its not complex :P
Since there is maximum of players per instance
that will only work for the first player that joins
No?
afaik onplayerjoined is only called when a new player joins right?
if not and it gets called when joining initially as well for each player, well uuh, that is great news and i need to do something with it
(any help would be cool, if you just tell me im doing something dumb ill go figure it out myself)
another one that doesnt understand OnPlayerJoined...they should really put up some documentation or whatever.
If you join an instance with players, then from your view all the players join you. So you will get an OnPlayerJoined event for all players that are already in the instance youre joining
yeah okay
in that case do what thehelpfullhelper said
yes, there is no documentation and it sucks lol
Let's say I was populating the list using OnPlayerJoined but the list, at some point, got bad data and I needed to reconstruct the list from scratch. Is there a way to do this?
Well there is sort of
no lists lol rip
Also I dont know how it would ever get "bad data"
The example this occurs in is where two players leave on the same update frame, and OnPlayerLeft only removes one player from the VRCPlayerAPI list.
No
that never happens
you wouldnt remove it
it gets called for every player that leaves individually
- You dont need to manually set the elements to null 2. Even if you had to it wouldnt be a problem
Ah okay
that is actually quite smart lol
Well. Would be smarter to just have an API Method to give us an array of all players in the instance. But that would be good design, and we've talked about that :^)
there is a method just for that
but it returns a list lol
if were talking about bad design haha
i'm sure we'll eventually get lists tho..
right..
right... 🙏
Generics are complicated
Generics and LINQ is quite tricky to handle. Might take a while
Not at all.
i really hope we get them
its not basic to implement no
but in a programming language
Can I not use an udon script to disable another udon component?
No. The enabled field of an UdonBehaviour is not exposed.
you can disable the gameobject its attached to tho
if all else fails you can put the udonbehaviour on an empty child
and refer to its parent when doing transform shit for example
I’m trying to destroy an object under certain circumstances but disable that script when needed
@chilly aspen @fiery yoke - the next release will have a GetAllPlayers method. You pass in an array of whatever maxSize you want and you get back that same array filled in with all the players in the instance.
And if the array isnt big enough it just crashes?
it'd just throw an arrayindexoutofrange exception
or thats what i'd expect right, thats the correct way to do it imo
Dont understand why you cant just make an array and set the reference of the passed in array to that new array. Or even better have an alloc and a nonalloc version
it will only copy as many players as you have room for in your array
Determined by what?
why would it do that?
Like order
then if your array isn't big enough you're gonna have a hard time figuring it out
You make your world, so you can allocate an array big enough to hold all the players in the world.
Hmm guess that makes sense
throwing an exception if its not big enough seems like a better way imo
you can still do it then
but at least you won't run into weird issues like players missing or something and a lack of testing causing that
If get an API method for the max player size of the world then that would be 👌
Generally more World API would be neat
yes
but guess that is somewhat down the list
well, that would be good design, and it sounds like we don't do that, so...
However there is a difference between not having a feature, and implementing a badly designed feature :^)
hey i'll take this over nothing lol
I think that was sarcasm Bocu. Just a guess
heh i don't even know
Yeah, just a little sarcasm. Like, I'm here neck-deep in the code trying to improve the system and hanging out in Discord to help answer questions, so reading that kind of things is hurtful.
I think it builds and propagates a culture of disrespect.
I can see why
If it helps, i gotta say, Udon really is pretty damn amazing for a system used for user generated content
And i love it for what you can do with it
I'm under no illusions that it needs a lot of work, and we're putting the work in. Just remember we're people on the other side here, pouring ourselves into this work because we want to make an amazing platform.
Its amazing compared to anything in well any other game really, and the fact that i'm as familiar as i am with unity just makes that even better
Just because Im complaining all the time, doesnt mean that I am not appreciating it a lot. I just want to state that I feel as if many things can be improved upon and most of that "rage" comes from the fact that many things could be much easier on all of the developers if fundamentals like APIs would be much more thought out.
Not even Unity manages to make a perfect API. No one expects that. (That goes for outside-facing as well as backend api)
But speaking for myself, motivation for change comes from seeing a problem and trying to improve upon it.
Im also well aware that Udon and the API isnt the only "problem" when it comes to VRChat. There is a hundred things the team needs to handle and take care of.
Im not saying that the team is incompetent. Just that a few things could be better and that its kind of annoying to always have to work around seemingly nonsensical limitations. Thats all there is to it. 😅
imo you're being a bit harsh still lol
you're right i guess, yeah but i'm sure they're all well aware of vrchats uuh "quirks" lets call them that
Well I guess its all relative. Im used to a harsh tone, because Im harsh to myself all the time. So uhh...Ill try to be less "dramatic" in the future 🙂
You should be nicer to yourself, too 😄
^^ this haha
But why can’t I just disable an udon component?
Is that intentional? A feature in the works?
my udon is throwing an exception but the console doesnt state why, is there a way i can view the exact exception?
Script or graph?
graph
Its all good, thanks though
@zealous mason ooooh that makes a lot of sense actually. make it so that only when the player is standing on that exact spot, their gravity becomes zero. thank you!
totes 🙂
@chilly aspen To create a list of players, here's the code that I came up with to add each to a list and then use a for loop to go through each one
The for loop...
and when a player leaves... may God have mercy on your soul
@zealous mason Wow thanks!
yw 🙂
Have you actually assigned Closed to the animation transitions?
Hi! @zealous mason I would like to make only two people can interact with things and reset the number when they leave the world. Do you have any idea how to do it?
@hushed gazelle Yup
Where can I sync objects across all players? Seems like I have to utilize 'Udon Synced Variables' this thing but don't know what to do ! Thanks for your help
@old kestrel leave the world as in the whole instance is gone? Or leave a world with other people still in it?
@old kestrel for your second question, should be built into the sdk some good examples specifically for syncing, that's how i learned
@zealous mason leave a world with other people still in it. I want to make a function like when a user turn on the light, the light turns on. And when that user leave the world, simply turn the light back off.
@old kestrel oh ok, so it's a synced deal. I'd have to look that up, haven't done syncing for a while
How do I make udon buttons? To toggle things on/off? I tried finding some but things have changed since those tutorials have come out, like ui locations and the name of some stuff
I also really like those new fancy ones where vr users can literally push the button in to toggle things on/off and wondering where I can get/find those
https://www.youtube.com/watch?v=GWv3zloRWY4
I was watching this tutorial but like, the names and locations for everything is totally different
This is a short tutorial on getting a simple button toggle working using Udon, the new VRChat scripting system. As an example, we're using it to toggle a mirror on and off. I've also included a segment on doing the same thing in UdonSharp, the C# compiler by Merlin allowing fo...
In the Udon sync examples, there is also a UI with it that you could check out. For the fancy button pushes, i believe those are custom, likely a player's hand position in reference to the button's position type thing.
I have never made a world before, i'm merly making a small avatar world for my avatar models, but like little fancy stuff like those buttons. Wonder where I could get those
If you watch a little bit of that video, you'll see what I mean about, him searching things, but if you search them in the current sdk release, you wont find them
Oh, perhaps you're referring to the game object reference?
With the new Udon you can drag and drop a game object (like a mirror) directly into the udon area. Check it out in this update video. https://youtu.be/IVjEx_H5BZc
VRChat Client Engineer MomoTheMonster walks us through all the brand new stuff in the latest Udon Node Graph!
As of 26 June 2020, this Preview version of the Node Graph is available on our Discord! Join us with the link below and check out our latest Announcements for the lin...
It can then be used as a variable
To be toggled
i was trying to find the Op Unary Negation boolan but it was a struggle to find, I think I have the right one
Good stuff. If i were to take a guess where that is, it'd be under System > boolean
Does this seem right?
try this out my guy
Hey guys, is it possible to update my world, or can I only reupload my entire world over and over again?
@neon badger
when a world is updated, it is reuploaded completely
unless i'm not understanding
Ahh, no that helps; Thank you !
np
Hey, anyone having trouble logging in on Unity?
hey @edgy moss did you ever figure out the player float thing in your graph? im actually kind of interested in the same thing, but for the life of me i can't figure out what nodes to conjoin to make it happen. lol
@neon badger i logged in just fine.
Ahh I see, thank you
try this out my guy
@zealous mason That makes the button go poof
@scarlet lake lol yes it will if there's no object assigned to the game object, I've done that multiple times 🙂
in the udon component, drag and drop the item you want to enable and disable
so like, in your scene, drag the guy from there, to that public variable spot
forgot to mention, the game object in the udon needs to be marked as public for it to show up on the component
I'll try that once my unity finishes decimating 1.4 million poly off of my couch xD
Is there any way to update text without texh mesh pro??
@old kestrel like a UI text object?
@zealous mason yep
@scarlet lake should just be able to grab that drop down and pull it into the udon to become an object
got a reference for ya social, one sec
@old kestrel alright so first you'll need a canvas (UI > Canvas) then add a text
add an udon behavior to it
(this is older udon btw, i didn't update this world)
and then in that udon, put something like this to change the text
I was using the string as a public variable so other udon behaviors could send text to it to be displayed kind of like an in-game debug wall. I think just using the debug-log would be easier though
This is so stupid just for a toggle button 
You can just drag and drop the UIText field to create a variable for it instead of doing GetComponent of Type
That's a little more performant, as well
I finally got the stupid button to work, found a pre-made toggle udon script and edited. The original didn't work (replaced the object it wants to toggle obviously) but changing the custom event with interact, and connecting the object to set active.
I’ve seen a few worlds override the desktop window’s camera with a camera in the world. Does anyone know how that is done?
@zealous mason @floral dove Thank you its working! I am trying to show a random stored string every x seconds. Is there a way to pull a random string from the string array?
Yeah, get the total length and do a random range
Then use that value to get the string at that index
This is what I have rn but the text is changing every sec. Is there a way to update every x sec or min?
@old kestrel take a look at the Timer example in the UdonExampleScene to see how to fire an event every X seconds
@floral dove perfect! its working 🙂
How do I change the Interact words, instead of it saying "Use" It will say "Toggle (Insert text)"
@scarlet lake I was wondering about that too. It seems like you can change the interact words when using U# script (Udon Behavior => Interact => interact text). But I also can't find a way to change it
Looks like we need to expose that. See if you can edit in in Debug mode in the inspector by clicking on the three dots in the upper-right and switching temporarily from 'Normal' to 'Debug'
i was wondering how i can add custom emotes and dances? like ive seen people do non default dances and was wondering how to do those
You can absolutely edit it with the Debug menu, I've done that in several interactive objects. @floral dove please expose the interactive distance as well as the use text.
Enable Debug mode and change the "Interact Text" value.
TL;DR How do I make a player levitate upward when they enter into a vertical shaft?
Okay so first off, forgive my ignorance. I've been using Unity for like a week and I know NOTHING about coding, but I'm determined to make this happen. I want to create a levitation portal, like an elevator that goes up to the next floor. @zealous mason suggested I go about it by effecting the player's gravity. I ran with that and I like to try to problem solve on my own, but 24 hours later I still haven't figured it out via google so I'm asking for the next step. This is what I have cobbled together so far, and i know I must be close. I created a cylinder, gave it a rigid body and a mesh collider, which I set to convex and made it a trigger. Then I gave that cylinder Udon Properties and set up the nodes like so. What am I missing? Btw I have no idea what the numerical gravity values should be, I just typed those in as a test, but nothing happens. Thanks ahead of time!
P.S @ancient spindle I didn't see your question til just now! (I'm also new to Discord) Hoping we can figure this out together!
I need to change my appearence every day
I have 3d models of chothes
How can i equip them to my base model and change them
Please help me
If possible dm me
@here
@quiet forge try out the avatars channel, under the development category for that question
@edgy moss likely whats missing is getting the player collision working, since 'on trigger enter' needs to be setup for that. In the forums there's a nice post about player collisions and how to do them. Another option is using the player position to check if it's within a 'bound' box and if they are, affect them.
actually here you go, this is a conveyor I made to move a player, perhaps you could turn off the collision for the cylinder and if if the player is within your cylinder, add vetical velocity to them. This again, is old udon, but the idea should still work.
how to object syncs work? does everything go through the master like it would player positions? and are objects that aren't moving still synced and taking up messages? and if an object is moving, how fast is it updated and how many messages/second does it take up?
Can you port 3D models from mobile to vrchat oculus quest
Try the #3d-modeling channel for that one
@zealous mason so if i have some clothes fbx or obj
I cant change them now
@zealous mason thanks so much for your help, and your patience with me jumping into something that is clearly over my head for such a NOOB. I was able to replicate your node system perfectly, until the very end... and I cannot for the life of me figure out how to place the last two. I see about 30 different options for types of Vector3, but not one simply titled "Vector3" with a place for me to name the PlayerSpeed. I also can't figure out how to place the node simply titled "Get Variable." I've tried every combo I can muster. Is that perhaps because, like you said, that's the old system? Is it called something different now? Thank you so much. I hate to be a nuisance but I've made it this far 😅
Hey, I noticed that the Laser Nights hub has avatar props. How would I go about making something similar with udon? Is it supported? 🙂
@edgy moss my pleasure man. Looks like i need to update my udon test world to the latest. Get variable has been replaced so it's easier, just drag and drop the variable you need from the variable list. Also the vector3 in my example is the variable.
@quiet forge avatars clothes aren't simply changed, they need to be apart of the avatar and 'weighted' and can be turned on and off by animations. But really though, try out the #avatars-2-general or #avatar-rigging channels for your questions on that.
@clever trout props as in pick-up items? Or things that stuck to the avatar?
@zealous mason They stick to your avatar once you pick them up, there's some comedy glasses next to the mirror you can use.
Oh, ok, yeah, I've made a thing that's stuck to avatars using udon, it's possible. I did it on the update event, move it's position to the avatars certain bone position.
ah that makes sense! Thanks man 🙂
Np
@zealous mason thanks
Np, good luck!
can anyone explain what the exact grip option does on the vrc pickup component?
How can you set a variables value, so say on interact set a value to 1 so it can be used later in an update section
I created a gameobject, put a mesh collider on it (so a button can toggle the collider off) but udon graph keeps saying "Object reference not set to an instance of an object) how do I fix that?
Hi. Using udonsharp, is there a way to access the the screen.width and screen.height and set a render texture resolution using that? I've seen it done in places like the portal world, but the only info I can find on it doesn't work in udon
As a beginner to world creation should I be using SDK 3 or SDK2?
SDK3 for world building, SDK2 for avatars
Thank you
@warm cave to set a variable's value to 1 on interact, you create an Interact event node and a Set Variable node with the variable selected in it. Then plug the flow of Interact to Set Variable.
Fixed my issue regarding object errors being thrown. ❤️
i found what my issue was with set variable not working before, thanks though @restive dust ^-^
@floral doveSorry to ping you, but can you please add a small pin regarding changing what an interaction text says?
Enable Debug in the Inspection Tab, it can be found beside the tiny lock icon, via the 3 lines, it's in Udon Behavior (Script) as Interact Text
That would be super sweet ❤️ and help a lot of people
Sure!
To change the Interaction Text on an UdonBehaviour:
Switch your Inspector to Debug mode by clicking on the 3 lines in the upper-right of the inspector. Then you can set the "Interact Text" and switch back to Normal mode. We'll fix this in an upcoming release.
Thank you so much ❤️ You're the best!
Is it possible to locally change the orientation of gravity with udon?
Yesn't. Depends on what effect you want to achieve
Ahh yeah. No.
damn
You would have to rotate the entire Player Controller and thats not really possible. You can use some hacky tricks to achieve an effect like that
but there is no easy straight forward solution to that
At least as far as Im aware
Does vrchat use the Physics.gravity vector3?
Sort of. That plus the character controller does something weird with gravity. Not sure yet
If I were to experiment with this, would I just attach an udon behavior component in an empty object somewhere in the world?
Yes.
Yep - you can change the Physics.Gravity, as well as the strength that gravity has on the Player
but as TheHelpfulHelper says - VRChat doesn't work well with changing the orientation of the player. I tried to build the same thing last weekend and didn't get too far because of that.
CyanLaser made that concept a while ago
From what I remember he had different versions of the same room for all orientations. He then used stations that are desynchronized and locally moved to the place where the other players would appear, relative to you.
Its pretty janky and complex
pretty inventive workarounds
Yeah,. Imagine what we did back in SDK2
When all we had were Animation Events, UI Events and misused Standard Assets scripts (Plus FinalIK for those who had it)
momo, what are some of the main challengers still remaining in getting a video player back into sdk3?
aww I can't have a video player in sdk3?
Not right now. But soon
Is there a way to grab the player camera resolution and apply it to a render texture? I'm making some portals and I've seen it done but my method doesn't work in udon
portals are a mess
Well, I should say its going ok. If I preset the render texture to just be 1920 by 1080 its okish on desktop, no idea if it works in vr
Does anybody know how to sync objects?
@old kestrel Perhaps this can help https://ask.vrchat.com/t/how-to-sync-with-udon/449
@old kestrel if you're just looking to sync their positions, just add an UdonBehaviour (with the provided 'empty' program if all you need is sync), and check the 'Synchronize Position' box
How do I reference the player in vrchat / what do I change here to make this work in udon?
FYI @unreal helm - reacting to the Player Collider is currently difficult because of how we've protected the object. We've got some fixes in the pipe that expose proper events for this. Looking at this code, I would guess that the author is using some sort of proxy Transform to follow the player around and testing against that. Are you asking how to recreate this in the graph?
I'm actually doing this in udon sharp, but if its easier to do in graph then sure
I've not used the graph yet
@floral dove thanks for your input. I would like to make an object's Set Active = false and other people also see that object Set Active = false. Do I still need to use the event OnDeserialization to do this?
Ok, just trying to understand the angle you're coming from here. "What do I change to make this work" is hard to answer when I have no idea if this is part of a working script someone else made
It's a script from a regular unity tutorial that I just typed in unity sharp
@old kestrel - yes, if you make a bool variable and mark it as Synced, then you can have the owner change that variable, then check it On Deserialization for everyone else and update the Active state of the Gameobject to match. Check out the Sync examples in the VRChat Examples folder that comes with Udon for some demos of Synced Variables.
@floral dove Thanks I will try!
@unreal helm - if you're just getting started with Udon, I'd recommend going through the VRChat Examples folder and associated readme to get your feet wet with how things work.
oki doki
https://ask.vrchat.com/t/how-to-send-data-over-the-network-using-synced-variables/2264 This will help when syncing variables
ok, so this actually looks a lot simpler with udon than regular unity...
Did yall change the name of some of these nodes since April? I can't find "Get Variable" in search
check out this video on how that works now: https://youtu.be/IVjEx_H5BZc
VRChat Client Engineer MomoTheMonster walks us through all the brand new stuff in the latest Udon Node Graph!
As of 26 June 2020, this Preview version of the Node Graph is available on our Discord! Join us with the link below and check out our latest Announcements for the lin...
Thank you so much
yw
@floral dove when syncing a variable, you mentioned " then you can have the owner change that variable, then check it On Deserialization for everyone else". My question is how do I make the owner change the bool variable? and could you explain how to check it on deseralizationfor everyone? thanks
how do I make a trigger that plays an audio clip from an audio source when clicked?
I'm having issues :(
@ionic crest try this out, I use it for starting/stopping world music. Drag and drop that audio source component into the udon then make the other components and link em together
also note the 'spatial blend' on the audio, thats important that its set to 3d.
also note, this is an udon graph on the 'cube 9' so the cube 9 holds the audio source and the udon behavior
Thank you so much
@zealous mason THANK YOU! 😍 to be honest, I still never figured out those last two nodes, but apparently it works anyway! I so appreciate all your help
@zealous mason Sorry, where do I find the "Set Playing" node in the editor? I can't seem to find it.
How do i add jumping and sprinting in worlds in udon?
There's a preset udon behavior thing for it when you add the vrchat world prefab
Thank you!
How do I get this object into the udon behavior send custom event? I'm trying to get something to activate when you walk through a spot
how do I make a teleport button?
so I click a cube and it brings me somewhere else I mean
Im doing the same thing right now, except its done when you pass through a space. How much do you have so far?
@scarlet lake
all I have is a small cube
Idk anything about udon
I just wanna make a racing game
All I know is that you need a "Interact" node, feeding into a "Udon Behavior Send Custom Event" node, for the button. In the place you want to teleport to, place an empty object with the actual teleportation script on it. I have the script in udon sharp, not nodes though.
I don't know how to make the rest of the button and that's where I'm stuck
I found this tutorial but its outdated and some things have changed https://www.youtube.com/watch?v=vPPpFokmS-Y&t=47s
Here I've done a tutorial on creating a simple teleportation system for VRChat using both Udon and UdonSharp. This video was recorded and edited in a different manner, so if you have any thoughts, recommendations, or requests, I'm game to listen! Hope you can find this useful!...
im watching that vid rn lol
Ah yes, I'm sure the udon sharp script works fine, but the way you make buttons has changed
Very. At least I can make this sick portal now though. When it finally works IF IT EVER WORKS
Rip tiggers: idk lol-2020
If you figure this out please tell me cause I've been at a stand still for hours
press space and then type it into the search bar. I got stuck here too lol
You can check out this video for tips on how to use the graph: https://youtu.be/IVjEx_H5BZc
VRChat Client Engineer MomoTheMonster walks us through all the brand new stuff in the latest Udon Node Graph!
As of 26 June 2020, this Preview version of the Node Graph is available on our Discord! Join us with the link below and check out our latest Announcements for the lin...
thanks
Lots of good info in the VRChat Examples folder and Readme, too.
thx
when I press space and look for varibles like set gameobject active I cant find any
Space > Gameobject > Enter > Set
Ill look
im sorry im new to udon
my first ever time using it
Space > Gameobject > Enter > Set
@floral dove Im so dumb thank you
No worries, it takes some time to get used to how it works. We're not done with documentation so there's lots of figuring things out and asking for help 😋
@floral dove This is my graph setting the object to SetActive = false. But I am confused on how to use OnDeserialization. Is this what I am supposed to do in order to sync the object for every players?
So, I wanna have a button toggle a Flat Plane off and a mirror on, how would I do that?
Thought something like this would work xD hopeful thinking
hi, what is U# ? how does it compiles?
I understand that unode is the only way to get logic into VRChat, so what is that U# ?
@ionic crest playing is that boolean variable, drag and drop from the variable list =)
hi, what is U# ? how does it compiles?
@formal sigil The complexity of answering this went from 0 to 100 real quick.
@formal sigil Udon sharp is a third party compiler. So the code works more like c and not graphical nodes
@scarlet lake that should work, just need to drag a line from the output arrow of the first 'game object set active' to the input arrow of the second one
Hey question guys does anyone know in here how to make prop grabbable
@zealous mason thank you very much,
-> I can write code in Udon sharp instead of using graphical nodes: yes
-> I can write complex logic for games and presentations: yes
yeah, I get it!
hey thank you Merlin, for building Udon Sharp, thank you VRChat team for Udon
@frozen matrix under the inspector of the object you can add a vrcpickup to it, should make it grabbable
Well there's the one problem @zealous mason it's falls down under my map
@frozen matrix oh yeah, gotta put box colliders on the prop and the thing it's sitting on
Here's an example of a pickup object I have
Thank you it was helpful @zealous mason
Just another question do you know how to set up music while using hold on I want to have a mechanism where I press the button and plays the music in world
@frozen matrix like it only plays music while you're holding it?
actually pressing button
Actually pressing eh? Might want to try to use the player's hand position and if that position is within a certain distance, then play the sound.
Quick question. Are video players still not supported in udon/vrc3?
Not yet no, but soon
Soon like very soon or still a while?
Video Players are not available in Udon / SDK3. If you want to be notified once they're back, you can vote on this Canny: https://feedback.vrchat.com/vrchat-udon-closed-alpha-feedback/p/video-player-support
@bleak widget - we're working on it right now, but can't tell you the exact week they'll be back.
But I would measure the time left in weeks and not months if that helps.
Yes, that is very helpful. Thank you!
Does udon support doing stuff with date and time?
@scarlet lake figure out buttons?
ive noticed that when you do a test build it doesnt always use the new compile of code, like i removed a debug log like 10 builds ago but its still there and nothing new taking effect, anyway ideas to stop this annoyance?
for reference i cleared cache and deleted the serialized code and it didn't change anything
Youre using the graph right?
yes
The graph has a compilation problem of yet unknown cause.
The easiest way to fix it is usually going into Play mode, exiting it and then recompiling. If that doesnt fix it, try duplicating the Graph Asset and delete the old one
ill give it a go, i also noticed branches break a lot, they throw Exceptions that are fixed by just replacing the old branch
Yeah the graph compilation is still quite buggy.
It mostly works
but there is a few situations in which it breaks
Its still in its early days so its to be expected, i really should just consider U# sometime as well
Heck
@warm cave @fiery yoke FYI I think I've got the compilation bug fixed in the next release. However, there are also situations where the graph compiles but Build & Test launches an old world that's cached on disk, may be some sort of write permissions issue if there's still a client running in the background or something.
Also, the quickest fix for the current bug is to select all > cut > paste, but that kills all your comments and groups 😦
Im glad to hear it may be fixed, ill give that cut and past a try next time i work on it, thank you ^-^
The way I've gotten around that cached world bug is by compiling the udon, hitting play, then re-opening and compiling again... sound weird but it works for me
@rich mica check out the UdonExampleScene in the VRChat Examples folder, it's got one.
delete everything regarding to the old SDK and import the new one
For Udon Sharp, what's the name of a function that can be used when entering a trigger collision box? Like how buttons are void interact?
Ive noticed that UdonSynced variables always have the owner ahead on, is there a way to correct this?
ok im new to udon and unity how to i open the udon graph, and can i make the worlds in unity or will i have to make a base in blender still?
Ok so, just right click assets to and go to create to make an udon graph asset, then click on it and in the inspector theres a button that says Open Udon Graph
10/10 would recommend making in blender first
hiya!! i get compiler errors when importing sdk3 with udon into a new blank unity project-- is sdk 3 only compatible up to unity 2018.4?
@lime void You have to use Unity 2018.4.20f1 otherwise it won't work.
Anyway, how would I track if a player is in a certain radius of something? Specifically, what I'm doing is I want to make a pair of eyes focus on the closest player.
@ionic crest here's some code I have for that
comparing distance between 2 players
believe the distance is in meters, so this would be 'if within 2 meters'
Pillazo the obsessive programmer
Mr wizard, how would one trigger an udon behavior on another object when one enters a collision box trigger?
one sec, i may have a reference for that
so, this is untested... but I'm fairly confident this is how that works @unreal helm
make a udon behavior variable, set it up like this so when the first object is interacted with...
then on the udon component, drag in the other object you want to affect
and then within that, have this to do what you want
This OG tutorial gives it the best, its the older version of udon tho, same concept https://www.youtube.com/watch?v=tgbGetGdwiU
This is a basic guide to Custom Events in VRChat Udon.
This video should always be unlisted.
It's not letting me drop my target into the event spot. Am I supposed to place the udon thing itself in the box or the object that it's attached to?
your target being the other game object?
perhaps run compile at the top right then try
also make sure 'public' is checked for that variable
ALSO, for player collision, you got two options, one is grabbing player position like this:
Yep it's public. The Text in the box looks kinda weird, idk if that has something to do with it
second option for player collision is this: https://ask.vrchat.com/t/player-collision-in-udon/428/3
GIYF, Edit > Project Settings https://docs.unity3d.com/Manual/comp-ManagerGroup.html
oh yeah, mine does that too, just drag and drop the other game object into it
so like cube 1 has the udon interaction, cube 2 is the affected thing, drag cube 2 into that public spot
Yeah its still not letting me drag it in...
I got as far as the branch, I figured all I'd have to do is get the player position and plug that in as a value to set rotation but that seems to just not be right.
@unreal helm perhaps your target object needs to have an udon behavior on it first?
@ionic crest I see, your setting a rotation based off position? I may have something for that...
What I'm doing probably won't work but I gotta figure this out somehow, haha. Sorry for all the constant need for help.
s'cool
sick, thanks Tricky!
@ionic crest don't have a working reference, but I've used this command in other 3D programs
thank i will attempt this
world up would be something like x=0,y=1,z=0
not sure if vrc is y is up or z is up
np, good luck
Hey y'all ^__^ Question: I have this material that I'm using a veryyy small video file as a texture for. When I press play in Unity, it works. (video example below) But when I test in VRC, the video is no longer playing, just frozen on the first frame. Is it possible to use a video texture in VRC? And if not, can I somehow use Udon to animate a single image texture to simply continuously rotate? Thanks!
@edgy moss check pins for status of video player in Udon
Momo, would you say that's how to have something active, turn off, and something not active, turn on? With a single button
then vice-versa
Yep @scarlet lake that looks like a good pattern for get-and-flip-active
Thanks very much ❤️ I'm very new with all of this, im also for some reason having problem with a separate toggle button, and I don't know why, even though it's made the same way all my other toggles are made. Just makes the button poof on click.
Wanna toggle game object "Sun" off, which will disable world lighting (baked probe is still active so the world isn't pitch black, makes everything darker and more moody)
Literally made the same way xD
The heck, the button works now, even though I didn't change anything
Try this: Select All, Cut, Paste. There's a bug where graphs are recompiled from cache instead of graph
Oh good!
Also, that mirror thingy works!
Nice! Fixed the cache bug in the next release so hopefully will be seeing less of this.
Also, this is such a mean thing, by default, when you add a avatar pedestal component, the "Change into avatar on use" button is un-checked by default
So, all day, there was this cute avatar for quest users in my world, and they couldn't use it
Thank you for your help and patience ❤️ Even though im doing, super simple triggers, I hope to soon be able to do bigger and fancier things ❤️
Is there a node for an event that detects a button press on keyboards? Like, a player presses "P" and something happens, I can't seem to find it if it exists.
Found it, it's under "Input" for anyone who couldn't find it either.
Question everyone does anyone here know how to set up a jukebox
day 149 I still cant make a teleport button
do it please
l know how to do that @scarlet lake
please I need to know
thank you
Share it here, so we can all benefit.
Does anyone know if it possible to convert this line to an udon graph?
RenderSettings.skybox.SetFloat("_Rotation", Time.time);
I poked around and could find the RenderSettings.skybox portion but couldn't get farther
@zealous mason Yep, the target behavior already has udon behavior attached to it.
@scarlet lake could you share the stuff you got dmed?
Here I've done a tutorial on creating a simple teleportation system for VRChat using both Udon and UdonSharp. This video was recorded and edited in a different manner, so if you have any thoughts, recommendations, or requests, I'm game to listen! Hope you can find this useful!...
Yeah I looked at that but it's not working
Where does it not work?
I can't drag and drop my empty object with the teleportation script into the box for the the trigger
Actually scratch that
Im an idiot
I was trying to put it directly into the udon script, instead of the object the script was attached to
time to test
Let me know if you got it fixed ^-^
Alright, what state is it in now?
The collider box gets highlighted, and its supposed to be a collision trigger rather than a button, but that doesn't matter as much right now. It just doesn't teleport me anywhere.
Highlighted when moved into or highlighted when hovered over?
When hovered over
It sounds like your graph is set up more like a button than a collision
Yeah. How do I make it a collision? It looks like this right now
The interact is basically an "onClick" event. Is that all of your graph? There doesn't seem to be any of the teleport code in there
The teleport is attached to the empty object at the location to teleport to. I used U# for this one though, cause I'm gonna be making it a little more complex later
The first time you enable an UdonBehaviour OnEnable isnt fired due to how UdonBehaviours currently load programs.
I was hoping the udon graph would call the teleport program attached to the empty when the player entered the collision box
should I use normal Enable instead?
Ah, nope, regular Enable didn't work either
So, how would I go about making this work?
/making it a collision box instead of a button
@unreal helm in future updates they'll add functions to get playerapis from collisions, atm you can create an extra collider and make it move with local player and teleport on collide
private void OnTriggerEnter(Collider other) { }
Ah ok. But how do I also make the actual teleportation work?
Here's a simple teleporter, I got 2 cubes, one is called teleFrom, the other is teleTo. I made an udon behavior on TeleFrom and then dragged and dropped TeleTo into the udon and then made the rest
Turn off the collider on the TeleTo box tho
Is there a way to do dot products in the udon graph?
Just cause I plan to make this teleport thing way more complex later, and right now the teleport half of this is in U# where I know how to do that type of math already
So only the button part is in the graph for calling the teleport script.
ummm help i did local testing on my world and some errors popped up in the console about some variable types while building and now every udon behavior in the scene looks like this
i restarted and all behavior scripts look normal but they lost the program source
Quick question: I'm planning on beginning to make my first vrchat world and I'm wondering whether I should go with the old established SDK or jump in to Udon?
I chose to go with udon for future proofing reasons. The biggest downside I have had with it is that there are less recourses out there for udon and some things aren't supported just yet.
But udon is the direction that development is going so it might be a good idea to start on it now so you don't have to change way later down the road
Ty, the first problem seems to worry me less than the second one. I guess as long as it doesn't break things when support is added for those things
Yeah I think it'll also be helpful bc I'm no stranger to programming in general but I am somewhat new to programming in unity so I think Udon might be useful there too
@unreal helm That Udon tutorial does actually work it's just you need to change one of the nodes to fix it.
In the video it shows "Transformation get local rotation" instead of "transformation get rotation", you're supposed to use "transform get rotation" for it to work.
Hm... well, I teleport now, but It's either to the spawn, or the world origin depending on whether I use localPosition or position
Step in the right direction though
@unreal helm if you have it enabled at load, then in start you just disable it, then OnEnable will work
I think TCL said at some point that he might change the way that programs are loaded so they are loaded even when disabled. But who knows when or if thats gonna be the case
Exactly
Question everyone
Does anyone know how to actually build jukebox
I need answer for that
Bit I'm going nuts over here
I've not done it myself, but perhaps this video can help you, its older version of udon tho https://www.youtube.com/watch?v=GIw6mNcrlis
VRChat Udon is out in Alpha, so it's time to figure out how to let people play all their weeb music in the new world SDK.
Questions about Udon should go here: https://ask.vrchat.com/
Getting started info is here: https://ask.vrchat.com/t/getting-started-with-udon/80
Well yeah this could work
I just hope it is my answer though
If anyone in here have already knows the answer or efficient way builded Ping me
Question: I got teleporting working reliably, but it only teleports me back to spawn. How would I get this to teleport me to the location of the object that the udon behavior is attached to?
I'm not familiar with U#, is this all the code? I'm not seeing where the destination is called out
the spot that says (transform.position, transform.rotation) is the location, and I was told that those variables are the location and rotation of the object that the U# is attached to. It's attached to an empty object at my teleport location
I can only speak with my experience with the graphical nodes, that yeah, if it's not specifically called out, it should be attached to the object that owns the udon behavior. But since you're getting brought back to spawn, I'm thinking those are all zeros instead. Perhaps its a difference between graphical nodes and U#? Sorry man, wish I could be more help
Dang, thanks anyway
so when i publish an udon world i gotta go through community labs?
does my trusted user status bypass that at all?
No. All worlds go through community labs.
I had to go through community labs and Im also trusted
So what’s the process once it’s on community labs?
Does it eventually get moved to regular world status?
Here's a good read that answers that https://docs.vrchat.com/docs/vrchat-community-labs TLDR tho, if it does well, it'll be public
I'm trying to create a box collider that will destroy anything within it on button press, but I'm not sure how to get at the collision[] value to pick up everything currently within its area. This is as far as I've gotten;
does anyone know how i would go about doing a compare tag? Im currently working Udon Sharp and it gives me a compile error saying that CompareTag is not exposed to Udon (same with gameobject.Tag as well) :/
@hushed gazelle I'd recommend making a list of game objects that are 'recyclable' so then the for loop would go through that list, then if those items are within the bounds of the recycler, then they'd get deleted. That way if a player jumps in the recycler, it doesn't break the player or the script. Side note tho, my experience with these arrays so far has shown me that if I remove from an array, I need to make a new array while deleting form the old one and when I'm done removing, transfer the new array into the spot of the old one.
@zealous mason I've got the detection area set to only detect pickups, so it won't be able to see players at all.
I am trying to make a version of deal or no deal where each box has a different dollar value in them. I want to be able to mix up the values before the the game so each box has it's own different, random value. I am not sure where to start. Any suggestions would be very helpful.
Haven't done random before, however that works sounds cool and I'd want to see it when it's done!
Me too! 😅 What I currently want it to do is to scramble up the values that are in each box to a different value but at the same time, have only one value in each box. Not sure if I could do that or just make a button that will change it's position then press another to change it again
You'd need an array of game objects, with each box being an object in the array as well as an array of textures for the money values, and another with the int or float values of the money. Cycle through the boxes with a random value applied to each, applying the equivalent slot of that random value in the texture and int/float arrays to that box's own udon script and mesh.
@hushed gazelle So something like this? https://www.youtube.com/watch?v=3WAI47Zm_ks
In this series of short videos we explore the basic concepts of procedural generation in Unity using C#. In this episode we look at how to pick and spawn a random GameObject from a collection, in this case an array.
stupid question, but is it possible to use udonsharp in order to spawn a prefab as a child of an existing prefab? udon doenst support the as gameobject parameter
Any U# savy peeps here?
@glossy hornet I have no idea what youre even trying to say, but to instantiate GameObjects you use the VRCInstantiate method
im doing
var newButton = VRCInstantiate(myPrefab);
newButton.transform.parent = ParentObjectStuff;
but it wont fit to the scale of the parent object and im not even sure if its added as a child correctly
use SetParent
But it should also work like that
Maybe you have to manually adjust/reset the scale
im using a size of 1000 with a scale of 0.005 on the parent but the child doesnt fit
oh wait youre right its newButton.transform.SetParent(ParentObjectStuff, false); instead of parent
thanks ❤️
How to get my world in udon alpha spotlight?
If the VRChat team likes it enough.
Goals (If I can ever finish my portal before it comes out of alpha)
do i need to tag my world with udon or anything?
@vernal phoenix you can submit it to the forum and the World category with the Udon tag and/or tweet it with the hashtag #madewithudon
just tweet the world and say made with udon?
Yes!
Maybe with some info what your world is about
im stuck. xD im trying to make an area trigger to set gravity to "0" using a game objects trigger colliders. iv got as far as enabling it when entering, but how do i go about setting it back to normal when player exits the area? the little snippet at the top is the default value for gravity in unity. buuut i can't just copy and paste the bottom row and add another update node cuuz it wont let me? xD im not too sure how this works. i was kinda building off of Pillazo's graph. >.> any ideas?
Why not hook it up to the false of the branch? :P
You can only have one Event node per Graph
otherwise, how should it know which one you want to go first?
i tried that. but it still kept the settings of the true value, which is what i didn't understand.
maybe something didn't compile right? ill try again quick
First problem was copying pillazo 😛
but yeah, helper's idea should work, perhaps its just an issue of the old cache again
I get around that by compiling, hitting the play, then compiling again
Also checking if the player transform is inside of bounds is generally a meh idea, since that will only check if the bottom-center of your feet is inside the bounds.
@fiery yoke yes it did work. must of been a compile issue i suppose!
@zealous mason i was desperate ok? lol
lol
yea i could of just used a On Trigger Enter/Exit node, but only wanted it to work with players, not having objects interfere. but thanks again for the help !
udon makes things happen in your world
its a vrchat programming language to have cool stuff happen
to expand on my last help contraption, how would i go about changing gravity to player only? iv noticed objects around me started floating as well. lol like having some sort of superpower. might make that a button actually 🤔
vrcplayerapi.setgravity?
Unitys Physics.gravity is for all rigidbodys. Thats why VRChat has that ^
also its SetGravityStrength
as you already used it in your graph...
SetGravityStrength didn't keep the player going up when a player jumps. its in there cuz i was experimenting with it. lol
it kinda made it seem like players were light weight when set to -1 or even -100. and then normal when set at 1 >.>
Yes that is the sad reality.
Setting the Players Gravity Strength to 0 does not actually set it to 0
big oof
people are having a hard time in my world with pickups
if they are using VR
is there something i need to change on this?
is there a rigidbody component too?
Pickups require a rigidbody. Meaning there must be one.
Without a collider they couldnt pick it up at all
Usually not being able to pickup something in VR means that youre inside a collider or that something is blocking the raycast
Its been an issue forever.
yes there is a rigid body and collider
but its almost like vr users have to point an invisible cursor at it
show us the collider and rigid body?
ok its building rn
so i have a really large trigger on the player
like a huge bubble
that's blocking the pickup?
Put it on the MirrorReflection layer. If you need it to be on a specific layer then...thats gonna be more complicated
i can try that
but the bubble needs to trigger other colliders
when the player is near them
will that still work in the mirror layer?
FUCK
Depends
If the collision detection depends on the layer
well yeah i mean i have the scripts checking for certain layrs
Yeah then that wont work.
and of course the physics are set so these layers only collide with each other
i mean i can change stuff to point to the mirror layer
that isn't a problem
i just need to know what are the specific properties of the mirror layer
Then your only option would be offsetting the colliders.
Practically moving all colliders up or down. But ofcourse that brings its own problems with it.
The MirrorReflection layer is not visible in the normal player view. And you can look up the collision detection on it in the collision matrix in the Physics settings
if something is on the mirror layer, with it still hit stuff as expected?
or is it in some alternate universe?
i guess if i put both colliders in the mirror realm they could hit eachother
You really have the wrong image of how collision detection works
Lookup "Unity Collision Matrix"
i understand the matrix
but is the mirror layer just like all the other layers
or does it have some wierd properties
A layer is a layer
The thing that makes it special is that VRChat excludes the layer from the Raycast detection
Meaning that the normal pickup and other raycasts pass through it
Plus that it is masked from the Player Camera
Nothing
if i checked that box on my other layers it wouldn't help?