Unity Vector3.Cross Visualized

  Рет қаралды 59,868

Tarodev

Tarodev

2 жыл бұрын

Vector3.Cross provides you with the cross product of two vectors. Vector3.Cross is easy to understand, but sometimes hard to find applicable uses for when just starting out.
I'll teach you what a cross product is, how to use vector3 cross, and a real-world use case for it (all in 90 seconds!)
I used 'Shapes' to make a few (most) of these effects, you can check it out here: assetstore.unity.com/packages...
❤️ Become a Tarobro on Patreon: / tarodev
=========
🔔 SUBSCRIBE: bit.ly/3eqG1Z6
🗨️ DISCORD: / discord
✅ MORE TUTORIALS: / tarodev
Vector3.Cross official description:
Cross Product of two vectors.
The cross product of two vectors results in a third vector which is perpendicular to the two input vectors. The result's magnitude is equal to the magnitudes of the two inputs multiplied together and then multiplied by the sine of the angle between the inputs.

Пікірлер: 166
@ZavenMuradyan
@ZavenMuradyan 2 жыл бұрын
If anyone is wondering, Unity's entire coordinate system is left-handed by convention, which is why the cross product points in the direction it does. In several other 3d applications, the coordinate system is instead right-handed.
@anoomage
@anoomage 2 жыл бұрын
You mean it uses a direct system while others use an indirect one ?
@seppukun208
@seppukun208 Жыл бұрын
No wonder the right hand rule doesn’t work 🤣
@goshlok4973
@goshlok4973 2 жыл бұрын
Simple, clear, easy to understand, what a gold channel.
@rize2137
@rize2137 2 жыл бұрын
Keep doing these
@christinaVennegerts
@christinaVennegerts 2 жыл бұрын
I love explainer videos that get straight to the point. Thanks for this!
@chempsyofficial3216
@chempsyofficial3216 2 жыл бұрын
Whazzzzzup guys its mr xxxxx here and today we're going to do this and that so lets get staight to it!... But fiirst let me tell you this video was sponsored by annoying sponsorvideo group and if u use my code u get 15% discount for these useful piece of sh.... Aaaalright so its 5 minutes in so lets get into this video.. so today we're going to do some crazy stuff but first lets make a 3d object so right click --> new object.... Oops missclicked.. so right click and then new object and we're gonna call this player.... *9 minutes in* so what u gonna need to do is just in this script we write "debug.log("hello world!");" And then.. IN UNITY press play and blaablaa so back to our script lets write "transform.translate vector3 there and multiply with speed and time dot deltatime and yeah thats it.. ok so 15 minutes in so thank you guys we'll see in next video... Piece! Next video has a big sponsor so dont miss it out!
@dennisdzeko3916
@dennisdzeko3916 2 жыл бұрын
@@chempsyofficial3216 This is a lot like Thomas Brush, the guy has been advertising his stuff throughout a 20 min video once every 2 mins duh...
@Shahmuradov
@Shahmuradov 2 жыл бұрын
Short and clear, thank you
@NewUnityProject
@NewUnityProject 2 жыл бұрын
Great explanation! Vector3.Dot video would be great!
@DmpDk
@DmpDk 2 жыл бұрын
As always a nice, short, sweet and directly to the meats video, love your work! ❤
@BlacKHellCaT78
@BlacKHellCaT78 2 жыл бұрын
amazing, would love more of these! Great vocal explanation with great visual explanation!
@Pankracy125
@Pankracy125 2 жыл бұрын
Production quality amazing as usual, whole concept explained in quick and simple way. This channel is a true gem
@jonahmcconnell4818
@jonahmcconnell4818 2 жыл бұрын
Love this visualization! Great stuff!
@Myrdov
@Myrdov 2 жыл бұрын
I'm really happy this channel exists! Thank you!
@jrmillerfilms
@jrmillerfilms Жыл бұрын
These short visualizations are gifts from a coding god. Thank you, Sensei Taro!
@thesilentwisp
@thesilentwisp 2 жыл бұрын
These videos are fantastic. Love the visual explanations.
@IndieDX
@IndieDX 2 жыл бұрын
So clearly explained! Well done!
@simonesechi9286
@simonesechi9286 2 жыл бұрын
The quality of the videos you are putting out keeps increasing, WOW!
@Tharky
@Tharky 2 жыл бұрын
Amazing visuals and explanation!
@opiaro
@opiaro 2 жыл бұрын
these visuals are so cool! keep it up!
@Zaszz1
@Zaszz1 2 жыл бұрын
Sick tutorial, thanks very much!
@pkandy2
@pkandy2 2 жыл бұрын
You made me look like a duffus good sir, you've earned my subscription Love your unity tutorials :)
@JabeYT
@JabeYT 2 жыл бұрын
Great channel! Super helpful, super visual short explanations. Thank you so so much!
@castlecodersltd
@castlecodersltd Жыл бұрын
Really clear and helpful. Thank you ☺
@makra42069
@makra42069 Жыл бұрын
These visualization video have started growing on me!
@mooumari8210
@mooumari8210 2 жыл бұрын
Amazing explanation 🤩
@radiatefromhere
@radiatefromhere 2 жыл бұрын
In-depth videos are great, but these little nuggets are great in their own separate way and in short supply on youtube. Subbed just because of your style/method, and because you seem to be hitting on API methods that are easy to overlook.
@Tarodev
@Tarodev 2 жыл бұрын
Glad to have you on board brother. More nuggets to come!
@thibaultquartier4794
@thibaultquartier4794 2 жыл бұрын
SO USEFUL thanks
@Tarodev
@Tarodev 2 жыл бұрын
:D
@TaAnderson-Google
@TaAnderson-Google 2 жыл бұрын
ME: I subscribed, LIKED, and loved watching your video (and all of your videos). I am always looking forward to them. I purchased Freya Holmér's amazing asset SHAPES using your link. Your examples pushed me to take that leap. YOU: Please accept my thanks and keep making amazing content (you are doing it so very right). Please consider making your visual available as an instruction for SHAPES, and have a wonderful holiday season. FREYA: Someone is showing just how amazing your resource truly is. That is a complete win for everybody. Keep doing remarkable things, keep being awesomely you, and enjoy the holidays as well. Best to you all, Tris
@Tarodev
@Tarodev 2 жыл бұрын
I woke up today and this was the first thing I read. You've kicked off my Christmas holiday in a good way. Thanks brother! ❤️
@naijii
@naijii 2 жыл бұрын
I love this, this is brilliant, thanks
@Nox__
@Nox__ Жыл бұрын
man explains thing in 1:35 seconds. faster and clearer then most other vids or websites
@truth8483
@truth8483 Жыл бұрын
More videos like this plzzz!!! So helpful!!
@youcancallmedoggie
@youcancallmedoggie 2 жыл бұрын
That was cool :D thanks Taro
@josemanuel5205
@josemanuel5205 2 жыл бұрын
I absolutly loved this
@fmproductions913
@fmproductions913 2 жыл бұрын
Another awesome video! When I'm using the method, I often find myself going to the Unity API page for it, they have or had a left hand rule visualisation. The left hand rule helps me a lot for visualization and what directions to choose :)
@Dorbellprod
@Dorbellprod 2 жыл бұрын
These visualizations are so awesome 😩 also, finally, a new use for my FU finger...
@DePistolero
@DePistolero Жыл бұрын
Hey awesome as always, today I just finalized roling dice simulations, 6 dice to fall to a given number but to look random :) Was checking your roll the cube video, but didn't go that way... This looks awesome, thanks.
@tao5204
@tao5204 2 жыл бұрын
Estos vídeos son geniales! Good job man
@CleosetricVlyers
@CleosetricVlyers 2 жыл бұрын
Finally a channel who explain usefull function of unity. Now i have motivation to gamedev again
@kukisj2752
@kukisj2752 2 жыл бұрын
Great video, clear message. Thanks!
@Tarodev
@Tarodev 2 жыл бұрын
I was a bit worried about this one. Wasn't sure if the message was crystal clear or not. It had a few difficulties during development, that's for sure.
@kukisj2752
@kukisj2752 2 жыл бұрын
@@Tarodev The theory eems to be crystal clear for the moment. I will come back you when I'll be using it in practice :D
@TrueIndian
@TrueIndian 2 жыл бұрын
nice one - to the point.
@joaonovo5639
@joaonovo5639 2 жыл бұрын
Great content!
@omg33ky
@omg33ky 2 жыл бұрын
Amazingly simple
@atillaalagoz4100
@atillaalagoz4100 2 жыл бұрын
Thank you ❤️
@Tarodev
@Tarodev 2 жыл бұрын
Anything for you
@user-tp1cj5fc2y
@user-tp1cj5fc2y 2 жыл бұрын
4k content delivery👍
@natonion1154
@natonion1154 Жыл бұрын
This always bothers me with the left-hand rule when I first tried to do some coordinate transformation, but this video has cleared out so much ambiguity for me. Thanks!
@JadonBarnes
@JadonBarnes 2 жыл бұрын
Great job here man! Beautiful visualizations. It’d be great to see more based on projections and reflections from Vector3 in Unity
@Tarodev
@Tarodev 2 жыл бұрын
Hey mate, you're on our TV quite a bit 😂 I have a quaternion visualization coming out soon! Stay tuned
@JadonBarnes
@JadonBarnes 2 жыл бұрын
@@Tarodev What a small world of devs!!! Hopefully it’s the good kind of being on TV and not the “Wanted in your area” type 😂
@Tarodev
@Tarodev 2 жыл бұрын
@@JadonBarnes my sons play your game all the time! Nice work with that buddy
@JadonBarnes
@JadonBarnes 2 жыл бұрын
@@Tarodev That’s wild. Thanks so much, man. And thank God for devs like you who share the knowledge for smoll brains like me
@JadonBarnes
@JadonBarnes 2 жыл бұрын
@@Tarodev Now make a tutorial on how to do a physics based multiplayer peer to peer networking solution so people can stop asking me to solve one of the game industry’s leading dev challenges ;)
@krissloo143
@krissloo143 2 жыл бұрын
Dude, the way you visualize stuff is amazing. So far the best I came across on KZbin! Great job Though I doubt I'll be able to rotate the cube (that way) with only the cross product. I achieved the same movement by making the cube rotate around the point that is in contact with the ground. Is there an easier way to achieve this? :)
@Tarodev
@Tarodev 2 жыл бұрын
I have a video specifically about rolling a Cube, check it out 😊
@LookitVideos
@LookitVideos 2 жыл бұрын
Using the physics system, you can rotate the cube just using the cross product and `AddTorque`.
@notDiru
@notDiru 2 жыл бұрын
your video quality is insane damn
@Tarodev
@Tarodev 2 жыл бұрын
Thanks stranger
@durrium
@durrium 2 жыл бұрын
Moooore of this man!! 😍
@Tarodev
@Tarodev 2 жыл бұрын
More coming 😊
@restushlogic5794
@restushlogic5794 2 жыл бұрын
Awesome!
@balasubramanimudaliar1336
@balasubramanimudaliar1336 2 жыл бұрын
Nice Job.
@bigedwerd
@bigedwerd 10 ай бұрын
You remind me of the coolest thing I've learned about Unity. If you hold up your left hand like you did you can visualize X, Y, Z in their positive directions, which also happens to be R, G, B like in defining a color. I'm constantly holding up my left hand while programming to visualize which was is Y or what's positive Z. I think if want to do the same for Blender you have to hold up your right hand.
@pliniomourao
@pliniomourao 2 жыл бұрын
Very good explanation, along with the nice visualization to make sure we understand. Thank you for the video! If i may, please i'd love to have an example application of Cross, because i couldn't visualze how i'd use it in a project by the example you given in the video. Cheers.
@dz4va
@dz4va 2 жыл бұрын
Please do one on the Dot product, found this video very helpful, thank you so much!
@Vastlee
@Vastlee 2 жыл бұрын
I like to try and have my FU finger be part of every solution. Good job.
@abhimanyuta9367
@abhimanyuta9367 2 жыл бұрын
Thanks
@pchris
@pchris 2 жыл бұрын
damn it where were you like 3 or 4 years ago you could have saved me so much headache.
@Tarodev
@Tarodev 2 жыл бұрын
Apologies brother 😂
@OverInfrared
@OverInfrared 2 жыл бұрын
Why are you so unknown in the unity community, your videos are amazing.
@Tarodev
@Tarodev 2 жыл бұрын
I'm working on it... she's a hard girl to crack 😢
@hahas507
@hahas507 2 жыл бұрын
매우매우매우매우 깔끔한 설명
@CCV334
@CCV334 2 жыл бұрын
Great explanation! How do you make these visualizations? Your visuals are always so clean, even in your other videos. Would love to see how you light a scene and setup any post processing.
@Tarodev
@Tarodev 2 жыл бұрын
This video is made using shapes. I have a link in the description to it. It's seriously fantastic
@littleface7060
@littleface7060 Жыл бұрын
Yes, I did the left hand thing
@DArK-xj8lr
@DArK-xj8lr 2 жыл бұрын
This is some really high quality stuff... Subbed. Can u please make this kind of series for Godot engine?
@zakkaioken2812
@zakkaioken2812 2 жыл бұрын
shapes is my favorite unity package
@Tarodev
@Tarodev 2 жыл бұрын
Oh man, I'm obsessed
@zakkaioken2812
@zakkaioken2812 2 жыл бұрын
​@@Tarodev Same i love it so much and there's so much you can do it's ubsurd!!! My favorite thing to do is smoothly animate using immediate mode shape drawers but i also do love playing around with it's ability to work inside masks and stensil buffers!! I have a tip for the wierd ghosting on the transparent lines you use for your grid, if you make them a solid color they won't visually sit ontop of intersecting shapes when they collide it's cool that way :)
@Tarodev
@Tarodev 2 жыл бұрын
@@zakkaioken2812 yeah instead of making them transparent I should have just darkened the lines closer to the background color. Good tip!
@DavidZobristGames
@DavidZobristGames 2 жыл бұрын
nice
@NameUnknown-
@NameUnknown- 2 жыл бұрын
I really need to take a look back at the 3d vectorial maths leassons, im really rusty
@abclef
@abclef 2 жыл бұрын
1:03 That was "left", pointing to the negative X-axis in Unity
@YasserSedrati
@YasserSedrati 2 жыл бұрын
Keep doing this shorts videos and show some advanced stuff we like what you do.
@piyush1997
@piyush1997 2 жыл бұрын
Please make a series on maths and physics used in unity
@piyush1997
@piyush1997 2 жыл бұрын
Also make a tutorial on procedural generation please
@CCV334
@CCV334 2 жыл бұрын
Now you gotta do the dot product
@Tarodev
@Tarodev 2 жыл бұрын
I don't HAVE to do anything. But yeah you're spot on baby 😉
@icyz1ne456
@icyz1ne456 2 жыл бұрын
awesome video! Could you please make one on Vector3.Dot next?
@tedsheridan8725
@tedsheridan8725 2 ай бұрын
Beautiful animations. I'm assuming the video itself was made in Unity?
@Tarodev
@Tarodev 2 ай бұрын
Indeed. Using dotween and shapes
@tedsheridan8725
@tedsheridan8725 2 ай бұрын
@@Tarodev I came across this vid cause I"m looking to build interactive 3D mathematical constructions for educational videos. Do you know if Unity can do parametric surfaces easily?
@2fifty533
@2fifty533 8 ай бұрын
this whole thing about the left hand rule and right hand rule and coordinate system orientation is part of the reason why i don't like the cross product there is a better replacement for it called the outer product which calculates the plane of rotation rather than the axis and it's nicer because you don't need to remember any hand rules
@modiddymo
@modiddymo 2 жыл бұрын
Was already subbed but I *always* stick my hand out in the air like a doofus when I encounter the cross product.
@HonestFranklin
@HonestFranklin Жыл бұрын
3차원 공간에 포물선으로 어느 위치에 쏘아올린다고 한다면 도달하기 위한 지점과의 3차원 방향과의 내각을 가중치한 힘을 구하면 원하는 좌표지점에 효율적인 에너지 사용으로 극대화 할 수 있다
@ShahbazGames
@ShahbazGames 2 жыл бұрын
Wow
@DonDisainer
@DonDisainer 2 жыл бұрын
wooow, this was so clear, can we have DOT? tnx for yuor videos!
@HonestFranklin
@HonestFranklin Жыл бұрын
포사격을 할때 미리 코사인 각도를 측정하고 쏘면 어느정도 거리까지 예측이되어 목표물에 명중할 수 가 있다
@zainuldin9095
@zainuldin9095 2 жыл бұрын
@minia3769
@minia3769 2 жыл бұрын
Very nice animation, how do you do it ?
@Tarodev
@Tarodev 2 жыл бұрын
I use shapes and lerping with curves. Link to shapes in the description. It's fantastic!
@newlinebraces2872
@newlinebraces2872 8 ай бұрын
Yep, I did the hand
@Nomarr
@Nomarr 2 жыл бұрын
👌👌
@mazdnd
@mazdnd 2 жыл бұрын
How isn’t this in the top three most viewed unity channels?
@Tarodev
@Tarodev 2 жыл бұрын
Maybe one day 😜
@dandandan01
@dandandan01 2 жыл бұрын
Unfortunately you didn't make me stick my hand up in the air like a doofus, but I still enjoyed the vid so I'll sub 😄
@tughloksiddiquee1714
@tughloksiddiquee1714 2 жыл бұрын
Just curious, do you make these visualization animation in Unity?
@Tarodev
@Tarodev 2 жыл бұрын
Line renderers, shapes by freya and a loooooot of lerping
@mrpotato8196
@mrpotato8196 3 ай бұрын
Could you do one on project on plane?
@BlackoutGamingChannel
@BlackoutGamingChannel 2 жыл бұрын
literally sat here with my hand twisting and turning and swivelling around and getting giddy about it. Moar plz
@Tarodev
@Tarodev 2 жыл бұрын
Haha, mission accomplished
@LombaxPieboy16
@LombaxPieboy16 2 жыл бұрын
Guess I gotta subscribe. Stuck my hand in the air like an idiot.
@JKczolg
@JKczolg 2 жыл бұрын
Can you do a dot product?
@Tarodev
@Tarodev 2 жыл бұрын
I also did the dot product in this video together with cross, but thought it deserved its own video. So yes, it'll come 😊
@NeZversSounds
@NeZversSounds 2 жыл бұрын
Since when right-hand rule became the left-hand rule?
@Tarodev
@Tarodev 2 жыл бұрын
When unity decided to change the game 😜
@Briezar
@Briezar 2 жыл бұрын
guess I'll have to use my left hand more ;)
@Tarodev
@Tarodev 2 жыл бұрын
Well, the right hand is operating the mouse, right?
@MouseBurglar
@MouseBurglar 2 жыл бұрын
Great video. But isn't it the right-hand rule? 🙈
@Tarodev
@Tarodev 2 жыл бұрын
For most of the math world it is. Unity is a lefty boi
@MaskedImposter
@MaskedImposter 2 жыл бұрын
After this video I go to the visualizations playlists of five videos... 4 videos are hidden... Lol. Good video though.
@Tarodev
@Tarodev 2 жыл бұрын
Thanks for bringing that to my attention :)
@truth8483
@truth8483 2 жыл бұрын
lol your "fu" finger xD
@therupoe
@therupoe 2 жыл бұрын
Definitely did the doofus hand
@mikeonthebox
@mikeonthebox Жыл бұрын
Once you rotate the cube once, then "Up" isn't "Up" anymore right?
@dampish8403
@dampish8403 2 жыл бұрын
i dont get it, why cant you just do a +90 ina euler quaternion? and isnt it always going to be 90 degrees? would you have to do 4 of these, for each direction?
@Tarodev
@Tarodev 2 жыл бұрын
The point is finding which axis you need to rotate on, then you can use whatever method you'd like to actually rotate 😉
@dampish8403
@dampish8403 2 жыл бұрын
@@Tarodev thanks alot for responding and helping me understand!!😄👍
@NotASpyReally
@NotASpyReally Жыл бұрын
I am so frustrated. What if the two vectors aren't perpendicular in the first place?? I wanna know what happens then pleaseeeeee
@NotASpyReally
@NotASpyReally Жыл бұрын
Wait I'm just very stupid. I think I get it now. Thanks. Uuuugh my head hurts XD
@tundrummax6221
@tundrummax6221 2 жыл бұрын
what happens if the two original vectors aren't perpendicular to eachother?
@Tarodev
@Tarodev 2 жыл бұрын
The 2 original vectors don't need to be perpendicular, they can be right next to one another. I should have explained that a bit better
@ZiplawDev
@ZiplawDev 2 жыл бұрын
The left hand rule works ONLY on left handed engines, I don't think this is the case in unreal, in that case, you use your right hand instead, but the math is the same
@Tarodev
@Tarodev 2 жыл бұрын
Indeed. Unity is a leftie
@libberator5891
@libberator5891 2 жыл бұрын
This is a good point to bring up, but Unreal is also a left-handed coordinate system. However, they use Z as up whereas Unity has Y as up. Some other systems and programs are right handed though, like Blender and Godot
@ZiplawDev
@ZiplawDev 2 жыл бұрын
@@libberator5891 yeah I'm not very familiar with unreal, but I heard it was different in that regard
@restushlogic5794
@restushlogic5794 2 жыл бұрын
Is Shape really worth to buy?
@Tarodev
@Tarodev 2 жыл бұрын
I think it is. I have had so much fun with it... But it really depends what you want. At the very least it's an improved line renderer (which can be volumetric). But it's so much more than that!
@muireachgriogalach483
@muireachgriogalach483 2 жыл бұрын
Great video but i can't understand because i don't know what is cross product and i couldn't learn what is cross product from google so Sadge
@Klash120
@Klash120 2 жыл бұрын
I did the doofus thing~
Unity Architecture for Noobs - Game Structure
16:24
Tarodev
Рет қаралды 186 М.
Unity Tutorial: Everything you need to know about Vectors
7:45
🌊Насколько Глубокий Океан ? #shorts
00:42
ТАМАЕВ vs ВЕНГАЛБИ. Самая Быстрая BMW M5 vs CLS 63
1:15:39
Асхаб Тамаев
Рет қаралды 4,7 МЛН
Ray Marching, and making 3D Worlds with Math
6:28
SimonDev
Рет қаралды 238 М.
Cross Product and Dot Product: Visual explanation
4:08
Physics Videos by Eugene Khutoryansky
Рет қаралды 951 М.
Giving Personality to Procedural Animations using Math
15:30
t3ssel8r
Рет қаралды 2,4 МЛН
Unlocking The Power Of Unity's Scriptable Render Pipeline
21:05
Game Dev Guide
Рет қаралды 190 М.
The real world applications of the dot product
12:49
Zach Star
Рет қаралды 214 М.
Bob Nystrom - Is There More to Game Architecture than ECS?
23:06
Roguelike Celebration
Рет қаралды 191 М.
How To Render 2 Million Objects At 120 FPS
14:57
Tarodev
Рет қаралды 136 М.
Everything You Need to Know About VECTORS
17:42
FloatyMonkey
Рет қаралды 1 МЛН
🌊Насколько Глубокий Океан ? #shorts
00:42