Create a Working Torch in Udon / VRChat SDK3.0

  Рет қаралды 5,155

PlayerBush001

PlayerBush001

Күн бұрын

Пікірлер: 45
@ayron419
@ayron419 2 жыл бұрын
Random note, but you have a great voice for videos and tutorials. Very clear and crisp audio. Great tutorial too!
@PlayerBush001
@PlayerBush001 2 жыл бұрын
Thanks! Glad your liking the audio setup ^^
@blubariblub6960
@blubariblub6960 2 жыл бұрын
Thanks mate!!! This helped me make so players can unwrap candies in a halloween world i'm making, it's amazing!
@PlayerBush001
@PlayerBush001 2 жыл бұрын
Ooo... that sounds cool! Nice one adapting the script! ^^
@blubariblub6960
@blubariblub6960 2 жыл бұрын
@@PlayerBush001 Thanks! now i'm trying to "duplicate" this script in some candies (like gummies) so the candy appears and the wrapping dissapears (because somehow udon doesn't allow 2 changes on the same graph), this is for candies like gummies where I can just spawn a candy that's bigger than the wrapping (like lollypops, where the candy ball is bigger than the wrapped ball so it looks like it's unwrapped)
@PlayerBush001
@PlayerBush001 2 жыл бұрын
huh... you shouldn't need to at all. Udon is definitely able to do multiple changes on the same graph (do it all the time), unless you toggle off the object containing the script midway through the code (as it would then halt the script). Perhaps look at my video on toggling on and off scripts, where I toggle on one obj, before doing the opposite to another obj. Timestamp is 3;52 (kzbin.info/www/bejne/Z2qrfn2Xfaynp9k) hope that helps ^^
@blubariblub6960
@blubariblub6960 2 жыл бұрын
@@PlayerBush001 Gonna check that, thanks! Also on the meantime I got to a patch solution, instead of making the paper dissapear and candy appear, just the paper dissapear and put the candy inside the paper model (but smaller)
@PlayerBush001
@PlayerBush001 2 жыл бұрын
@@blubariblub6960 That works ^^ You could also use a animator to easily toggle them, and even do a nice transition between the two ^^
@iconoclass
@iconoclass 2 жыл бұрын
In addition if the flashlight has an emissive material then you can make a public material variable for it and after setActive you can use a branch node (that uses the bool newValue) with two SetColor nodes, one that sets _EmissionColor to white and the other that sets it to black. Thanks for the tutorial!
@PlayerBush001
@PlayerBush001 2 жыл бұрын
true true (better than being lazy and just toggling on an emission circle plane XD) Glad you liked it ^^
@UserTM13
@UserTM13 2 жыл бұрын
I love your "AWESOME"
@rodrigopower11
@rodrigopower11 2 жыл бұрын
What a useful tutorial! Amazing man, truly amazing! I was wondering how I could do something like this and now, well... Here I have the way for to it XD. Fantastic!
@PlayerBush001
@PlayerBush001 2 жыл бұрын
Glad you liked it! Was helping someone make a torch for his world, and figured it would be good to make a video on; especially with all the horror maps in vrchat ^^
@Markofka
@Markofka 2 жыл бұрын
Outstanding tutorials
@PlayerBush001
@PlayerBush001 2 жыл бұрын
Glad your liking them ^^
@Cattuccino_
@Cattuccino_ 2 жыл бұрын
I guess last question to ask would be on how to add a simple key system in udon lets say I find two big coins touch them to a chest and it opens up. also again thanks for the videos they help a lot.
@PlayerBush001
@PlayerBush001 2 жыл бұрын
this would be done by having a trigger on the target zone, and then have a 'event, onTriggerEnter', check to see if that object is your target object. If it is, add 1 to an int. also remove 1 from the int 'onTriggerExit'. Then, if the int is > than the target amount, open up the chest. The check could be done with either comparing the gameObject with a public gameObject variable using a 'gameObject.equals' node; or by checking its name with a string variable using either a 'string.equals' node, or a 'string.contains' node. You can get the gameObjects name with a 'gameObject.getName' node. Hope that helps ^^
@Cattuccino_
@Cattuccino_ 2 жыл бұрын
@@PlayerBush001 awesome thanks!!
@KiyokoTheDoll
@KiyokoTheDoll 2 жыл бұрын
yet again another great vid bro keep up the amazing work ur the best ive ever had for a unity teacher UwU
@adamiksgaming9935
@adamiksgaming9935 2 жыл бұрын
Thank you for your time & tutorials. Question why did you not use "send custom network event" when turning it on and off ? Im just trying to understand what method is recemented and why ?
@PlayerBush001
@PlayerBush001 2 жыл бұрын
No worries, glad they help ^^ Sending a custom networked event doesn't account for latecomers, thus the synced variables. If I was concerned about having too many synced variables in a scene, I would do the custom event method
@adamiksgaming9935
@adamiksgaming9935 2 жыл бұрын
@@PlayerBush001 I thought that might be the case. I have been using On player join get master get active self if true set as true for late comers basically. Is this a bad method ?
@PlayerBush001
@PlayerBush001 2 жыл бұрын
No, and it's one less sync variable to have around. There are other cases where a player may miss a networked event, like a quest user going afk and their headset going to sleep, but people kinda expect those. For me and my tutorials, it's honestly just more nodes to explain, and more nodes for people to get wrong
@adamiksgaming9935
@adamiksgaming9935 2 жыл бұрын
@@PlayerBush001 Thank you Player_Bush you have been very helpful. Thanks for your time. Hope to catch you around sometime. I can see us having strong intellectual conversations.
@user_friendly_9388
@user_friendly_9388 2 жыл бұрын
Fantastic tutorial as always I've been searching like crazy for an alternative to the VRC_CombatSystem wich now I guess it doesn't work on SDK3! Is there any way to at least make a Death>Respawn Event on Udon? Because I tried several methods but I can't figure it out... I know there is some because there's plenty of games on VRC made in Udon that has this, but I seem to be unable to find any posts on forums or reddits on how to do it.
@PlayerBush001
@PlayerBush001 2 жыл бұрын
Glad your liking the videos ^^ I did do a video on how to respawn the player, and change their respawn point: kzbin.info/www/bejne/p6GmiK19osuLgas That being said, VRChat did an update since then, and now there is a dedicated node for it 'playerApi, respawn'. Just plug the local player (networking, get local player) into the node and your set! As for the combat system, while it is depreciated, I believe if you set the combat health to zero, you still get the rag-doll effect, so have fun with that! Hope that helps ^^
@jeftheattorney4197
@jeftheattorney4197 2 жыл бұрын
Hey i have a question, how would i make a players screen fade to black such as right before they get teleported to make it seem smoother than an abrupt teleport?
@PlayerBush001
@PlayerBush001 2 жыл бұрын
You want to play make an animation, that goes from clear to dark, then dark to clear. Then you just need to tell the animator to play when teleporting. As for how to make the screen go dark, you want to either use a post processing volume, or a shader. Using a shader has the added benefit of being quest compatible too. Hope that helps ^^
@romulus0011
@romulus0011 Жыл бұрын
Do you have an equivalent version of your script in U# ?
@PlayerBush001
@PlayerBush001 Жыл бұрын
I think this is literally the only practical script I have that I've shown an udon equivalent. My video on how to do the 'on Variable Changed' in udon#, has this script as its example: kzbin.info/www/bejne/hmbUqmqAg5qSfrMsi=xhVxS60l1NNSe77T
@H3Xiii
@H3Xiii 2 жыл бұрын
hello, i am trying to attach the torch to the player when they pick it up so they dont have to keep holding it im not sure how to go about this, please help.
@PlayerBush001
@PlayerBush001 2 жыл бұрын
Hmmm... When it comes to the best method, that will depend on your world and your use case. However, for simplicity sake, I think the best method would be to create a player follower object from my obj follower script (last version shown), and name the torch a child of it. Then you just need to add to the torch script that 'event, onOwnershipTransfer', change the parent owner to be the same (transform, parent - - >> transform, gameobject - - >> networking, set owner (networking, get owner)). Then you also want to create a bool on the follower script, that says whether or not it follows you. I would it when you turn on the torch, it also makes the player follower follow you. You would also also want to make it so that if the player follower owner disconnected (event, onPlayerLeft (playerApi) - - >> playerApi, equals (networking, isOwner) ) , then make it so the player follower bool and torch bool disable. Not the easiest thing to discribe and code, but hopefully this helps ^^
@bhoffman1967
@bhoffman1967 5 ай бұрын
i see this is a world component. I don't see this as being an asset that can be attached to a Quest compatible avatar, correct?
@PlayerBush001
@PlayerBush001 5 ай бұрын
Not on an avatar no. World and avatar creation are quite different in how they are setup. I'm not very knowledgeable about the former
@cyberstar251
@cyberstar251 2 жыл бұрын
can this be added directly to an avatar using this same trick?
@PlayerBush001
@PlayerBush001 2 жыл бұрын
Nope. Unfortunately, avatars can't use udon. Instead, to get whether or not the trigger has been pulled, I believe you need to add the gesture parameter name to the fx animator, and then toggle it on when the corresponding gesture is detected. I would recommend looking at KZbin channels that are more dedicated to avatars. Ones like sippbox and the likes
@coottai3343
@coottai3343 2 жыл бұрын
is there a way to make it for the player view so you dont have to hold it. it just attaches to the head of our player
@PlayerBush001
@PlayerBush001 2 жыл бұрын
This is a difficult question to answer simply. It honestly depends on what you want. If you just want a light that follows the player's head, then using my 'player follower' tutorial, you can make an object follow the player; and with using "playerapi, (head) get tracking data' --> 'playerApiTrackingData, get position/rotation" you can get an object that follows the player's head. Then you can just add light as a child of that object, and offset it so it doesn't clip with the player's head. This works (on a basic level) well locally, but you will run into heaps of problems expanding upon this. Some problems being.. when does a player have a light? This could be a simple 'click this object makes light active'. If you need every player to have one and everyone can see each others, how will you make it so that everyone gets a different light object? Perhaps cyanlaser's object pool will be needed How will a player interact with a light that is on their head? Aka: how will the player take off the light if that is all possible? Perhaps when they hit their controller trigger when their 'tracking data(Left Hand) is x distance from the tracking data (head), but then you still need to code in exceptions for desktop players. What about small avatars? Will they just have to not use their trigger, or force them to switch avatars? There are a bunch of issues that you would have to work around. The approach I would take would differ depending on the map I'm making, as you can choose the method that can be best work around in the map design. Sorry for this not really being an answer, and kinda ranty, but I hope this shed some light on some things to consider ^^
@andrechunbo
@andrechunbo 2 жыл бұрын
This is not quest compatible, correct?
@PlayerBush001
@PlayerBush001 2 жыл бұрын
It is quest compatible. Though the performance hit from having many torches on at once will be more noticeable on quest ^^
@greykenny
@greykenny 2 жыл бұрын
Instead a light how about sound?
@PlayerBush001
@PlayerBush001 2 жыл бұрын
Not much would change. There are two methods for this. The first (kinda hacky) way of doing this would be to just create an empty gameObject with an audioSource component on it, with the setting 'play on awake' set to true. Then when the object gets made active it will start playing, and it will stop if the object is deactive. The other, cleaner way of doing it would be to replace the gameObject variable with an audioSource variable. Then, using the bool's 'event, onVariableChange' node, instead of putting the bool into a 'gameObject, set active' node, we will instead want to put the bool into a branch node. Then, if the bool = true we will want it to go into an 'audioSource, play' node, and if it = false we want it to go into an 'audioSource, Stop' node instead Hope that helps ^^
@greykenny
@greykenny 2 жыл бұрын
@@PlayerBush001 thank you so much!! You're helped me alot to do udon scripts every world I have thanks to your easy to follow tutorials!
@jairous8157
@jairous8157 2 жыл бұрын
If "sendChange" is selected, the flashlight will not work. I recommend uncheck this option.
@PlayerBush001
@PlayerBush001 2 жыл бұрын
I think you missed what is actually going on. The send change tickbox NEEDS to be checkmarked for it to call the property instead of the variable, otherwise it won't call the 'onVariableChange' event. If I were to guess what you did, I would assume you checkmarked the 'sendchange' tickbox last, which means it didn't autocompile, as textboxes and stuff on nodes don't force the code to recompile. Then you play tested it and it didn't work, because the last time it compiled, the tickbox was off. Then you remade a node or two trying to debug the code, causing it to recompile, before finally unticking 'sendchange' and retesting. Therefore the last time it compiled, it had 'sendchange' set to active, so it worked. Try hitting the 'compile' button at the top right, and then see if the code still works with send changed disabled.
Create an Automatic Door - Udon / VRChat SDK3.0
17:00
PlayerBush001
Рет қаралды 8 М.
Create an Admin / VIP Only Room - Udon / VRChat SDK3.0
6:35
PlayerBush001
Рет қаралды 13 М.
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
Simple Clickable Door - Udon / VRChat Scripting SDK3.0
13:16
PlayerBush001
Рет қаралды 3,7 М.
How to Make Your Own VRChat World! SDK3, Udon | Unity Tutorial
16:51
Eternally Sami
Рет қаралды 270 М.
3 Hours vs. 3 Years of Blender
17:44
Isto Inc.
Рет қаралды 6 МЛН
VRChat Avatar Tutorial - Contact Toggles (Grabbing Objects off your Avatar)
5:43
How To Make A Particle Gun - VRChat Udon 2023
16:34
myneighborswifi
Рет қаралды 4,5 М.
Create a Lock and Key to Open a Door - Udon / VRChat SDK3.0
23:09
PlayerBush001
Рет қаралды 4,4 М.
VRChat | Neon Lighting & Bloom Effect
6:37
VRCMacki
Рет қаралды 23 М.
VRChat Udon - Building a Networked Slider
18:09
VRChat
Рет қаралды 10 М.
How to Teleport a Player - Udon / VRChat SDK3.0
4:02
PlayerBush001
Рет қаралды 36 М.
How to Make a Lockable Door in Udon / VRChat SDK3.0
16:42
PlayerBush001
Рет қаралды 6 М.