THANK YOU. I'm doing my masters thesis on Project Management in a virtual space using only hand tracking, and I needed to be able to write on sticky notes in VR, and was freaking out that I wouldn't be able to do it before testing. This tutorial literally saves my paper. So again, thanks from the bottom of my heart.
Not sure why I don't have Enumerable as an option. At 11:30 in video. Using Hurricane VR. Only have IEnumerable as an option with no .Repeat. Solved from discord member. Add "using System.Linq;" to start of script
100% true. But I like having answer on youtube also. Because much easier for me to find again if I have the same problem in the future. Thanks for all your work.
Your tutorials are SO good! I can't believe you don't have tons more subs. You've inspired me to get back into VR programming after a few years break! Thank you!
For everyone that's having the jittery marker issue, first check and make sure that the handle and marker tip transforms are reset to zero so they are in the same position as the marker object ( with the exception of the tip which has to be moved along the y axis to be at the end of the handle). Another thing, is if you have a character controller on your player, that will cause the marker to jitter when it hits the capsule collider. I know adding one wasn't in the vid, but I wanted to interact with objects so I added one myself, and it caused problems so it's worth mentioning.
Any idea how to make the whiteboard grabbable so it can be moved around? I tried adding a XR grab interactable component and rigidbody, but for some reason the markers then don't write on the whiteboard.
@JustinPBarnett I followed the instruction in this video and it worked perfectly fine. However, When I add a material with a texture like the outline of a picture to the canvas and I enter playmode, the canvas automatically turns back to being blank. Any ideas on how I can make this work?
Thanks Justin, you are always my teacher! I tried your code, but I find that the plan of "setPixels() + Apply()" are too slow especially when I use a big texture size.And it get worst when I made a blackboard eraser in this way-- I have to use many small square to approximate the shape of blackboard eraser Now I find a way to improve it that we can send an extra "trial texture" to a shaderGraph, then mix it with original texture, and the way to draw the trial texture is using the `rendertexture` and `Graphics.DrawTexture`. After that, almost all the calculation happened in GPU, I finally get a fps improvement for nearly 300%!
@@emirhanyilmaz9695 firstly you can see this video: th-cam.com/video/ftCyZ7F5q9E/w-d-xo.html this video is about a "snow trail”effect,it create the "trial texture" using VFX system, but it still not fast enough. I change the method in this video on how to create the "trial texture" by create a `RenderTexture` and call the `Graphics.DrawTexture()` to draw a small pen texture(a sample penSize*penSize texture created in runtime) on the `RenderTexture` when the pen hit the board----instead of setPixels() and Apply()
Another thing you could do is calculate the distance between last pos and current pos, and scale the number of interpolations with this value. Otherwise, you're doing 100 steps regardless of the distance between frames.
Subscribed simply because you are a fellow Rider user :D Great tutorial by the way - it has helped me understand the logic behind realtime painting for my own project. Thank you :)
great video. suppose I have a multiple amount of whiteboards in the world would I have to attach this script to every single whiteboard in order for the marker to draw on them? What would be the easiest way to do this?
@@fernandocgi3874 Hi! How did you do this? When i tried to make an eraser (basically by making a marker with a color set to the color of the board) it didn't come out right. Even if both materials were the exact same (ex. pure white), the eraser always acts like a highlighter, showing up brighter than the board (maybe because it doesn't obey shadows? Unsure.
Hi my marker is all jittery when I pick it up and it still shakes when I try to draw on the whiteboard with it. I have the lines of code for freeze rotation in place, what else could possibly be the issue?
@@JustinPBarnett thanks I’ll try that. I ended up just ditching the marker all together and made it so that it drew when your hand raycast hit the whiteboard and you were holding the trigger, made things a lot easier
Hey man, thanks a lot for this! Could you possibly give me a quick idea on how to make the drawing only apply to the surface in front, and not to both sides of the object? (I wanted to be able to paint a 3d object, like a vase)
very informative tutorial, can anybody give me a direction as to where I should look or how to go on about making a circle instead of 5x5 squares from marker
did you get it?I still need help because i figured out how to do the circle but i'm having problem with setting the background color for the corners of che square that wraps the Circle
Whenever the marker touches the board, it bounces around like crazy(it also jitters a little when I grab it), so I cannot draw it properly, any suggestion for solving the problem? Thanks.
@@JustinPBarnett Hi everyone that's don't really solve the problem.. Have you got any other idea? is there something to do about the physic of the pen?
Another great tutorial. I was wondering how to get rid of those red pointers linked to hands and swap hands with some nice prefabs. Would it be simply add hands as prefabs to left and hands controllers ,or is it something more tricky to set up. Thanks
Nope that's the easy way to do it! You can even set up a trigger to close/open the hands there too! To prevent the pointers from showing, just change the valid/invalid colors to transparent in the XR Line Visual
Sorry, I got one trouble when I type the code which that I cannot find "Enumerable.Repeat". As when I put the cs folder into unity, it shown error. Can I get any help here? Thanks
Thanks Justin! Just wondering if you would make a quick video just explaining how to setup Hurricane VR and Hexabody VR? I bought both and got disappointed when I realized that it wasn't so simple as clicking a button to setup😂
Do you want to set Hurricane VR up for this or just in general? For this it seems to work. Using Hurricane VR and Final IK integrated. If having a problem setting up Hurricane VR the discord for it is great. Lots of help there and a few videos.
Excellent video! Any chance you can provide a reference to the classroom scene featured in the video? Looking for free assets to use to teach a college course. TIA.
At the beginning of the code what is used? it should be like ''' using System.Collections; using System.Collections.Generic; using UnityEngine; ''' and what else?
Cant get the code on the marker to work, using ms visual basic 2019 and its throwing up a bunch of errors ( enumerable/lastTouchPos/-lastTouchFrame/whitebord does not exist in the current context) should i be using a different editor for the script? Any help would be great as I’m an absolute beginner in coding
Hello sir i somehow manage to write the code now i am having this error Assets\Scripts\WhiteboardMarker.cs(6,14): error CS0234: The type or namespace name 'Serializable' does not exist in the namespace 'System' (are you missing an assembly reference?)
Thank you! This video was amazing! :D I am rather new to coding, so I hope someone in the comments will be able to help. I want to add a looping sound effect that will play whenever the marker touches the whiteboard, and stops when it is not, but I am having trouble finding the right place to apply it to the code. Any insights would be really helpful!
Hello Justin, Thank you for the informative tutorials. Just wondering: Would it be OK if I used the tutorials' code base on your channel for a University project? I won't be receiving any commission or profit from the project.
Hi! Thank you so much for the tutorial, it is very helpful. I have a question, how do you move the marker when testing the game in Unity? My object will not move..😅 Thank you!
Hi Justin, i am happy your out here doing this. i get this error what ever i do , can you help please. Assets\Whiteboard\Scripts\Marker.cs(22,19): error CS0103: The name 'Enumerable' does not exist in the current context. thanks
My marker is still trying to change its rotation if i push it harder against the whiteboard. I have transform.rotation = _lastTouchRot; and _lastTouchRot = transform.rotation; . Any ideas why my marker is still trying to bend and rotate, and not stay at its current rotation?
Nope. I abandoned the project. I was working on educational projects (like virtual learning classesrooms) for a while. But now I'm working on a fun VR video game project.@@gracereilly500
Hey man, not sure if you read these but worth a shot. Currently trying to navigate the new XR Input system and I gotta say. It is fucking me up. It seems pretty simple to set up normal functions that are included. But trying to create unique functions seems so difficult. I am curently just trying to transfer some old code I had from a SteamVR game that used GetStateDown and GetStateUp and I have no clue how to just check for trigger pressed and trigger released on this XR input system. It is really frustrating the hell out of me.
Hi! thank you for your great tutorial. But, unfortunately, I can only draw a diagonal, straight line with the marker. Does anyone have a same problem like me? I follow the exact same script what Justin wrote, but can't draw it properly.
I had that same problem...it was because I had different capitalization on the name of the WhiteBoard.cs .... and followed Justin's code with the 'B' in Whiteboard being lower case.
Hey Justin, this is working great for me, thanks a lot! I still have a weird issue though, maybe it's a quick fix: On my Markers Tip, when I try to draw something on the whiteboard, only one edge of the tip can actually draw, the others won't do anything. Kinda hard to explain, it's like it can only draw with the bottom side of the tip. The one edge on the tip, that is working also slightly clips into the whiteboard - the other edges don't do that. I did try to adjust the colliders on the tip, but it didn't help. ^^
On the line 'if (Physics.Raycast(_tip.transform.position, transform.up, out _touch, _tipHeight))', try change the 'transform.up' to 'transform.forward' or 'transform.right' (or rotate the tip)
@@sneakyfox03 It took me a while but I finally implemented your fix and yeah you're right. The problem was that my marker was rotated and that lead to problems with the actual drawing so I could fix it by just rotating the marker! :D Thank you :)
@@sneakyfox03 Just wanted to say thanks. This helped resolve my issue with the marker not drawing except when a specific corner was touching the whiteboard too!
I ran into this issue too. In my case, it was because I was using my own marker model which threw things off. The pen drawing before touching the whiteboard was due to the ray cast being longer than the model's tip height. The length of the ray cast is set by the length of the tip in this line: _tipHeight = _tip.localScale.y; This works in the tutorial because Justin created the maker tip from a 1x1x1 cube and then scaled it down to 0.05. So when the script is grabbing the local scale, it creates a ray cast that's only 0.05 meters/units long. I modeled my own marker and then froze all the transforms, so my local scale was 1. This meant that the ray cast was being thrown a full meter in front of the marker. Oops. To fix this, the _tipHeight needs to equal the actual size of the tip. Which you can do by either hard coding in the length of the tip, if you know it (or stumble on it by trial and error). In my case, that would have been: _tipHeight = 0.012f; Or better yet, use the mesh collider on the tip to get the length: _tipHeight = _tip.GetComponent().bounds.size.y; Since my pivot was in the center rather than the bottom of the tip, this still cast a little too far in front. To compensate, divide by 2 to get the distance from the center to front edge of the tip: _tipHeight = _tip.GetComponent().bounds.size.y / 2; That did it for me. Don't know how much help it is to you 9 months later, but there it is. And thank you Justin for this and all of your other great tutorial! Much appreciated!
@@JustinPBarnett Ever since Half Life: Alyx, I KNOW you've imagined playing around with a whiteboard in your games. Well today is the day! In this tutorial I'll show you how to set up whiteboards and markers using Unity VR. (This will work for any Unity VR framework too!) // 🦸♀️ GET THE SOURCE PROJECT (by supporting me on Patreon!) www.patreon.com/posts/58770028 // 👋 JOIN THE DISCORD discord.gg/6mzMQx5VKk // 📺 WATCH NEXT How to Make a VR Game: th-cam.com/video/yxMzAw2Sg5w/w-d-xo.html How to Become a VR Developer: th-cam.com/video/oqXBY51KP5A/w-d-xo.html How to Set Up your Oculus Quest 2: th-cam.com/video/yvtSvMECgbw/w-d-xo.html How to Use Unity's New Input System: th-cam.com/video/SAij67HrgAM/w-d-xo.html How to Set Up Procedural Inverse Kinematics: th-cam.com/video/MYOjQICbd8I/w-d-xo.html // 🛠 MY FAVORITE UNITY VR ASSETS Best All-Around VR Framework: assetstore.unity.com/packages... Best Procedural Hands: assetstore.unity.com/packages... Best Player Controller for VR: assetstore.unity.com/packages... Best VR Hand Models: assetstore.unity.com/packages... Best UI for VR: assetstore.unity.com/packages... // 🥽 MY VR HEADSETS Oculus Quest 2: www.oculus.com/referrals/link... Valve Index: store.steampowered.com/valvei... HP Reverb G2 Omnicept Edition: www.hp.com/us-en/vr/reverb-vr... // 🎥 VIDEO GEAR USED Camera: amzn.to/38V2N8f Light: amzn.to/38Wwvd0 Mic: amzn.to/3sCq7Q4 🔔 And make sure you subscribe to my channel! th-cam.com/users/JustinPBarn... DISCLAIMER: Links included in this description might be affiliate links. If you purchase a product or service with the links that I provide I may receive a small commission. There is no additional charge to you! Thank you for supporting me so I can continue to provide you with free content each week! Sharing VR tips to help you create that Virtual Reality game faster than you thought possible!
@@mtalhakhalid1679 All the code is written out in the video for you to copy yourself, but if you would rather just download the source project you can get it here! www.patreon.com/posts/58770028
Great tut! I changed the raycast a bit to allow the full height of the tip to be used to draw, otherwise inserting the tip past the midpoint would not result in a raycast hit: Physics.Raycast(_tip.position - transform.up * _tipHeight, transform.up, out _touch, _tipHeight * 2);
the marker script has some incompatible code if written in visual studio. I am unable to do Enumerable.repeat, so i tried IEnumerable.repeat, but repeat won't work because there is no contained definition for repeat, apparently.
Using ( _whiteboard.texture.Apply(); ) is very expensive and causes my 200FPS scene to drop down to 28FPS. Really bad for VR! Are there better methods to get the same result?
Download the Project (for FREE): www.vrcreators.io/codedownloads
This link is not working. Can have the latest link?
@@SahithNayudu same here
@@soursdeyny1687 yep.. Waiting
can i have the lastest link , the link is not working
THANK YOU.
I'm doing my masters thesis on Project Management in a virtual space using only hand tracking, and I needed to be able to write on sticky notes in VR, and was freaking out that I wouldn't be able to do it before testing. This tutorial literally saves my paper.
So again, thanks from the bottom of my heart.
Not sure why I don't have Enumerable as an option. At 11:30 in video. Using Hurricane VR. Only have IEnumerable as an option with no .Repeat.
Solved from discord member. Add "using System.Linq;" to start of script
Glad you got it fixed! Discord really is the way to go if you have questions
100% true. But I like having answer on youtube also. Because much easier for me to find again if I have the same problem in the future.
Thanks for all your work.
@@neilfosteronly yoo, you saved me with this comment , much appreciated
Thanks tons! You got me working.
Great ! Thanks
Your tutorials are SO good! I can't believe you don't have tons more subs. You've inspired me to get back into VR programming after a few years break! Thank you!
Glad you like them!
I was just about to dive into working this out myself, looking forward to seeing how it's done!
Sweet!
For everyone that's having the jittery marker issue, first check and make sure that the handle and marker tip transforms are reset to zero so they are in the same position as the marker object ( with the exception of the tip which has to be moved along the y axis to be at the end of the handle). Another thing, is if you have a character controller on your player, that will cause the marker to jitter when it hits the capsule collider. I know adding one wasn't in the vid, but I wanted to interact with objects so I added one myself, and it caused problems so it's worth mentioning.
Thanks!
amazing, thanks Justin!!. Could you please make a video on how to draw in 3D space please, I would really appreciate it
Great suggestion! That'd be super cool
@@JustinPBarnett I would like this, too...thanks for all the great toots
"And we'll change all these wives into exes" - Justin P Barnett @ 17:57
omg 😂
So appreciative of all the VR tutorials you've put out. Always super helpful stuff you can't find many other places!
Glad you like them!
Any idea how to make the whiteboard grabbable so it can be moved around? I tried adding a XR grab interactable component and rigidbody, but for some reason the markers then don't write on the whiteboard.
Love watching your videos - you explain everything so well. I wasn’t even thinking about making a whiteboard but I just love learning from you!
Thanks so much! 😊
@JustinPBarnett I followed the instruction in this video and it worked perfectly fine. However, When I add a material with a texture like the outline of a picture to the canvas and I enter playmode, the canvas automatically turns back to being blank. Any ideas on how I can make this work?
100th like! You have helped me sooo much in VR game development, thanks so much!
Glad to help!
Thanks Justin, you are always my teacher! I tried your code, but I find that the plan of "setPixels() + Apply()" are too slow especially when I use a big texture size.And it get worst when I made a blackboard eraser in this way--
I have to use many small square to approximate the shape of blackboard eraser Now I find a way to improve it that we can send an extra
"trial texture" to a shaderGraph, then mix it with original texture, and the way to draw the trial texture is using the `rendertexture` and `Graphics.DrawTexture`. After that, almost all the calculation
happened in GPU, I finally get a fps improvement for nearly 300%!
Hi, can you give more detail about this technic?
@@emirhanyilmaz9695 firstly you can see this video: th-cam.com/video/ftCyZ7F5q9E/w-d-xo.html
this video is about a "snow trail”effect,it create the "trial texture" using VFX system, but it still not fast enough.
I change the method in this video on how to create the "trial texture" by create a `RenderTexture` and call the `Graphics.DrawTexture()` to draw a small pen texture(a sample penSize*penSize texture created in runtime) on the `RenderTexture` when the pen hit the board----instead of setPixels() and Apply()
@@Lachesis_steven thanks bro
Another thing you could do is calculate the distance between last pos and current pos, and scale the number of interpolations with this value. Otherwise, you're doing 100 steps regardless of the distance between frames.
Yea that’s a great tip to increase performance
Good timing, need this for a project
Awesome! Hope it answers all your questions
not seen your channel in a while congrats on all the new subs :)
Hey, thanks!
Hi Justin, thank you for this tutorial, exactly what I was looking for!
Subscribed simply because you are a fellow Rider user :D Great tutorial by the way - it has helped me understand the logic behind realtime painting for my own project. Thank you :)
At 11:22 enumerable doesn’t work anymore at fixes? Edit I fixed it by using system.linq in the beginning of the script
Glad you got it working! Yea those using statements are sneaky sometimes
Such an amazing channel you got here love it!!!
Thanks so much!
Thank you so much for this amazing tutorial, it was really perfect
This guy is simply amazing!
Thank you! 🙏
great video. suppose I have a multiple amount of whiteboards in the world would I have to attach this script to every single whiteboard in order for the marker to draw on them? What would be the easiest way to do this?
nice video man, thx for new information and thx for your previous videos, they helped me in my current work.
Glad to hear it!
Good job babe!❤️
Thanks Lovie!! ♥
Great video Justin!
Thanks!
Thank you Justin for your great work
My pleasure!
Awesome this is going to be a great starting point !
I recently had the idea to make a VR graffiti wall :D
Go for it!
This is super cool! Great job!
Thank you! Cheers!
@@JustinPBarnett I especially like the anti-gravity pen 😀. Call it a feature 😂
@@brianbarnett208 😂😂😂 haha yea that surprised me
This was extremely helpful and cool!! Thank you so much!
Awesome video! I hope you dont forget to make the erase part!
you got it?
@ Kinda, im not rly an dev im just a designer coding for hobby heh
@@fernandocgi3874 Hi! How did you do this? When i tried to make an eraser (basically by making a marker with a color set to the color of the board) it didn't come out right. Even if both materials were the exact same (ex. pure white), the eraser always acts like a highlighter, showing up brighter than the board (maybe because it doesn't obey shadows? Unsure.
@Lexi Henrion tô be honest I don't remember what I did lol, the client dint like the idea so I discarded
OMG!! really amazing this video tutorial!!! Thanks you very much!!! =)
Yey! I had been wondering when the next one was coming. Any word on a full tutorial packaged I mentioned before?
Not yet! Soon hopefully
your tutorials are very helpful, thanks for helping my game development process.
You're so welcome!
Hi my marker is all jittery when I pick it up and it still shakes when I try to draw on the whiteboard with it. I have the lines of code for freeze rotation in place, what else could possibly be the issue?
Try checking the "enable smooth position/rotation" on the pen grab interactable
@@JustinPBarnett thanks I’ll try that. I ended up just ditching the marker all together and made it so that it drew when your hand raycast hit the whiteboard and you were holding the trigger, made things a lot easier
@@mwsx1000 hi I'm having your same issue.. could you help me?
I added a comment on this video that may help
Hey man, thanks a lot for this!
Could you possibly give me a quick idea on how to make the drawing only apply to the surface in front, and not to both sides of the object? (I wanted to be able to paint a 3d object, like a vase)
As long as your texture doesn’t repeat you’re fine and it’ll only show on the place you draw!
Why my pencil passthrough the plane(page ) while writting, i am using virtual hands for grabbing the pencil and oculus integration
very informative tutorial, can anybody give me a direction as to where I should look or how to go on about making a circle instead of 5x5 squares from marker
did you get it?I still need help because i figured out how to do the circle but i'm having problem with setting the background color for the corners of che square that wraps the Circle
Whenever the marker touches the board, it bounces around like crazy(it also jitters a little when I grab it), so I cannot draw it properly, any suggestion for solving the problem? Thanks.
There's a "smooth position/rotation" checkboxes on the grab intractable component. Check that and see if it helps
@@JustinPBarnett Hi everyone that's don't really solve the problem.. Have you got any other idea? is there something to do about the physic of the pen?
@@JustinPBarnett Didnt solve the problem too, maybe there can be another approach except smooth position/rotation checkboxes?
@@flashp0ke join the discord and we’ll help you troubleshoot!
I added a comment on this video that may help
Another great tutorial. I was wondering how to get rid of those red pointers linked to hands and swap hands with some nice prefabs. Would it be simply add hands as prefabs to left and hands controllers ,or is it something more tricky to set up. Thanks
Nope that's the easy way to do it! You can even set up a trigger to close/open the hands there too! To prevent the pointers from showing, just change the valid/invalid colors to transparent in the XR Line Visual
Sorry, I got one trouble when I type the code which that I cannot find "Enumerable.Repeat". As when I put the cs folder into unity, it shown error. Can I get any help here? Thanks
how to erase what is written?
Thanks Justin! Just wondering if you would make a quick video just explaining how to setup Hurricane VR and Hexabody VR? I bought both and got disappointed when I realized that it wasn't so simple as clicking a button to setup😂
Yea! I'm planning on doing that soon
Do you want to set Hurricane VR up for this or just in general? For this it seems to work. Using Hurricane VR and Final IK integrated. If having a problem setting up Hurricane VR the discord for it is great. Lots of help there and a few videos.
Really nice!
Thanks!
Excellent video! Any chance you can provide a reference to the classroom scene featured in the video? Looking for free assets to use to teach a college course. TIA.
At the beginning of the code what is used?
it should be like
'''
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
'''
and what else?
Yes that's what you start out with!
I had to add "using System.Linq" to get enumerable to work
Can you Write on 3D Models with These scripts or does it Need to be a 2D Plane „whiteboard“?
It'll work on 3D objects! You just need to make sure there are no repeating textures or else you'll draw in multiple places
@@JustinPBarnett thanks ill Test it
Cant get the code on the marker to work, using ms visual basic 2019 and its throwing up a bunch of errors ( enumerable/lastTouchPos/-lastTouchFrame/whitebord does not exist in the current context) should i be using a different editor for the script? Any help would be great as I’m an absolute beginner in coding
Join the discord if you're still having issues and we can help you troubleshoot!
Hello sir i somehow manage to write the code now i am having this error Assets\Scripts\WhiteboardMarker.cs(6,14): error CS0234: The type or namespace name 'Serializable' does not exist in the namespace 'System' (are you missing an assembly reference?)
You need to add a "using ..." statement at the top of your code!
What unity version you recommend for long term vr projects?
Any that are listed as LTS (Long Term Support)!
Could you do a video of hand animation and grab video
I have one about hand animations and another about physics grabbing!
This tutorial bring you to performance issued at the end. but however thank you.
Yea definitely not the most optimized 😅
my marker starts rotating once it collides with the whiteboard...how to fix this
bro you are amazzzing
Haha thanks!
Thank you! This video was amazing! :D
I am rather new to coding, so I hope someone in the comments will be able to help. I want to add a looping sound effect that will play whenever the marker touches the whiteboard, and stops when it is not, but I am having trouble finding the right place to apply it to the code. Any insights would be really helpful!
IS there anyone have problem with a newer unity version , i followed the instruction step by step but it didn't work
Hello Justin,
Thank you for the informative tutorials.
Just wondering: Would it be OK if I used the tutorials' code base on your channel for a University project? I won't be receiving any commission or profit from the project.
Go ahead!
Is there a way to be able to draw on an existing texture? I want my players to trace something but the new texture in the script just wipes it
Were you able to solve this? I am going through the same issue
Sorry I did not, no :( @@ugochukwunwankiti6030
Hi! Thank you so much for the tutorial, it is very helpful. I have a question, how do you move the marker when testing the game in Unity? My object will not move..😅 Thank you!
changed to scene mode then select the mode tool then move the marker
Hi Justin, i am happy your out here doing this.
i get this error what ever i do , can you help please.
Assets\Whiteboard\Scripts\Marker.cs(22,19): error CS0103: The name 'Enumerable' does not exist in the current context.
thanks
add "using System.Linq" in the imports at the top of the code
My marker is still trying to change its rotation if i push it harder against the whiteboard. I have transform.rotation = _lastTouchRot; and _lastTouchRot = transform.rotation; . Any ideas why my marker is still trying to bend and rotate, and not stay at its current rotation?
Did you figure this issue out, I am currently having the same issue thank you!!
Nope. I abandoned the project. I was working on educational projects (like virtual learning classesrooms) for a while. But now I'm working on a fun VR video game project.@@gracereilly500
Can you make a tutorial for making a VR computer? (Like the Job Simulator computer)
That's a cool idea!
@@JustinPBarnett I've been really wanting to know how to do that. I'm not sure how though
Justin what software do you user for the image in the frame thing?
Hey man, not sure if you read these but worth a shot. Currently trying to navigate the new XR Input system and I gotta say. It is fucking me up. It seems pretty simple to set up normal functions that are included. But trying to create unique functions seems so difficult. I am curently just trying to transfer some old code I had from a SteamVR game that used GetStateDown and GetStateUp and I have no clue how to just check for trigger pressed and trigger released on this XR input system. It is really frustrating the hell out of me.
I have a videos specific to the new input system! And you can always join the discord for a more specific technical question
Great tutorial
Thank you!
Open Xr crashes my project EVERYTIME, tried on multiple different versions too, any clue why??
Huh that's odd. Make sure your packages are updated. They recently updated to a new version
When you did hand controller animation code it didn't work for me I didn't see the things on your c# show up
There wasn't any hand controller animation code in this tutorial
When you did the starting a vr game video with hand animation
Please upload one, how to use ML in unity
Oh that's a huge topic 😳 not quite my niche yet
Hi Justin can i make this without VR set up ?
Sure! The concepts would apply to a 2D/3D game. Just the interactions are different in VR
Thanks man❤❤
Hi! thank you for your great tutorial. But, unfortunately, I can only draw a diagonal, straight line with the marker. Does anyone have a same problem like me? I follow the exact same script what Justin wrote, but can't draw it properly.
Join the discord if you're still having issues and we can help you troubleshoot!
The WhiteboardMarker script gave me an error, because there's a type or namespace called "Whiteboard"(it is when we call all the variables)
Did you by chance rename the script and forget to change the class name?
I had that same problem...it was because I had different capitalization on the name of the WhiteBoard.cs .... and followed Justin's code with the 'B' in Whiteboard being lower case.
Hey Justin, this is working great for me, thanks a lot!
I still have a weird issue though, maybe it's a quick fix:
On my Markers Tip, when I try to draw something on the whiteboard, only one edge of the tip can actually draw, the others won't do anything.
Kinda hard to explain, it's like it can only draw with the bottom side of the tip.
The one edge on the tip, that is working also slightly clips into the whiteboard - the other edges don't do that.
I did try to adjust the colliders on the tip, but it didn't help. ^^
Join the discord if you're still having issues and we can help you troubleshoot!
On the line 'if (Physics.Raycast(_tip.transform.position, transform.up, out _touch, _tipHeight))', try change the 'transform.up' to 'transform.forward' or 'transform.right' (or rotate the tip)
@@sneakyfox03 I will try it, thank you :)
@@sneakyfox03 It took me a while but I finally implemented your fix and yeah you're right. The problem was that my marker was rotated and that lead to problems with the actual drawing so I could fix it by just rotating the marker! :D
Thank you :)
@@sneakyfox03 Just wanted to say thanks. This helped resolve my issue with the marker not drawing except when a specific corner was touching the whiteboard too!
the rotation lock doesnt seem to work. any idea why ?
Join the Discord and we can help you troubleshoot!
Bro! Did you made the script for the eraser? It would be super healpfull for my vr project! So i would really aprecciate a tutorial c: ,Thanks!
u got the script brother ?
Anybody else has the problem that this just works in the Unity Editor Play mode, but when you build the project the marker just doesnt work?
Yea I've heard that mentioned a few times now... join the discord if you can't figure it out and we can help you troubleshoot
yes i am
did you solve it
My pen is detecting the wall too soon, and draw before i even touch the whiteboard, and yes I checked the colliders... any help???
I ran into this issue too. In my case, it was because I was using my own marker model which threw things off.
The pen drawing before touching the whiteboard was due to the ray cast being longer than the model's tip height.
The length of the ray cast is set by the length of the tip in this line:
_tipHeight = _tip.localScale.y;
This works in the tutorial because Justin created the maker tip from a 1x1x1 cube and then scaled it down to 0.05. So when the script is grabbing the local scale, it creates a ray cast that's only 0.05 meters/units long.
I modeled my own marker and then froze all the transforms, so my local scale was 1. This meant that the ray cast was being thrown a full meter in front of the marker. Oops.
To fix this, the _tipHeight needs to equal the actual size of the tip.
Which you can do by either hard coding in the length of the tip, if you know it (or stumble on it by trial and error). In my case, that would have been:
_tipHeight = 0.012f;
Or better yet, use the mesh collider on the tip to get the length:
_tipHeight = _tip.GetComponent().bounds.size.y;
Since my pivot was in the center rather than the bottom of the tip, this still cast a little too far in front. To compensate, divide by 2 to get the distance from the center to front edge of the tip:
_tipHeight = _tip.GetComponent().bounds.size.y / 2;
That did it for me. Don't know how much help it is to you 9 months later, but there it is.
And thank you Justin for this and all of your other great tutorial! Much appreciated!
I aint reading allat but thanks
Can You make how To Make a gun which shoots?
Yea that's in the pipeline!
Oh ok
Where that
How can I use it in a multiplayer game?
All you really need to do is sync the markers. Then the whiteboard texture should update locally based on marker position no matter who's writing.
Could you put the code on your patreon
It's there! Here's the link if you need it: www.patreon.com/justinpbarnett
ERROR CS1501, SetPixels, HELPP
Same here! Anyone? Thanks
you should addd code in description as well its a good practice
The code is available!
@@JustinPBarnett sorry i didn't find it where is can you send me link
@@JustinPBarnett Ever since Half Life: Alyx, I KNOW you've imagined playing around with a whiteboard in your games. Well today is the day! In this tutorial I'll show you how to set up whiteboards and markers using Unity VR. (This will work for any Unity VR framework too!)
// 🦸♀️ GET THE SOURCE PROJECT (by supporting me on Patreon!)
www.patreon.com/posts/58770028
// 👋 JOIN THE DISCORD
discord.gg/6mzMQx5VKk
// 📺 WATCH NEXT
How to Make a VR Game: th-cam.com/video/yxMzAw2Sg5w/w-d-xo.html
How to Become a VR Developer: th-cam.com/video/oqXBY51KP5A/w-d-xo.html
How to Set Up your Oculus Quest 2: th-cam.com/video/yvtSvMECgbw/w-d-xo.html
How to Use Unity's New Input System: th-cam.com/video/SAij67HrgAM/w-d-xo.html
How to Set Up Procedural Inverse Kinematics: th-cam.com/video/MYOjQICbd8I/w-d-xo.html
// 🛠 MY FAVORITE UNITY VR ASSETS
Best All-Around VR Framework: assetstore.unity.com/packages...
Best Procedural Hands: assetstore.unity.com/packages...
Best Player Controller for VR: assetstore.unity.com/packages...
Best VR Hand Models: assetstore.unity.com/packages...
Best UI for VR: assetstore.unity.com/packages...
// 🥽 MY VR HEADSETS
Oculus Quest 2: www.oculus.com/referrals/link...
Valve Index: store.steampowered.com/valvei...
HP Reverb G2 Omnicept Edition: www.hp.com/us-en/vr/reverb-vr...
// 🎥 VIDEO GEAR USED
Camera: amzn.to/38V2N8f
Light: amzn.to/38Wwvd0
Mic: amzn.to/3sCq7Q4
🔔 And make sure you subscribe to my channel!
th-cam.com/users/JustinPBarn...
DISCLAIMER: Links included in this description might be affiliate links. If you purchase a product or service with the links that I provide I may receive a small commission. There is no additional charge to you! Thank you for supporting me so I can continue to provide you with free content each week!
Sharing VR tips to help you create that Virtual Reality game faster than you thought possible!
@@mtalhakhalid1679 All the code is written out in the video for you to copy yourself, but if you would rather just download the source project you can get it here! www.patreon.com/posts/58770028
Enumerable isnt working in the code
Just add "using System.Linq;" to the top of the script :D
👆
I am from Vr super jam. I created veat sager
👋
Great tut! I changed the raycast a bit to allow the full height of the tip to be used to draw, otherwise inserting the tip past the midpoint would not result in a raycast hit: Physics.Raycast(_tip.position - transform.up * _tipHeight, transform.up, out _touch, _tipHeight * 2);
Hey what do you do when it says "Enumerable" doesn't exist
using System.Linq
Is there a way to pre-draw something on the whiteboard that appears every time you load the game?
the marker script has some incompatible code if written in visual studio. I am unable to do Enumerable.repeat, so i tried IEnumerable.repeat, but repeat won't work because there is no contained definition for repeat, apparently.
Huh, that's a C# thing not a visual studio thing so it should work regardless of editor
@@JustinPBarnett I found the answer on your Discord server. Thanks for the great tutorials.
@@kelleyintegritysafetysolut484 awesome!
@@JustinPBarnett I'll be supporting you over on your Patreon within the next few days. Thanks a million.
"using System.Linq"
Using ( _whiteboard.texture.Apply(); ) is very expensive and causes my 200FPS scene to drop down to 28FPS. Really bad for VR! Are there better methods to get the same result?
I'm having the same issue right now. Have you found a solution or alternative methods yet?