#udon-general
59 messages Β· Page 34 of 1
Can someone explain to me what the synced variables do? I looked for documentation or a description of their function but I can't find much.
im assuming it's to sync variables with shared scripts?
Nevermind just found this while searching.
Now my issue is sending a boolean variable to be set between two different buttons of the same script
ya not sure how to send a variable between scripts is the main issue
Nvm also found that too, not sure why this is hidden deep in the ask forums and not the official documentation.
@fiery yoke Your text chat scene is amazing. I'm hoping to use it in a couple of VRChat conventions that are coming up. I have spent a few days already trying to add a virtual keyboard that would work with it, but I've not been successful. It seems I need a project with a lot more documentation to be capable of understanding it as well as I did SDK2. The ideal mod I'd be looking to have made for it does the following locally for each player:
-Players can double tap a menu button to enable and teleport the Chat Log to where they are.
-Selecting a collision box above the Chat Log will disable it.
-Virtual keyboard that may be grabbed and used to conveniently type for the input text field. (Child of the Chat Log so it may be teleported and enabled/disabled with it.)
-Disable movement, crouch, and prone while typing in desktop mode. (Disabling the action menu would be also welcome, but secondary as it doesn't force the text input field or Chat Log to be out of view.) Closing the Chat Log should enable those controls again.
Thank you! :D
I kinda gave up on it tho, since text chat in VRC isnt as useful as it may seem. I will give you a longer answer later. Busy rn.
Thank you! It's really in hopes of supporting some friends of mine who are deaf and otherwise would have no way of communicating with folks who do not know sign language. I know they're not alone either. There's a whole community called Helping Hands that encourage and teach many different sign languages, but teaching is not feasible on the spot for how populated these events may be.
I would not be against paying for this effort.
how do i interact with 1 object, and make it do a script function from the udon behavior on another object?
this doesn't seem to work
can't get low gravity toggle to work
kinda confused why
basically i press a button which enables 0gravity gameobject
and it enables -15 gravity but when i toggle it off
branch on false doesn't seem to set it
Are you sure you want to use Start and not an Enable event instead?
iirc start is only called once
oh i see
It might be called OnEnable, I don't remember!
@tired orbit I used onUpdate event which is every frame in unity games
but now it doesn't even turn on
for some reason
Your graph looks ok to me, I'm not sure why that wouldn't work.
You could simplify this but just making an UdonBehaviour on the object you are enabling / disabling, then just use the OnEnable and OnDisable events
Does it not compile?
it does but there's some udon related exception
I'll fix it
okay I'm really confused
the game object gets enabled fine
i have an audio to debug
but my graph doesn't work
seems to be this why it doesn't work
Do use method names, you need to get the component by class name
public void interact() {
other = go.GetComponent<YOUR_UDON_CLASS_NAME>();
other.DoIching();
}
@mossy anvil @tired orbit gravity can only go from 0.1 to 99 (or so)
There is also a canny for gravity = 0
https://feedback.vrchat.com/vrchat-udon-closed-alpha-bugs/p/setgravitystrength0-does-not-actually-disable-gravity
lol
Gravity 0 is no gravity
Yeah, it's not documented on the site sadly
is it possible to check if PlayerApi is null with graph or would i need to use udon sharp
it works like that a button toggles and empty game object that's called GravityTrigger and then there's a game object LowGravity which has this udon graph that checks if Gravity trigger is active or not
cuz i need somehow to revert the gravity back
Okay so yeah
You wanna switch the bool variable each time its clicked
And all in the same graph
yea
Yeah so the game object goes Into unarynegation to switch it from true or false depending on the state its currently in
As it currently sits theres nothing triggering the graph
so after set active i put the arrow to branch
No need for branch
It outputs to set enable whatever
So its interact > game object get active self > unarynegation > change gravity
That way its active when you load in, hit the button and it's not active, click it again and it sets to active and the cycle goes
I am creating a UI but for some reason i can't seem to disable keyboard input for scrolling. Does anyone know how to do this?
That idk but if you got a graphing question I'm your guy
@scarlet lake i hope i understood correctly
lol i coded it too
yea but it has the issue i encountered before
it doesn't disable the gravity
in my case doesn't set it to 3
well
its seeing if the game object itself is turned off or on
you cant do -15 strength
i see i think i understand now
yeah its not turning gravity on or off, its the entire game object
this is specifically tricky
i know i forgot to rename it but it sets the gravity to low
so you're gonna want to use get gravity strength
i got it, its a bit of a strech but i think i really got it
I think if i do the same way but with your better graph it should work flawlessy
if it doesn't idk but I'm really tired either way xd
so will go sleep
so weather or not gravity is enabled is based on wether or not the game object itself is enabled
so when the game object is active, the gravity is true, and while the game object is not active
oh shit you forgot to switch the active state of the object
wdym with switch can u show me
thanks
makes sense?
its basically using the game object itself as a variable and it has to change its own state
and i know i know, i'm a god
anytime if anyone needs more help i'm open to dm's since there's literally no documentation on udon
ye it kinda sucks but udon isn't that hard imo
for simple things
like some pickups and pillows and mirror toggle
yeah it for sure helps to already understand the logic of it all from sdk2
This feels like a stupid ass question but...does udon support c# scripts
i think so, i've seen custom udon# scripts so idk how that works
yeah udon# scripts but not c#
c# = no
thank you
anyone familier with the arciTechAnon video player
i want it to autoplay a certain video but when i put in the url into the componet it prevents from entering a url in vrchat manually and doesn't play the video
ive had a few problems with his videoplayer as well, id suggest using the U# video player or the aVpro player
got a link?
I use this prefab
Has an auto play url option
thanks i'll try it
if U# does support tag checks how can i check an object? global name type?
so i imported the video and it poofed from my assets folder
you know, fuck this for right now aye
@scarlet lake are you trying to assign a default video to run automatically when a new instance is created?
Ok. I think I have an idea on a fix, but I'm on holiday and won't be able to work on it till tomorrow sometime. I'll look at fixing that support first thing when I can.
yeah, i put in a url into the only places i could find which is the quality assets, and it reconizes the length of the video
but it says no video entered or whatever
and it seems that autoplay itself prevents new url's being entered in yours, and other video players
My TV uses a separate set of variables to enforce the sync state. They are in the TV->Scripts->TVManager.cs script if you are curious.
Specifically, the idea i had was to set the syncURL to be public, then in the editor on the TV root node, put the auto play url in there. Not sure how well thatll work for the first player joining a new instance though...
Needs testing heh
yeah seems like an incredibly confusing feat
Without the mental model of how the tv works, yea kinda is heh.
Ill get back to ya on it.
I have some ugly code that I think there might be a better solution for. Basically I need to pass variables in an event. So my GameManager just has the same function four times because I can't just pass the choiceId through an event.
seems like you can use string concatinaiton
instead of "Choose0" you could write "Choose" + chooseId
and make it one line
SendCustomNetworkEvent(...., "Choose" + chooseId);
How would I separate choose from + chooseId in the event response function?
Just like subtract choose from the string? I'm also not sure what variable the event name exists in to grab it
you can so int.parse(eventString.SubString(5));
Is there a fix where if you set a value in a node, when you hit compile and reload, it just sets it back to 0? I've been using consts because those seem to stick but it's not working for quaternions.
@cold raft Wait what do you mean with "eventString"?
i dunno your the expert π
i assumed there be some OnCustomEvent(string eventString) but i might be totally wrong
Well you see the thing is that events are sent by name, and then the receiving udon behaviour needs to have an event that is associated with that name.
All of that needs to be compiled into the assembly, so no unfortunately you cant simply do that.
I got around it by caching a list of all the custom event names needed, then injecting method stubs for all of the custom event names that call a single method with the custom event name as a parameter. Keep in mind that since Udon doesn't support native recursive calls that you may need to manage the local variables used by the methods in your own call stack
Unfortunately thats very inelegant. Still the best you can do for some situations. But its less elegant than it would need to be.
I'm kind of hoping I can convince Merlin (either with my own pull request or from his own efforts) to add a couple of callbacks into his pipeline to get the UdonSharpProgramAsset that is about to be compiled so I don't need to copy all of the same Unity hooks that U# uses that end up competing and causing unnecessary recompiles after injecting the stubs
Hopefully he'll eventually add support for extension methods in external files which would make stub generation easier and recompilation more efficient
Trying to write my first udon script that isn't a Start() function...And I'm not getting very far. I've got my U# script attached to a cube, I can see my properties, etc. But, I can't interact with it in-game, in-editor, or in-play. I've tried public and private keywords for Interact()
Any ideas?
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class ResetButton : UdonSharpBehaviour
{
public float fResetTriggerControl;
public GameObject objectToToggle;
public override void Interact()
{
fResetTriggerControl = (fResetTriggerControl > 0.5) ? 0 : 1;
objectToToggle.SetActive(!!(fResetTriggerControl > 0.5));
GetComponent<Renderer>().sharedMaterial.SetFloat("_ResetTrigger", fResetTriggerControl);
}
}
Think it should be "public override void"
That's what I started with, and just went back to, but no dice. (Updated code to reflect)
Hows your collider look like?
It is enabled. Also, now, I can interact with it in game, but the Trigger Interact button is still disabled.
TIL you have to be in play mode before that button appears.
It is working for me now. Thank you π
Ok, I've got another question - I can place a canvas with a UI slider into my world, and shrink it down, and see it when I click "Play" but I can't drag it. I know this isn't technically an udon question, but I'm wondering if it might be related. What kind of hangup might I be having?
Make sure the Slider component is enabled and that the containing canvas element is not on either of the UI layers.
This was set to "UI" It should be default?
Default is commonly used. Another layer might be needed depending on the world's needs.
The UI layers are tied to the menu, so if you have a canvas on that, you can only interact with the elements in it if you have the menu open.
Bleh, I found it, it was in the canvas settings, apparently if it's a worldspace canvas, it still needs to be attached to a camera. Should I be attaching this to a conventional camera or specifically a VRC Camera?
Aah! That makes sense, thanks for the background.
Im not sure if explicitly attaching a camera is required or not tbh... Never really tested it thoroughly. π€·
If I don't attach to a camera it doesn't go.
I am still curious where the balance between using a VRCCamera is and having a scene camera?
Is it typical not to have a scene camera but only have a VRC Camera?
Idk, i usually just attach the main camera to the canvas components and vrcworld prefab. Would be worth looking into till a better answer is given/found.
"Main Camera" = a standard camera or a VRCCamera?
(Also, I can't seem to slide the slider in VRC)
I've decided to request gamestate from room owner in a Start Method, that way late joiners get info immediately.
Just in case anyone else finds themselves spending 45 mins trying to figure out why slides no slide, it's because you need to add the VRC Ui Component to the canvas, not the component.
"Main camera" as in the default camera object that is in a new scene.
Gotcha, thank you.
Is it possible to get the analog input from VR controller triggers?
For example, how far the trigger is being held down on an index controller
Thats a little difficult to answer, since all Controllers have different mappings for which buttons are considered what, and then that goes through the SteamVR SDK part as well...
But I guess the answer is probably yes.
Where should I look for more information?
The docs for Udon seem very limited and I didn't see anything about this
@tired orbit This is a spreadsheet a community member put together on inputs:
https://docs.google.com/spreadsheets/d/1_iF0NjJniTnQn-knCjb5nLh6rlLfW_QKM19wtSW_S9w/edit#gid=1150012376
great, I'll check that out, thanks
Hey guys making a super basic emptyish world in unity
since I'm on mac build and test can't work so I thouhgt I'd just give uploading a try
but I get this error Error updating content. Unity package upload failed. Failed to optimize file for upload
Any idea what it could be? All that's there is a couch from the asset store
And its gone
why are crashing avatars here π¦
I am trying to do a local translation. What input do I send the "relativeTo" param?
I can't find and appropriate "local" or "self" of type "Space" for the input
I see it should be Space.Self in the unity docs, but I can't figure out how to do that in Udon
https://docs.unity3d.com/2018.4/Documentation/ScriptReference/Transform.Translate.html
Update: I've worked around this by setting it to (Vector3, Transform), and then just using the same transform for the instance and relativeTo inputs
I'd use an empty game object to hold either true or false values, active = true and not active = false @mossy anvil
Ah yeah I havent done anything with arrays yet
I need to fix it tomorrow by using arrays everywhere kinda forgot
That I need to use them after as well
What are you making that requires positions of cats and gravity haha
Lmfao!!!! Well that answers that
has anyone made any tutorial/example stuff for udon player audio control yet? looking to do a bunch of location based DJ audio volume control stuff
PlayerLocal layer looks like that
You should not have PlayerLocal layer enabled and instead have MirrorReflection
any recomendations for music players, like mp3 player?
@sharp shadow i know the basics on how audio works, might be able to help
i havent started that part yet but im sourcing tutorial content and documentation for when i do
im making a club world with a global DJ booth thats muted/lowpass/etc in different areas and stuff
things like private talking booths and quiet rooms and stuff
heck yeah, the audio componet lets you customize your audio in all kinds of ways
its pretty straight forward too
yeah but i havent found any tutorial/examples on selecting players or defining zones and stuff
also you may like this for mp3 players looks super clean https://booth.pm/en/items/2269058
well the zone would probably the sound distance right
if its when someone enters a specific area use collisionentertrigger
yeah im looking for that kind of tutorial stuff
an empty object with a box collider to define the area
not alot out there
yeah thats true
i keep complaining about the lack of doc like they have for sdk2, although, a lot of stuff is transferable
conceptually sure
so you can look at the sdk2 docs to see how audio works at least
its the same, the only thing different is graphing the triggers
the collider box and oncollisionenter and stuff is probably the way to go
nice
yeah archive.org cant be legal on a dmca level
just thinking about how you would say "turn down/off the audio of the person in zoneA when player is in Zone B" for muting global DJ audio in quiet rooms
enabling and disabling the game objects
right but its player voice/audio
i'd put the audio onto an empty game object.. then in the graph: audiogameobject_variable > gameobject - getactive > unarynegation (changes the true or false value to the oposite) > gameobject - setactive
oh snap
i know i saw a mute players prefab in the example scene
locally muting other players in a zone is exactly what im trying to do
yeah dope just gotta be creative, collisionentertrigger and exittriggers to see if players are in the zone, then get creative with your nodes (look at branch) to toggle users mute or not
its selecting other players that im not sure how to do
the example scene should let you see the graph for muting its probably somewhere in the playerapi nodes
playerapi nodes
yeah i'll have to take a look
another thing is selecting the nodes is fustrating like why do i have to go under boolean just to put in unarynegation
why cant i just search unarynegation
theres not a lot of documentation on playerAPI and nothing on how to select other players
literally only the audio component documentation
i dunno, i'll have to just play with it, testing it is gonna be a pain
you can get other players
i have a game object in my main project just to play around and visualize graphs for these kinda things
no actual practical use in the world lol
so i think it would be under playerapi > get players and that should logically get all the people in your world
@sharp shadow
and then i should be able to filter by players in a collider?
probably
hopefully
its fun cause yall give me these problems to sort out, increasing my own knowledge
i will be a graphing god
i do have an idea but idk if i should go public about it yet
getting players from inside a certain area might be quite a challange for me i'll work on it tomorrow
because that way you can actually have a zone where the DJ is muted or muffled
lemme add you real quick so i remember to check again
If you know bit about programming specifically in C# take a look at U#.. More options, easier and faster making of scripts
for sure, i've been thinking about it since i've been having the worst time with syncing animations
it seems other people have figured it out
welp i bought songs for the first time in years lmao
Hey guys making a super basic emptyish world in unity
since I'm on mac build and test can't work so I thouhgt I'd just give uploading a try
but I get this error Error updating content. Unity package upload failed. Failed to optimize file for upload
Any idea what it could be? All that's there is a couch from the asset store
Might want to check if you have future proof publish on in the sdk's settings tab
Vrcworld prefab
@patent rain
What's the most efficient way to handle multiple fish all following the same circuit but starting the circuit animation at different points?
i've animated one to get the circuit animation
Itβs got the future proof setting on. Is that okay?
Vrc world prefab is attached
Theres a whole bunch of error messages when you first build too did you click all those?
I didnβt see those Iβll try that thanks!
i guess i could do one script and an array of fish
Yeah it's all like gotta move the scene to the vrc layer etc etc
@scarlet lake have to make a timer somehow
Maybe a while loop
Unless the fish are in different spots I'd just animate them all individually
You should turn the future proof publishing off it should be enough to allow you to build properly.
Oh thank you!
Is there any way to build and tear from a Mac
It runs, but nothing happens
Not really
Just gotta build and publish and then go test
Though actually
Using this you should be able to test sufficiently in editor even though you are on mac
Woah good to know thanks!
it uplaods now! Thanks!
but when I try to enter it
it says "It has not been published for this platform" any idea why?
Are you trying to join it on pc or android? And which did you publish it for?
am i doing smth wrong so it doesn't reset the selected things in the arrays to their reset points that are selected in arrays
Nvm figured it out!
Is it possible to make something follow a player's hands and feet with Udon?
Quick question. Does syncing a VRCPlayerAPI variable work?
no but you can sync a int and get the vrcplayerapi network id.
Yep, that is what I was working on rn as a workaround (:
Thank you for confirming
Question does samsung oculus work on vrchat?
Because im getting a vr headset and i just need to know if that one works cause its cheap and easy for me
yes it does
Oh! Thank you!
@scarlet lake timers can be done by having a variable 'time' and adding time.detla time to it. Then a simple if statement (branch) checking if it's above a certain amount and if so, deleting that amount off it. That being said, I haven't been able to get a branch statement working in regular udon without it crashing, but it works fine in udon#
Question: i have a bunch of pillows, but i want to make a toggle that disables the pickup function. I get how to toggle off an object, but not a script. Is there even a way? thanks!
The pickup script has a "pickupable" boolean that is specifically for that purpose.
how would i call it?
is there any TOS against player targeting by user?
Like if there is a player that harasses you and people in your world constantly i could teleport them to a specific spot and freeze them.
Have a sign that tells them to leave to their home world or to a new world
VRCPickup.Set Pickubable => false
would I need to do a gameobject array and for each go 'get component > pickupscript' and whatnot?
or is there a script variable?
Would be simpler to have an array of Pickupables but yeah in Udon you need to iterate over all of them.
i feel dumb... i was looking for a c# script variable and didn't think there was a specific 'Pickup' variable. Thanks for the help! i should be good now
Its better to leave in-world moderation to the instance owner which is natively supported by VRChat.
I guess but is this possible to have in public worlds rather than having to constantly get the world or instance owner?
The instance owner is the person who created the instance. Just to be clear on terminology.
Its not the person that uploaded the world.
What about targeting by username? essentially a blacklist, created by the world uploader.
yes i know hahah
Username A joins, Username A is on blacklist, Username A gets teleported to frozen position and world is inaccessible.
I have a strong feeling this is considered "harassment" and against the TOS, but I'm only curious how this would be handled.
I had some discussion about that a while ago.
And the mainpoint against that is that you may not confuse a user about the operation or integrity of moderation of VRChat.
i.e. you can not make a user believe they can not enter your world.
Terms of Service are always intentionally written in a vague manor. And even if you dont violate any of the terms of service VRChat still holds the right to take action against you for any reason they believe is right. So without an official statement on this matter, I would be very very careful with that.
yea that seems a tad malicious to want to do so when you can easily block a person
I believe VRCHAT could implement a world "ban" system, where you could block a user from joining your world at all.
But again, it's leaning on the malicious side.
Ofcourse they could. But its probably not in their interest. If a user is malicious they get banned from the service. If they are only harassing other people they get a "public ban" i.e. they cant join public instances anymore. Otherwise they are free to join any private instance of any world.
It's less about Private, and more about public.
If I had a user that is consistently harassing my community in public, I would want them to stay out of my world.
Yeah thats reasonable. But its up to VRChat to decide whether they want to implement or even just allow such kind of moderation.
As I said, until there is an official statement about that I would probably not try to do it myself.
@hearty perch
If you have someone in your community that repeatedly harasses people, then you should collect evidence that supports your concern and report them to moderation@vrchat.com
If they are a harassing people there, it wont be solved by banning them from your world, because they can just continue harassing people in other worlds/communities.
Absolutely, that's what we have done and what we will continue to do.
I was only giving examples. I'm curious on how TOS works for world uploaders.
its vague, open for interpretation, and non-exclusive, for a reason ;P
Thats just how law-related stuff works.
I heard you need to add something for the Udon SDK 3. For the new one. What is it?
It's like Cinema something.
IDK.
cinemachine? that should appear when importing the sdk3
ok
Question does anyone know how to set up a samsung oculus to vrchat?
@scarlet lake Just pushed an update for the autoplay URL. Let me know if that fixed it.
@dapper lion I'm curious on what issues you ran into with my TV.
any idea why I can't edit udon behaviour inside of VRCWorld?
@unborn hornet the videoplayer seems to have trouble differing who is the master of the world. i wanted to play something with a friend and the field of text did not budge for either of us. it also has a bit of trouble switching between videos. there is also no clear indication of any errors when i look for them. thats all
when i change between videos rapidly, the videoplayer will seize and no longer function
this was done with sdk 3 09.25.00.08 and 11.16.12.43
Well, the master of the world shouldn't matter. It changes owner based on whoever inputs the video URL. Regarding error indication, anytime an error happens, it displays it in place of the user/domain text under the seekbar.
π€ If I could bother you for a recording of your issue, I'd appreciate that cause I specifically added constraints to help mitigate exactly what you are describing...
ok, im also using your "v1.0" tv, just fyi if there was a fix in 1.1 or 2.0
yea 1.1 was just an autoplay update. nothing directly related to what it seems you are describing.
ill see if i can bring a friend to the world that had the problem, it is currently running 11.16.12.43 udon
Also we should probably take this to my assets server ||The invite link is listed in the booth/gumroad listing||
||Don't want to clog this channel and make momo mad at me π ||
@patent rain Are you in Play Mode while attempting this? Otherwise you should be able to edit it freely.
that was it @cunning mist thank you!
π
Is there a good way to generate four random numbers without duplicates on Udon? I was using Linq, and system, but those namespaces don't play nice. I have a work around but it freezes the game while it finds the numbers.
Something like this maybe?
int[] nums = int[4];
for (int i = 0; i < nums.Length; i++) { // 1) loop through each item to generate the numbers
int v;
bool unique = false; // 2) init to enter the uniqueness checking loop
while (!unique) { // 5) if existing number was found try again, otherwise move on.
v = getRandomNumber(); // 0) put whatever logic/method call that is needed to generate a random value here
unique = true; // 3) always assume that 'v' is unique...
for (int j = 0; j < nums.Length; j++) {
if (nums[j] == v) {
unique = false; // 4) ...unless an existing number is found.
break;
}
}
}
nums[i] = v; // 6) assign the value
}
any idea why i only have one option in vrcaht sdk now? Happened after a crash
this is the error from the console
ummm, have you reimported the sdk? and is that even the right unity? @patent rain
huzzah, ive never seen a unity skin like that before so i was curious
That's happened to me before
I remember there was a certain prefab that made vrc builder yeet out of existence and when I deleted that object it came back
Unity is hella weird sometimes
Can you use UDON for User Interfaces?
Depends on what exactly you mean with "User Interface"
Which UI system is VRChat currently using?
I suppose the regular UI system with the SDK limitations would do fine for neumorphism but I'm curious to know if you could replace the current UI with something made with UDON that has effects, 3D geometry etc.
Do we have any Status for new sync system.. ? I remember Momo saying at end of September that its gonna be within weeks but its almost December and I have not seen a single mention of it since then..
I'd say thats probably doable. You just have to work within the limitations VRChat imposes when it comes to input/tracking information and what methods Udon exposes.
Its being worked on. But no ETA afaik.
.
huy guys I just merged my steam account with my new official vrchart account
but sdk still says that I dont have permission to upload worlds
I'm trying to replace an existing SDK2 world with an Udon version uploaded using the same world code, but it's telling me it's an Unpublished world in the VRCSDK. Is there something weird with world codes between Udon and existing SDK2 worlds, or do I need to go digging into my project looking for local issues?
yes it do be like that, if you have an udon behavior with a udon graph script on it then if you double click that and choose open graph you will see the graph in this screen otherwise you see this
thgere is no open graph
a cube udon assembly program is not a graph
ok I fixed all the problems now I am having a problem were the unity crashed when I play in editor
yea that happens sometimes
its doing all the times that I play
errors son?
zero
it just shuts down
I am gona try tro copy the project and delete all packages and reinstall
Does VRC not support Animation component? My fish do their nice swim animation when I hit Play in Unity, but in VRC they don't animate at all
@gusty geode in the udon behavior that holds the Jump height and the Walk speed (usually with the scene descriptor if you used the prefab) you also need to adjust the strafe speed. It defaults to 0 which is why you can't move with a and d
Nope. They are not whitelisted anymore. Use Animators.
hey guys so for example I publish a world, them if I update it later will the last version be deleted?
yes?
but how does it work? like it has to have the same name?
Every world has an ID. It says the world ID in the Scene Descriptor after you uploaded it. As long as it has the same ID it will overwrite the last uploaded world with that ID.
were can I find documentation on how to implement audio clips to my worlds?
Is there a way I could emulate something like the OnTriggerStay event for a pickup so that it is called each frame that the item is held? Or would I need to just use the update function to check if it is held?
second
I feel kinda dumb... I'm trying to use Vector3.Reflect but it seems not to work and I can't see why
Code with the function
Make sure that youre in the right space
and this is where I get the headDist vector from
The velocity is likely in normalized local space which means that it if you were to visualize it, it would start at world space origin, So make sure that the headDist vector also follows that same logic.
headDist is the distance from collider to my head so I guess It is also local space
I think the reflect should do something even if the vectors would be wrong right?
a distance is a scalar value. So that obviously cant be right if you use it as a vector then.
Good naming is a big part of programming. Not just because it makes it easier for yourself to follow your own logic, but especially when asking others for help.
Just as a tip
I know, I was changing what kind of value the function was returning but I changed it later and didn't change names for parameters
One thing is that the reflect function probably expects normalized vectors
if the player velocity is 0 on all axes then it cant be normalized and the function will not work properly or at all.
I perform that function while player is in air and chance for him having 0 velocity is quite low
Also not sure how reflect behaves if the reflection normal and the reflected vector are "similar" in their direction
I suppose I can swap the direction of the inNormal one adding a minus and see if it changes
I'll see if normalizing tempVector does anything
I normalized wrong one
I was supposed to normalize headDist
and that totally worked
thanks
Heres a few tips:
Do not name anything "temp" unless it really really really is only temporary.
Name it playerVelocity.
Do not name it headDist - name it headDistance. And dont even do that. Its not a distance.
HeadToCeilingVector would be much better suited.
Makes your code more readable, more understandable, and gets you less confused about what youre even doing there.
Ok
though I don't see them stating it needs to be normalized in documentation https://docs.unity3d.com/2018.4/Documentation/ScriptReference/Vector3.Reflect.html
Yeah thats intuiton you get when youre a little more experienced with linear algebra. Most Vector methods expect normalized vectors when it comes to these sort of things.
I see
this is what I'm trying to do, though I'm not sure how to fight this slight teleporting yet
Using Udon Graph, my addition node returns null for some reason. It have 2 valid input. The ? mark gives me an error message. Anyone know how to add 2 vector3s together?
anyone wanna see an object reset graph that i figured out after taking a dab
Anybody figure out climbing yet?
think someone did, cr who did it though
i've got a world with weapons in it and when they're swung and make contact with a collider it sends the player flying. Any idea why?
How do you enable strafing in an Udon world? I've tried to reproduce standard world settings and I've set strafe speed on local player?
Select the VRCWorld object and change the strafe settings
Hello, I need to know, are custom render textures supported in udon worlds ?
@hardy fog I believe I'm blind or something... but I can't see it..?
@hardy fog You know what.. never mind π
Last time I did Udon I had to make the world settings script myself, but apparently I didn't need to now
Hey, so I was wondering how I should approach storing 'levels' for a music/rhythm game. I can imagine that instantiating an entire prefab for each 'level' wouldnt be the best way to do it.
So I was thinking of using a text file, maybe even a midi file, or something for each level instead, which would include some meta stuff and all the notes for that 'level'.
I would put that in udonsharp I think
You mean coding the levels into individual scripts?
Yes you could have the spawn logic in one object and then just trigger that object by an custom event
Yeah that's essentially what I want to do, but I need some good way to store all the info for the levels themselves, and then read that to instantiate notes at the right time
Yes
weird
I have a dynamic water setup made with a custom render texture and it works perfectly in unity
but not in vrchat
ok for some reason it's my camera
I have a camera with a render texture
and the texture is just black in vrchat, while it works in the editor
ok I found out why, I used Legacy vertex lit mode on the camera to make it cheaper but this make it not able to render anything at all
Why doesn't pickup respawning work in the editor play mode?
Hello here! Currently I'm creating asset for SDK 3.0(Udon), but I don't know how the dynamic image from web working on UDON (which is similar like on vrc_panorama in SDK 2.0). I heard it is updated for Udon, but I can't find how to do it.. does anybody knows about this?
is it normal to take some time my world to be updated in to the world list?
or is it becuase I can only update once per week?
even on content managerr with information fetched it will does not update the map to the servers
I made a copy of the map and updated that on, is it because it is not the original?
hello
I'm sorry for the inconvenience, but I can't start VrChat
gives me a unity error
gives me a unity error
Check the integrity of your game files
is there a simple way to instanciate an object - the same object for everyone that can have synced position? I only seem to manage to make a local one π€
guys I manage to update the world an in browser says corect hours of update, but when I login in to the world its the same
any one had problems like this before?
Runtime Network instantiation isnt a thing yet.
You will need to use the pooling method instead @vagrant coral
what happened to the poΒ΄s panda avatar in the big alΒ΄s avatar corridor
this channel is for questions about Udon - check #faq to learn where to post other questions
guys I am havint 2 warning that I can noot discover were they from
The referenced script (Unknown) on this Behaviour is missing!
and
The referenced script on this Behaviour (Game Object 'VRC_PlayerVisualDamage') is missing!
is this important or can they be ignored?
can't seem to find were is the root of my problem then
Not sure on that one. I wish you luck on finding the noot root of the problem.
hey anyone know of a udon compatable glowstick prefab?
Hello, I was wondering if there was a way to alleviate an issue I'm having with buttons which is-- any buttons I have that are inside a trigger can't be pressed on in VR but in desktop, they work fine. So fox example-- I have buttons on a vehicle that don't work if the vehicle goes into a "combat zone" trigger that enables the weapons. In desktop, there is no problem but in VR, they can't select the buttons.
guy I found this on my the editor logs "Native extension for Android target not found"
this does not sound normal, any sugestion?
and
"Native extension for WindowsStandalone target not found"
If I get the vector3 of a parent object, set it as a vector3 variable, then at a later time send the vector3 back to the parent to essentially reset its position will it also reset the position of the child objects?
yes
Thank you, that helps a ton
Would I need to set the Sync position option in the udon behavior component to have this be sync'd? Or do I only need to make sure the variable for the transform of the object is set to sync'd?
The component for which the transform's position is being changed needs to be sync'd
Im looking into visualizers. I was curious if UDON had anything for sampling say a youtube link, and what readings it can have.
anyone able to help me in dms try to make this weird bike thing back into tpose? i looked up youtube videos but nothing is working
furry go zoom on invisible motorcycle
@compact delta This is the wrong channel to ask that question, look at #avatars-2-general or #avatar-help
ok..
How can I setup something to be applied for all players instead of just local?
To be exact, I am entering a link into a URL input field, then hitting a submit button which starts loading the video.
I am using a tutorial to get this video player into a world (namely, Vowgen's one) and I have it working, but again only locally.
Networking is tricky. I think Vowgan wanted to make a video for networking video players at some point too, but probably hasnt gotten to it yet.
Ah so it would be part of the networking node... Alright, I'll keep an eye out for it.
whats the plugin thingy to update changes while live in vrchat
Hey guys, i followed vowgans tutorial for door animators in udon. i have everything working, but my only problem is the door animates on load as seen in the example, which i would rather not have if possible. is there any way to fix this? i figure it might be something to do with the transitions. but im not sure.
set the default node to the close animation and turn the boolean variable off
@ancient spindle
in the udon graph?
in the animator...
you mentioned "node" which confused me.
that way the door closes when you load in, since the variable you set will be checked off by default
then when your script toggles it true, door opens
With "node" they meant an Animation State inside the Animation State Machine.
that is how its set in the animator already. i dunno what you mean by the boolean variable though
i forget where it is, but you can set a variable, that you can toggle true or false and the animator reads it
rendering the animation to open or close the door
Why is it that Quest avatars and PC avatars are not able to see each other unless they are specifically tailored to be cross platform visible? Why isnβt there an option to see all avatars and worlds with the sacrifice of a little frame rate?
The Oculus Quest runs on an Android-like Operating System. It has a very different CPU architecture, and some technologies that Unity uses are just incompatible with it, compared to normal PC tech.
Pls get new text channel on CZ lanhuage I'm not speak English very well
Are there any plans in the future to upgrade it to integrate all players?
What would need to be done in order for this to be a thing? I donβt like the idea of downloading stuff just so I can see my friendβs avatar
Ok i for this to
I have both consoles and I have to say that Iβm kind of sad how much the Oculus headsets feel when it comes to the game. If there is any testing needed, I will always be open
This channel is for asking questions about udon. If you want to chat then go to #general-media
The question was are there any plans on upgrading the systems or really anything to fix this lined up in the near future?
questions about UDON - Udon is VRChats in-house scripting language. There is a reason its not just called "vrchat-questions".
Oh this is coding questions? My bad sry
It's a Unity limitation rather than a VRChat one, it's not trivial to use world and avatar assets from other platform builds
@scarlet lake isnt this the boolean variable? if it is, it was already unchecked.
its the only thing i could find in the animator controller. i even looked in debug settings. lol
yeah that's the variable you set true or false. you change that on the arrows in between the states
alright i found what you were talking about. its a condition in the transition. however setting it to false did nothing, and setting it to true stopped it from animating on load but then the door jitters initially when you first interact with it in game.
You cant. Coroutines are not supported in Udon.
So..
how do I make a certain animation finish and then execute another animation?
Animation Events
Can I use while(!anim.GetCurrentAnimatorStateInfo(0).isName("Complete")) ?
Probably not. Udon doesn't have any kind of wait or sleep function so unless you change something directly in that while loop to change how it's evaluated, it will just throttle the cpu to the max evaluating it as many times as possible, until udon forcibly times it out after 10 seconds
If you want to just do something as long as that's true, then you should add an if statement to the update method. Update happens every frame
Hey so I'm outputting a camera to a texture on a cube but it's like low def
Is there a way I can like make it higher definition
ah turns out its the size variables
hiya udon peoples, is there a simple way to send a bunch of variables over the network, other than putting stuff into a string to be synced? it need to be sent all at one go
I was halfway through making my own script before I realized VRChat has it on the VRC world
It looks like the only options are synced variables which slow down performance, or calling specific methods without being able to pass them data.
unfortunate π¦ just need to send like ~40 bytes and my project would be done
could probably send a bunch of stuff at once with a loop
i recently figured out arrays and loops and lemme tell you
How to network sync 'Cloned Object'?
Does anyone know what I'm doing wrong here? I just want it so that if the player is in VR, a certain object appears. I know I'm close, but I think I'm missing a piece. thanks!!
you have nothing STARTing the script
@edgy moss
also you need a branch for true or false outputs if the user is in vr
Bool holds the true or false values
lol I'm so new to all this, forgive me
so how do I start the script? I want this all to happen pretty much as soon as the player spawns
oooh
would Event On Player Joined do it?
Where did udon-general go?
Oh well
When am i getting my TMProUI :l
There is no reason for it to not be here it has identical methods
it just works 10 times better in unity UIs
and has bloody unicode support
Β―_(γ)_/Β―
π‘
is there a node that reverses a bool? one that makes a true untrue, and an untrue true?
for instance, I'm using the node IsPlayerInVr to SetObjectActive. but I want if the player is in VR to set the object INactive
Boolean.UnaryNegation
Its not at all
Unary is the mathematical term for an operation that has a single element as its input
The term for an operation with two inputs (such as Addition) is called Binary
awesome thank you π
Anybody knows how to sync objects (VRC_Pickup) between Quest and PC?
I publish a world to VRchat, but I did not display Mine on my world menu tab
I clicked on the world link to open it and I canβt enter in vrchat, I will enter home
My world is private
is that reason? or Trust level?
errors?
This i think is what you will need. Basically you put this on a udon behavior then when a player joins it grabs their VRCPlayerApi info Checks to see if their vr. If the branch statement sees its true it will show the object. If it does not see that their in vr it will do nothing. Also make sure the game object variable is public so you can set what object you want it to affect.
No problem. I like using udon and like helping other people.
i'm learning a lot about coding through using udon. it's such a great visualizer to better understand how coding works
hello everybody ive recently brought the oculus quest 2, but for some reason it wont let me link it through steam. When i click device it shows the head set but the controllers say OFF even though they are working. Any help would be appreciated thank you
@crystal torrent you'll probably want to ask in #quest-general
How to setActive object Sync ? in SDK3
how does this return?
Networking.LocalPlayer.GetPosition();
the xyz cordinates of the player position on the world
if you meant class your ide should tell you
im not entirely sure
Can someone help me out in here, still a noob in unity but whenever i try to import the SDK3 Worlds package it yeets me this message
whatever i press when it imports the udon has 300+ errors
This page lists the current Unity version you should use when creating content for VRChat, as well as links to the correct version for both Unity Hub and direct downloads. Current Unity Version The current Unity version in use by VRChat is Unity 2018.4.20f1. Unity Hub To install the currently suppo...
does anyone know if udon sharp conflicts with certain shaders? im running into an issue where i am unable to create a U# script after importing some shaders, like poyomi for example.
hey ppl any idea how to fix this?
my sky box is kinda far away so I had to reference my main camera
but it gives me this circular efect
I am not finding a way to remov it
It seems like networking is broken (suddenly?) between PC and Quest
it is leading to the chair bug for example
somone sits down in a chair and gets teleported across the map to another chair, for PC users
or i have a deck with cards that can be shuffled, for PC users they all see the same cards, Quest users see cards consistent wich eachother but not with PC
Or pickup objects, they are synced between users of platforms too but not between PC and Quest
is there a way to resolve this or is this to do with early development phase of Udon?
i am using udon and am getting this compiler error
simplelightprobeplacer doesnt work
the most powerfull world scripting engine ever to exist!
||Debatable||
Will udon ever be coming to quest?
Considering that Udon is built into worlds, I'm pretty sure it's already accessible to Quest users.
it already is working with quest worlds @scarlet lake
although barely apearantly π
Hm - I wonder if your objects are being assigned different network IDs in the two worlds. Do you have different scenes for your PC vs Quest worlds or are you using one for both?
is occlusion culling suported?
@gusty geode Yes
Possible to run a check to see if an object is already enabled, then enable it locally for a late-joiner? I'm having trouble with syncing global objects.
We have a script running that will globally toggle an object on/off but sometimes has issues with late-joiners, and if it gets desynced in networked traffic it breaks.
@urban pivot - are you using a Synced Variable to toggle the object or a Network Event?
Using "SendCustomNetworkEvent", this will fire when a player uses the Button.
We had for backup, something for "ONPlayerJoin" to fire an enable just in case.- But that would also make it hard for the person(s) operating the button to close or open the gate.
if you want something to work for late joiners, use a Synced Variable instead. This way, someone joining in after the fact will have that variable set properly in an OnDeserialization event soon after they join, and can update the object to match.
The way it works is the Owner of the object changes the variable, and everyone else receives the new value in an OnDeserialization event.
Is there a pre existing example inside VRC SDK? - I may be overthinking this.
sure - take a look at the UdonExampleScene and the Readme alongside it. It has multiple examples of using Synced Variables.
Can't you just ask the world owner/master for gamestate in a Start function?
Udon does this automatically for you - that's what the OnDeserialization event is
So if I have variables marked as synchronized, when they are updated on the master's world, it sends an event that calls OnDeserialization on all players?
Basically, yes - (pushes glasses up from nose) -technically, OnDeserialization is called regularly by our underlying network layer when you receive the latest data. You can use the event to either update all objects you don't own based on the latest variable values, or you can check each new value against a local copy that you've made to figure out exactly which value has changed, and only update that object. You should ignore 'Master' for most purposes and think instead about the Owner of a given GameObject, as that isn't necessarily the Master of the instance.
If that's too much information - just use the OnDeserialization event to make any changes you want based on synced variables.
Keep in mind that OnDeserialization doesn't fire on the Owner of the UdonBehaviour, so you'll need that Player to make their change locally.
excuse the messy web. trying to make a graph that toggles a list of objects, disables a list of other objects, and triggers a audio clip all in one go, but I'm a little stuck cause it doesn't work at all. anyone got any advice for what I might be doing wrong?
I'm looking at all the documentation right now.. I would need to have it run a check on every object, then enable it if it finds one previously enabled.
How would I create a "Variable Value" per object? Would this be an int set to 1, or 0?
@lethal isle a couple things - you're only accessing the first index of the array. You need to plug in the index of the for loop into the gameobjet[] get node
Also you're doing getactiveself on the entire array, should be on the specific element within the array
Also you're doing the second for loop inside the first and the audio inside that. You should have a block at the very start so you do one for loop, then the next for loop, then the playoneshot
Thanks for the in depth answer. Does OnDeserialization just tell us that synced variables have been downloaded, so then we reference each synced variable by name when using them in the OnDeserialization function? I'll work on thinking in terms of owners of objects instead of master of the world.
The problem I'm having is one of, I have a script that reads a player name, then assigns them an object. I want this object Enable /Disable to be Globally Synced for Late-Joiners too.
Currently the script will only show the object if you are already in the world, and a player that is on the list joins- both will see it.
But if I join the world first, than another- the last will not receive the Global Toggle. Testing onDeserialization now;
did vrchat just update their servers for udon?
all intel users currently using my video player are reporting very low fps counts and im not sure if a new cache system was implemented or something
nope, nothing like that
ok... something mustve happened avpro's side
that's right - OnDeserialization tells you that there may be new data, though you might have all of it already. When I want something to happen only once, I make a not-synced local version that I can check against the synced one to see when it changes.
the cache is reflowing rapidly now for some reason and idrk how to fix that via udon or U#
and its only intel players, thats the only difference ive picked out from this phenomon
can you point me towards a world where I can reproduce this issue?
ive somehow fixed it. i made a temp script that works when a url is inputed to stop the cache reflowing. so far it is working now
Is there any documentation that describes in detail what synced variables do and their options box that says "none, linear, smooth?"
From what I can guess it is sending variables over the network to other players but I am not sure what the linear and smooth do other than interpreting animation information. I could be wrong about that and it would be nice if this foundational function had something I could reference.
I have no idea what any of this s$%t means but I better find out if I'm making spider lair for quest anytime soon
That's the interpolation mode. You only receive data roughly 5 times per second so that properly determines how it behaves between the frames where it's not getting any updated data. For something like a bool it's not going to do anything, it's just for numbers and vectors
I'm making my first Udon world. I haven't even touched the graph yet. How would I go about setting the gravity? I think with SDK2 it was a player modifier script component you added to VRCWorld. How would it be done in Udon?
there is an example on the VRCWorld prefab included with the SDK
How do I open it?
I assume you mean the UdonBehavior on the VRCWorld prefab is what I want to look at but double clicking it doesn't open it as expected.
Getting a bunch of errors too.
Looks like cinemachine failed to import causing things to break
You can either restart project which should make it import automatically or manually get it from the package manager
By restart project do you mean reload Unity, or start over from scratch?
As in just close unity and reopen
Trying that now...
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)```
Well, it loaded... gonna see if I can open the graph, but right off I get that error.
The Open Udon Graph button still does not appear and when I try to click on the script it says in the inspector that I have to fix any compile errors.
Check your console again, press clear once and show a new screenshot
If you check the VRChat SDK dropdown is the control panel button gone?
Hm... something's wrong, I'm gonna reload it again... There's nothing on the VRC SDK menu.
Try right clicking on the vrcsdk folder and pressing reimport
Well, it's doing something when I reloaded it again... It's processing all my prefabs and this Thry Settings window whatever that is popped up. What is that?
Oh wait it says Thry Shader Editor?
If that popped up that would mean you have poiyomi shaders imported in the project
Ah okay. I do.
But yeah if it popped up everything should function now normally
Okay... It's working, but I don't see a gravity setting and I have no idea how to add one...
I don't really do udon so sadly I can't answer that question from the top of my head
You would need this node though
I think I found it. I assume this is the right way to add the setting. I just clicked on the circle and it brought up a search for me.
Yep that looks about right just gotta define the strength as well like the others have it
It won't let me check the circle... And I assume I need the white wire too?
The white wire is what activates the set
Oh wait... the other circles seem to be set from that pink blob.
The pink blobs are to expose it in the inspector
So that's probably why it's not ticked.
Yeah I thought that might be the case. I feel like gravity ought to be there by default.
Little more important than "strafe speed".
Also good to note that the default strafe speed is 0 currently
(pending vrchat update to fix it to not be 0 by default)
Hmm... Strafing... Is that only used by desktop users? What should it default to?
When strafe is 0 you can't move sideways at all and can only move forwards/backwards
Well that's a serious bug... how is that still in there?
I mean having every Udon wolrd uploaded be broken by default is kinda bad.
Strafe was added only recently
Like I mentioned above momo fixed it already but the fix just needs to wait for a release
Only recently? I'm pretty sure I've been able to strafe all along in VR.
Oh bad phrasing I mean it was added to be changeable by udon
Ah... Still... It's weird to have different walk and run speeds in the first place with an analog stick. I mean how does that even work? Do they divide the analog 0..1 into 0..0.5 and 0.5...1 and not have smooth transition in speed? And one would expect with strafing there would also be walk and run speeds at the least. And really, with that as well I'd expect a single top speed, and then in your animator you would have transitions based on the current speed for your two different animations walking and running.
Hmm haven't really thought about it that much ever
I just usually keep it in line with walking and it hasn't felt much off in my worlds
Do I have to hit compile when I'm done or is that just to check that its okay and will compile properly when uploaded?
If it says OK you should be good but then again I haven't touched udon graphs much at all so not the best person to answer the question
Well thanks for the assistance, I think I'm all set for now, building my world to upload...
@earnest acorn I don't think the open button appears there. You get a button when you have an Udon script on an object like VRCWorld prefab. And maybe you get one when you create a new UDON script?
It's a learning process
Feel free to tag me but is there a way in udon to sample audio so it can affect animation, color, or metrics? I am trying to build a music visualizer and this is a key thing im struggling to find the answer to. Feel free to tag me in reply
how do I make pickups global?
Can enter the private world by my publish?
Always redirect to home
this is my log
Is there any problem?
I update pc, duplicate project and convert to quest, do some manual changes of materials and upload
So same scene but diff project if i can put it that way
does anyone have any clue why I'm getting these errors?
Try manually installing Cinemachine via the package Manager
So i am trying to make a toggle the is operated via a boolean the toggles when ever the object is interacted with. I new to udon so I dont know exactly which nodes to use. I just cant find any info on this on the docs or google.
did some experimenting and got it working. Putting this here for anyone else who has the same issue
Interact toggle without needing SetProgramVariable (I try to avoid it in general if possible)
In all actuality, this is probably more "correct" as setting the bool to the new value before doing anything else is what usually happens.
Forgot to include the branch node heh
Why do you make an entirely different project? I recommend you make any changes you have in the actual scene, then switch to Android and publish.
Is there a built-in way in udon to know if it's running on the PC or Android build? I know a custom variable could probably be set for that... just wondering if something for that is included already...
No, Udon can return Desktop vs VR, you'd need to set your own variable for Windows vs Android.
Thought so. Thanks.
Heres one for udon so i've got a block of branches, and essentially they run checks if a key is pressed on an update (couldn't come up with a way to run the event only if a key is pressed). now it activates the object just fine if it's disabled. However only in desktop does it readjust the rotation, VR doesn't work, i've tried both the way I did for desktop and using tracking data, neither have brought any success, anyone got any ideas?
is it safe to do that? It takes hours for me to convert from Win to Android, i suppose i would have to do that back to windows afterwards as well?
Also i am making separate project because the materials need to be changed for android to standard (lite) shader
oh wow! Must be a big world, never seen it take so long. Yes, you'd need to change back to Windows. There are Unity Assets that cache your library to make this switching quicker. If you file a Canny with your unique setup, we can test out the multiple-projects issue and see if we can reproduce the sync issue.
Hmm, i seem quite a bit stuck is anyone available to answer what they're talking about?
syncing animations work on udon?
How should I be limiting the range on chairs? I can click at least one of these chairs from a mile away in VR
huh, I coulda sworn it had a variable for that.
Just in case anyone answers my earlier question, I split it to a seperate behaviour and used y only, that didn't work, it's because I forgot to call the W variable. works now. π
@scarlet lake if I'm not mistaken you right click on the inspector tab and go into debug mode. From there when you scroll to the Udon Behavior you should see a range option, as well as the option to change the text from Use
π
huh
interesting
you advice is sound and useful, but the number it gives me does not match up with what i get in-game
which is nothing new, but it's always been a desktop exclusive issue afaik
I believe there is a canny open about the topic of VR being able to interact from beyond the specified proximity. Busy atm so I cant confirm directly, but I recall seeing discussion about that somewhere.
CC @placid spear @fiery yoke on above.
I found the Udon docs on collisions, but is there really no way just with Unity's built in physics to have a player collide with, and move an object? https://docs.vrchat.com/docs/player-collisions
Udon has three ways to detect when a Player and an Object Collide - Triggers, Physics, and Particles. Triggers If you want to detect when a player has entered or exited an area, your best bet will be to use the OnPlayerTrigger events. There are three of these: OnPlayerTriggerEnter is called when a ...
I made a world yesterday and I failed to put empty scripts on my pickups and set them to sync, thinking I only needed to add vrc_pickup to them, so every time a player picked up an object and threw it, it was local only... But in some cases, I found players were able to knock around objects remotely as well and I'm not sure how they managed that. Perhaps they bumped into an object which was currently moving? Or had colliders on their hands? I wonder... if the object only needs to be moving for them to interact with it like a physics object and push it around, could I get around this by applying a small force in the direction of their movement to the object when they bump into it to then kick start it into motion?
idk if this is the right channel for it, but I have a question. Do viewpoints differ in sdk2 worlds and udon worlds? I was testing some viewpoints, and with .05 on the Z axis (middle of the model's eyes, sphere clipping halfway into the face) of the descriptor. In an sdk2 world, the viewpoint was a tiny bit further from the face, but enough that it seemed weird. In an udon world, it was perfect, where objects only clipped into the viewpoint when going past the face mesh. Is that just me, or a general udon thing?
I've noticed that my viewpoint does seem to change positions between certain worlds as well, but I never thought to check if that was an Udon related issue or not. I thought it was just due to something that was going on with VRC not necessarily the worlds.
I noticed today in Murder 4, which I assume is an udon world
if im wrong then it complicates the issue more
You can usually double check a world by jumping and then trying to move while in the air. If you float it's more than likely an SDK2 world (even though you can toggle legacy movement through Udon) but if you fall somewhat realistically then it's an SDK3 world
Ope.
but it's Jar so i assume it is udon lol
but regardless it's really weird that it does that
and it's annoying too bc i started mass updating some models (didn't get very far, fortunately) but now idk if i should be using a viewpoint that's perfect in an sdk2 world or sdk3 world
Also, inversely I tried .015 on the Z axis, which is somewhat inside the head, and it's perfect in sdk2
but is too deep into the face in udon
@jaunty schooner you need a udon behavior component, doesnt need a script or graph, but set it to sync position
I don't think the murder games are udon
Theres no real way to tell if a world is sdk2 or udon, for the most part they function the same
@cinder root Are you sure the issue isn't related to the near clip plane setting for the world rather than anything to do with your eye position? You mentioned clipping, which I suppose could be related to eye position, but generally I assume issues with objects near to you being clipped away, such as your hands when using a tiny avatar, are related to the near clip plane for the reference camera being left at the default of 0.03 rather than being set to the minimum of 0.01.
π€ Didn't know that, but maybe
Thanks for telling me that because the sdk2 worlds that my friends and I usually hang out in are some small worlds I made
And most of them don't even use a ref camera so I might actually try and see
2020.12.04 14:11:06 Error - [API] [23, 400, Put, 2] Request Finished with Error!
https://api.vrchat.cloud/api/1/joins?apiKey=JlE5Jldo5Jibnk5O5hTx6XVqsJu4WJ26&organization=vrchat
{{"userId":"usr_cbb68b83-a172-47e8-8902-e7e4adf58b2c", "worldId":"wrld_16522a15-0791-4cb2-b1fe-c98e5d442423:0 "}}
No Exception
{{"error":{{"message":"'0 ' is not a valid instanceId","status_code":400}}}}
2020.12.04 14:11:06 Error - [ApiWorldUpdate] Error posting join:
'0 ' is not a valid instanceId
wrld_16522a15-0791-4cb2-b1fe-c98e5d442423:0
What's wrong?
I can't enter my private world
Can anyone help me?
How are you trying to join it?
https://vrchat.com/i/yemen-cavernouskimmy-e9a1e
this link is my world
I invited my friends to join ,but they can't enter the world too
https://github.com/oneVR/VRWorldToolkit/releases
Could you import this and show me a screenshot of VRWorld Toolkit > World Debugger?
Try turning off future proof publishing by pressing the first auto fix?
Seeing that the build size is only 156 kb that would sound like something is going wrong
so i need to republish world?
Yeah give it a go after doing the auto fix
ok. I will try
Bake your lighting @fiery glen
Y so many not know to bake lighting
I also bet he doesnt have the vrcworld prefab in it
Maybe it doesnt have the scene descriptor thingy tho
I remember having to include the player mods when I first created my world
Well that would have also shown up in the world debugger
You ever have the problem where colliders make you jump less as high
Don't think so? π€
I have a bed with a box collider and when I jump on it, it jumps like half of what I'm supposed to
Are you hitting the ceiling of the room?
Your player collider is always 2 meters tall
Doesn't matter what size your avatar is
The world was made in design for smaller avatars
Vote for my canny if you want it someday not be like that
Idk if that's a good idea, uniformity is kinda nice
Not if you want to use it for world mechanics
Like giant avatars would have issues moving through a door
That's why my post includes having the base value be changeable by udon in addition of it being avatar based
Did you have any luck? I'm heading to bed soon so I'm still available to help for a moment.
I'm at work so I can help all night haha
Is there a certain best time to upload my world to get traction?
I was thinking of uploading friday night
That sounds pretty good
I'm Building the scene now
Gotcha
It take great amount of time after baking light
Seeing that your last build size was 160 kb anything else would take longer to build π
Turning off future proofing makes it go like 2x faster
Also 160kb is concerning especially since the pic shows something haha should be at least a mb
Yep that was my main concern
hi, is there an SDK3 udon graph equivalent to sdk2 VRC_PlayerAudioOverride? i have been searching for hours and have not found anything. I am trying to create a stage area that makes it so all players in audience can hear the person on stage.
@hot oxide Yes it was recently added. Should be under VRCPlayerApi
@fiery yoke how would I go about setting that up? I'm still relatively new to using udon, or scripting for that matter, so i mostly just go off of prefabs
where you would put the audio script component, you put a udon behavior component, then new graph, then create nodes : start > playerapi > whatever option it lets you set
it might be under like audio or something when you search for nodes
also does anyone know if there was something that said to upgrade to the newest version of udon?
idk if i just reimport the sdk or
Just load up the newest UnityPackage to import it and you should be good. Depending on how old your SDK is, you may need to go into an empty scene and delete the VRCSDK and UDON folder before importing the new package.
anyone know how you change the "Use" that you see on a object trigger. I am not having any luck finding how to do it
i am using sdk3
its on the udon behavior there is a field for it you can edit in unity
the udon behavior component that you are using for the trigger it self?
wait no its on the vrc pickup
wait isnt vrc pickup for like say picking up like a beachball?
@crystal osprey When you set a udon script to interact, the component has the "Use" interaction on the udon component from the gameobject
@errant pilot so where do i change the "Use" at
Your udon behavior component in the game object. Id send a screenshot but im not at my computer
where it says inspect at the top, right click it and click debug, then in the udon behavior component it lets you change the text
then change back to inspector @crystal osprey
One message removed from a suspended account.
Check your console afterwards
why can i not talk in game
One message removed from a suspended account.
Well I won't know either if you don't show those errors
One message removed from a suspended account.
That's the error telling you there is an error I would need the see the actual error somewhere up from that
One message removed from a suspended account.
Delete the script specified in the error
One message removed from a suspended account.
hmm is anyone else having a issue with there projects not working right since the SDK update i had gone from 2020 10 28 15 57 to the 2020 11 16 12 43
and made the changes to some toggles and run the test build and the changes are not being applied '
Usually that would mean something is stopping a new build from happening
I would clear your console once try a new build
Then see if any errors show up
Every other time I try and upload one of my worlds, Unity crashes and the SDK seems to kill itself. I have to go through a full "remove all the SDK, restart Unity, reinstall the SDK" process and it's really annoying and time consuming. Has anyone seen this before and know why it may be happening?
It's been popping up lately more, but all you should need to do is right click the vrcsdk folder in unity and press reimport. That seems to be working well from my own testing even just right click reimporting any script should work.
I did actually twig that before removing it this time after remembering that it was a way to fix broken shaders. Still not ideal though, I wonder what makes it only work a single time.
well i am going to try a backup of my build before the updating
apply those new revisions to it and see if it works
hi guys, is there a way to sync material changes with custom event with UDON?
take a look at the UdonExampleScene. The On Mouse Down cube has a program you can use for this called ChangeMaterialOnEvent
Yeah, I had a look at that, but it is local
I am not sure how to sync it even with the players' that joined later
In my experience you'd need a way to index the materials, or whatever changes you need to occur, using primitives that do sync, like a string or int.
Then on the remote client, detect the change and grab the local copy of the material or change based on the index and apply.
All index references needs to be known ahead of time though.
Thanks, ill have a try
Hi, I'm having an issue when trying to upload a world I get NullReferenceException: Object reference not set to an instance of an object
VRCSDK2.RuntimeWorldCreation.Start () as an error. The game builds and tests perfectly but when I try to upload I get this
Nvm i fixed it i had a prefab in the world that had a script
Those missing scripts will get ya, I get that error when I try to open a prefab to edit it
"Cant save missing scripts bla blah"
"the referenced script is missing" headass lol
Yo some1 in vrchat team! I need your help!!! There is someone using a client hacking, changing a crash avatar to all the players and they can't join the game!! I know his name! You guys have to ban him!!!
I'm not sure how I've done it, but it seemed to happen after I dropped the default Udon example movement prefab in (the one that lets you control movement speed and jumping). For some reason I can't move in that world anymore. Your avatar drops a foot or so out the air when it spawns so it's not "locked" in place by a collider or something (there's also no collider in the world there). Any ideas what else could cause that? It's like the controls simply don't respond.
Ah, somehow the variables had been reset to 0, whoops. Solved.
EndLayoutGroup: begin layout group needs to be called first
anyone know wtf this means?
UI Layout Problems. Can usually be ignored. Unless youre doing something with Custom Inspectors.
well i have a graph to toggle in between two different cameras and it was working just fine
then today i was updating a few things, and decided to set a reset phone toggle
and it seems somehow setpositionandrotation broke it
but it doesn't make sense for it to break the graph of a completely different object
these are my errors
ohh
thats probably the UdonGraph code messing up if I had to guess
you probably ran into "unexpected behaviour"
Which is programmerish for "shit we didnt think about that"
so allow manipulation when equiped, how do i change orientation then on mouse and keyboard?
also the building to test is mind numbing, whats the addon to have a live instance that updates as you change things
Also wtf is the w axis on rotation, I can set it in a node but theres no w axis on the object itself
I also fixed the camera being broken issue, I just removed the transform component from a completely different object lol I'm having weird problems
haha cute
Rotations inside most Game engines are expressed with the mathematical construct called "Quaternions" https://en.wikipedia.org/wiki/Quaternion
They are mathematically superior to the alternative "Euler Angles" but more abstract.
You can get the euler angles of a quaternion by calling the .get_eulerAngles method which will you give you a vector3 with the xyz angles from 0 to 360, however understanding what quaternions are and how they work, and why they are being used is a fundamental part of working with rotation in 3D space
I'm guessing to save the initial position and rotation I probably gotta duplicate the object and plug it in with noodles and disable the mesh render of the duplicate huh?
No
You can store the position in a vector variable and the rotation in a quaternion variable
Yeah that part is super confusing thanks tho gives me stuff to read
Now I wish I remember advanced algebra and matrices
You know how we all wondered how any of this will even be used in the real world, now here we are just trying to rotate an object
When trying to use the USharp Video Player, it always throws a "Rate Limited" error on world load, but always works if you try it manually. Given that these should both only try and load the video one single time, any ideas why it errors like that the first time?
what happens if my favorites say i have 25 there but there nothing
@hollow folio I had this issue appear when I was making my video player as well. What I ended up doing was the OnVideoError event, then if the error it sent was of type RateLimited, I simply tried to play the video again.
Good idea. I'll have to learn more about Udon to figure out how to do that π
Ahh, are you using the one that Merlin made? If so, you'll want to ask in his Discord specifically, which is linked on the Github page.
Yeah, it's that one.
Udon counts world load as an attempt to play, so if you play it on world load in code youβll hit rate limit. The workaround is to play video 5s after world load
I'm confused how a single attempt causes the rate limit error though? It tries to play on load which is correct, but shouldn't that just be a single attempt?
World load itself counts as an attempt, so if you play it in Udon, it becomes the second attempt
I have a question. I want to make 2 types of mirror controls
- You can turn on and when you walk away it turns off.
- When you turn on the mirror it set to a time then when it runs out it turns off.
is there a way to use texture animation in udon with sprite sheet
anyone have a script for toggling colliders? ive only figured out how to make a button that toggles the collider on one object. id like to be able to toggle all the colliders on all the chairs and tables in the world with one button.
@mossy sequoia create a gameobject() array variable, put all the root parent objects into the public variable spots, then gameobject() > for loop > gameobject get component > unarynegation > set enabled
The for loop can be confusing, the body noodle goes into set active, and int goes into gameobject() so you know which indexed object its targeting in the loop
And you gotta use get length to get the length of the array and plug that into "end" in the for loop so it knows when end the loop
Fake link, dont click it. Look at how the name of steamcommunity is spelled
@agile pond
Hey Everyone! Im currently working on a world using 3.0 and tho I've learned a lot on my own Id love to have an experienced creator teach me the basics of Udon and help me look over my world to make sure its ready to be uploaded! I've looked over Youtube tutorials till now but would love to actually work with a person if possible. If anyone's interested please let me know! Willing to pay a bit as well if it means ill get some teachings!
Hey, quick question, is there any way to make 2D arrays using Udon?
No Udon does not support multidimensional arrays or jagged arrays. UdonSharp has a work around for jagged arrays, but doing the same thing in the graph is a little convoluted.
I have a trigger with a script that does LocalPlayer.UseAttachedStation, and it is sucking multiple people into the station. I thought Interact was local? If not, is there a way to make it only run for the player that interacted with it?
This channel is for udon specific questions/discussion.
Need some help? Crashing? Not able to get into the app? Please contact our Support Team by creating a ticket at https://help.vrchat.com/new (select "Support" category)
If you need to ask additional questions about accessing your account, try #vrchat-general-2
@scarlet lake I'll check it out
Check spam folder
hey does anyone know why my avatar's skin flickers now when in the camera's view
@flint urchin none any email in spam folder
hey so i wonder if there is a way to have a graph constantly run in the background to save the states that objects are in for future people who load in
You'd probably be better off to just have a script that checks the current state of objects run on user join
the thing is, if i get object active states on start, it'll just get the default values instead of what they were before they entered
i basically gotta share the active state from the instance owner to the new player
Depending on what you're looking to do, on player join have the instance master check the values via custom network event and set a synced array with those values, and have a separate trigger that has those values sync to the new player
i think that might work cause i got a lock script that basically resets the sync
Oh, perfect, yeah, that should do the trick. Then that avoids having it run more than it needs to
is there an instance owner node
I don't think so, but you can check the owner of any object that doesn't have ownership transfer on, as by default the instance master owns everything
i mean is there a node to see if i personally am the instance owner
I use this to check that:
there's isMaster, i wonder if that's it
I tried that, but I couldn't get it to work in my scripts, but that could just be user error on my part
is there a doc that says how it works?
Uhh, probably not
i think its it
My Udon Graph addition node returns null but the two vector3s that are used as input return stuff. Anyone knows why?
i think this might do it for the object onplayerjoined state
how do i know if something like a mirror toggle is set to global or local?
You gotta send it in a customnetworkevent and use a custom event to start your script, kinda like the two nodes in the pic directly above
You name the custom event and use the same name in sendcustomnetworkevent @mossy sequoia
You can then toggle its output to be all or owner
I'm having a problem with object pickup in an SDK3 world.... If I pick up the object it streches all to hell. Every video about objects says to use something called VRC_ObjectSync but this does not show up in SDK3? Any ideas?
oh that pick up object stretching things happened to a friend
what happened was that the object was inside of another object
the one that was trying to move
OH, I think I see what you mean