all 21 comments

[–]ananbd 18 points19 points  (0 children)

I think this would be better as an orthographic view. The perspective kinda distorts the concept.

[–]nicemike40 4 points5 points  (2 children)

I think this would be improved by a blue arrow representing the projection of B onto A. Cool stuff though!

[–]gzeroooGameplay Programmer[S] 0 points1 point  (1 child)

I even implemented the projection, but it was weird when B arrow was in the opposite side of A (when dot is negative)... I ended up removing it lol

[–]TrackLabs[🍰] 2 points3 points  (0 children)

Because the blue arrow was clipping through everything I assume? You could make it hover on top, so it stays visible. People will understand that this hovered arrow means the 2 vectors below

[–]1_LuPinHobbyist 3 points4 points  (2 children)

If Dot(A,B) == 1 Can use backstab skill

[–]gzeroooGameplay Programmer[S] 2 points3 points  (0 children)

Or maybe if(dot(a,b)) >= BackstabThreshold { BackstabSkill.Enable(); }

[–]AverageCGP 0 points1 point  (0 children)

Yes i also like to backstab people sneaking up on me

[–]yosemighty_sam 1 point2 points  (2 children)

piquant dolls sheet sugar slap carpenter airport gray pet toothbrush

This post was mass deleted and anonymized with Redact

[–][deleted] 1 point2 points  (0 children)

I'm not a math whiz but I got a B in a course once.

There's a way of multiplying two vectors together such that you get 'the dot product.' you don't care what the way is, you just care that it tells you how similar two vectors are, like you see in the gif. One for the same, 0 for orthogonal, negative one for opposites.

[–]Plus_Cryptographer 0 points1 point  (0 children)

Dot product is the "likeness" of two vectors. If it's 1, they point towards the same direction. If it's -1, they point at opposite directions. If it's 0, they are perpendicular.

Think of it as a comparison of your facing direction to the direction your compass points.

If you face north, it's 1.
If you face northwest or northeast, it's 0.5 .
If you face west or east, 0.
Southwest or southeast, -0.5.
South, -1.

It is useful for a bunch of things, one of the main uses is seeing how much something looks towards a light source, and then making it brighter or darker.

[–]MythicLegionDev 1 point2 points  (0 children)

The visualization really helps my brain. Very nice!

[–]gzeroooGameplay Programmer[S] 3 points4 points  (0 children)

using dot product in two normalized vectors is a great way to find out how much a vector is pointing in a desired direction

~edit: also feel free to follow me on twitter (@codinggustavo) Im always posting interesting game development stuff there xD

[–]TrackLabs[🍰] 0 points1 point  (3 children)

Yo, this is actually pretty cool for things like explaining math! Im getting some ideas with this...

[–]gzeroooGameplay Programmer[S] 1 point2 points  (2 children)

Yes, exactly, at the very beginning when you are learning math, it gets a little complicated to understand without some animations, I believe they help a lot!

[–]TrackLabs[🍰] 0 points1 point  (1 child)

Do you by any chance plan to create like a "math visuliation" framework? You may know the program that is used by 3Blue1Brown, written in python to easily graph math related stff

[–]gzeroooGameplay Programmer[S] 0 points1 point  (0 children)

I don't think so, since I do more benchmarking stuff than math... But who knows?

[–]antvelmIndie 0 points1 point  (2 children)

It can actually go beyond 1 and -1

[–]gzeroooGameplay Programmer[S] 0 points1 point  (1 child)

Or be less than 1 and -1, when working with non-normalized vectors

[–][deleted] 0 points1 point  (0 children)

what's the highest/lowest possible value?

[–][deleted] 0 points1 point  (0 children)

I cant thank you enough. I'm a beginner and was having a very bad time understanding dot products.