Diagonal movement may be easy to implement, but you might want to consider normalizing your vectors. #gamedev #shorts
Пікірлер: 1 900
@heartofdawnlight10 ай бұрын
speedrunners hate this one programming technique
@-Yello-9 ай бұрын
I was thinkin the same thing lol
@729MendicantTide9 ай бұрын
Goldeneye players too
@ollllj9 ай бұрын
we need a list of 3d games, that fail to normalize some movement vectors.
@danolantern60309 ай бұрын
Speedrunners when not every single little exploit is kept in for them and not every little aspect of a game is designed around them
@porkt38879 ай бұрын
@@danolantern6030lol games usually arent designed around speedruns but devs may choose to leave in some bugs runners use. Like ocarina of time 3d they left in super slides but fixed but the buggy crouch poke. now modern zelda games they fix all the fun bugs before any of the game breaking stuff lol
@MrSirSquishy5 ай бұрын
Sometimes its actually better to leave this in as a "bug but actually feature" since it can help make walking less monotonous for certain players, as strafing can keep things feeling active.
@onegoesdown3 ай бұрын
This is such an important thing. So many devs lost this mindset.
@mchlkpng3 ай бұрын
I tried normalizing movement for something. It really didn't feel right. Even if you're going the same speed, it feels slower
@anonymousapproximation85492 ай бұрын
@@mchlkpngBecause you basically are. You're not going forwards as fast, nor are you moving to the side as fast.
@mchlkpng2 ай бұрын
@@anonymousapproximation8549 true
@marcxworld5708Ай бұрын
Nah its not better lol
@rory818210 ай бұрын
This is why they move diagonally in original Doom speedruns
@Kushibunny9 ай бұрын
Doesn't count for the fact that you run SIGNIFICANTLY faster by running diagonal along a wall in Doom/Doom 2. That's just a straight up bug.
@platinumfactor9 ай бұрын
That's not true. The actual reason for that is that all directions of movement max out at Speed 40. However, a glitch that allows you to move and strafe in the same direction simultaneously can give you a speed of value of SR50 or SL50 (Strafe Right 50 or Strafe Left 50) It's only faster than running on long stretches where you can do it for long enough. That's why they'll usually just run forward or to the direction of the next objective if they're in a small room.
@wileecoyotegenius59559 ай бұрын
And Goldeneye
@threeco23509 ай бұрын
@@platinumfactoryes, a good example of the movement shown in this video would be diablo 1.
@TF2Starlight9 ай бұрын
@@platinumfactoryea you can run along a wall and run faster…
@Casual330Ай бұрын
Running in zig-zags never made more sense
@motc823825 күн бұрын
let's say you're going right, whether you go up or down as you go right, in this scenario you'd still only move right at the same speed.
@SalimShahdiOff18 күн бұрын
Still doesn't make send
@radialmachinery994717 күн бұрын
@@motc8238But if you want to just say go forward if you keep holding right you would end up completely wrong
@coco1357913 күн бұрын
@@motc8238 actually, you'd be going a lot slower becaused the horizontal speed is less than the total speed, instead of being equal like if you went straight
@trifortay6 күн бұрын
running in a zigzag wouldn't increase you're vertical velocity.
@thelred-ph3lq Жыл бұрын
Note to self: When escaping from danger run diagonally. Those straight line runners will have a hell of a time trying to catch up.
@meteylmaz4366 Жыл бұрын
Remember, you don’t need to outrun the monster. Just outrun your friends!
@ChronoNewton Жыл бұрын
lmao🤣🤣
@ultra-doggofn978810 ай бұрын
😂😂
@GunSpyEnthusiast9 ай бұрын
@@meteylmaz4366 note to self, run at an angle which you can run directly to your friend to clothesline them, whilst moving diagonally.
@Sjorsje9 ай бұрын
The World is not Enough on N64 in a nutshell
@glltyt2 жыл бұрын
This is the first time I've ever understood the relation between the game math and the result. Thank you so much.
@ravihlb9 ай бұрын
Same!
@hikari16909 ай бұрын
I just clicky cause I wanty. Sides, could use polar coordinates instead of this Kardashian coordinates and save some computing power 🤣
9 ай бұрын
@@hikari1690That would work, but wouldn't save any computing power.
@squishyushi9 ай бұрын
Big brain
@clumsypanda74339 ай бұрын
@@hikari1690Cartesian*. Kardashian coordinates would be used to measure amount of plastic in a bimbo
@Xeno_Solarus9 ай бұрын
Bro the Xenoblade music! Mad respect.
@GugureSux Жыл бұрын
The first time I noticed this was back in the N64 days, playing Goldeneye 007. Diagonal movement was a legit tactic I used to speedrun missions.
@vulkanosaure Жыл бұрын
It's incredible that they didn't fix this though. N64 was already an advanced time compared to the NES / snes era, and this diagonal problem is a well known one
@yapflipthegrunt46879 ай бұрын
Looking down to run the game at a constant 60fps is another speedrun strat for that game.
@19Szabolcs919 ай бұрын
Pretty surprising to see this issue pop up even in more recent games. There is this indie Super Monkey Ball tribute game called Paperball which does the exact same thing, no vector normalization, so diagonal movements are simply faster. I know it's an indie game, but otherwise pretty well made, and it's so recent...
@RipVanFish099 ай бұрын
A fun side effect of having all of those different and weird control schemes is that some of them had a genuine advantage over the others, because of funky programming. :P
@skad20589 ай бұрын
@@vulkanosaureMy guess is it's a video game where the player is bounded to the square of the map Like, you can't just move quite a bit, you have to go from a square to another It's not possible to fix diagonal walk in those game, it would make the player stand between the squares, which would break the game
@stellar7933 Жыл бұрын
Love how algebra actually becomes so helpful when you get into programming
@janpapai920510 ай бұрын
Its kinda more linear geometrics then algebra bc the formula is about a triangle and its sides but nevermind
@madscientist1410 ай бұрын
dude you started learning algebra at 1st grade. trying to find out the answer to 1+1=x is algebra. I'm pretty sure you've used it in a lot of ways in your life now.
@bigfatpandalaktana27479 ай бұрын
Welcome to engineering - where we actually use the maths we were taught in school
@aBucketOfPuppies9 ай бұрын
I laugh when I think back to all the kids who thought that math was useless because they just wanted to become programmers
@saechaol9 ай бұрын
especially when you take linear algebra and it’s basically fundamental to computing graphics and games
@zants_9 ай бұрын
I never realized why diagonal movement was so uncanny, this was so helpful
@raya-fantasia9 ай бұрын
As the artist of an indie team, I really want that guy to have diagonal animations
@raya-fantasia9 ай бұрын
👍
@caldercockatoo22349 ай бұрын
@@raya-fantasiaWhy’d you reply to your one comment?
@raya-fantasia9 ай бұрын
Someone else commented before, but I think they deleted it
@why_i_game9 ай бұрын
@@raya-fantasia Lol, people deleting their comment just to make you look a bit crazy. It's sort of like when a tonne of people upvote a comment... then the person changes the comment to something absurd, and you're like "why are so many people upvoting such a stupid comment?"
@raya-fantasia9 ай бұрын
yes
@varglbargl6 ай бұрын
normalizing diagonal movement alone would knock this pixel art character out of alignment with the pixel grid.
@juhmop8 ай бұрын
never thought the pythagorean theorem would be useful in any way possible
@errantcondor934910 ай бұрын
I could swear I heard Colony 9 in the background. I love you.
@gavinli136810 ай бұрын
Yeah!!! Xenoblade OST fans! Escoecially the night time theme!!!
@waltercardcollector9 ай бұрын
Yess! Colony 9 night music is one of my favorite video game music pieces of all time.
@pedrobeckup4569 ай бұрын
I love this song!!
@Betsy7Cat9 ай бұрын
@@gavinli1368I recognized it right away bc it’s one of like 5 songs from the game I use to fall asleep lmao
@Sharklady5948 ай бұрын
I immediately knew it was a xenoblade song I just didn’t know which one, thank you
@vulpinitemplar50369 ай бұрын
I've known how to fix it for a while but I hate how sluggish it ends up feeling as a result, it's got that cursed vibe.
@TheEuropeMan9 ай бұрын
Speedrunners want to know your location
@GlitchedBlox8 ай бұрын
Pythagorean Theorem, my beloved.
@James22106 ай бұрын
This fix is why walking diagonally into walls cuts your speed by ~30%.
@linksword71102 жыл бұрын
For anyone wondering how the code works local vec = vector(dirX, dirY):normalized() * player.speed player:setLinearVelocity(vec.x, vec.y) DirX and DirY are either 1, 0 or -1 depending on which direction he goes The code is grabbed from his Zelda game
@agent-332 жыл бұрын
Thanks. It's a shame the uploader didn't give the actual answer and just "blah blah got it? ok bye" to us.
@alessioturco9532 жыл бұрын
where shoul i copy it? in fuction load or update
@pyrytheburger38692 жыл бұрын
@@alessioturco953 update probably
@linksword71102 жыл бұрын
i would recommend learning how normalization works with math.
@tofame4291 Жыл бұрын
@@pyrytheburger3869 the reason for that was probably that he barely fit in one minute lenght of the video (which is a short). I might be wrong, but I guess that if he added explanation it would cross the "limit". Neverthless, quite bad that he didn't pin the answer (the one above) or write his own. Btw, I know this was 9 months ago xD
@jpslr-868 ай бұрын
Damn i finally understand what normalizing a vector means
@tiger_vii Жыл бұрын
I can't believe I fell asleep during maths classes..... Damn it!
@zaplershorts7783 Жыл бұрын
Ik I’m late at answering but, I did too 😅
@erikblaas5826 Жыл бұрын
Math is very dry stuff most of the time, and very exousting to take attention to. ( english is not my primar language, sorry for errors)
@ClodsireBcuzYes10 ай бұрын
nah its not ur fault, they make it as boring as one could imagine
@theoriginaldrdust8 ай бұрын
im happy that now (im at the very end of gen z) at least in australia them highschool teachers make maths interesting if not sufferable
@tiger_vii8 ай бұрын
@@zaplershorts7783 were u still sleeping
@KettleClogScratch Жыл бұрын
I'm working on a top down adventure game and this actually helped fix my diagonal movenment. Thanks!
@brodyfishel5579 Жыл бұрын
Which engine are you using?
@maddenmartin74368 ай бұрын
math and physics all in one for such a simple part of a game lol
@alexatedw Жыл бұрын
Excellent use of the short content for programming.
@seeyainvalhalla87027 ай бұрын
When I was in the primary school I always thought that vectors are useless, now I see I was wrong
@justaway_of_the_samurai9 ай бұрын
It also applies to movements in 3 dimensions in 3D games. If you move forward 1 unit, to the right 1 unit, and up 1 unit, the total magnitude of your movement will be equal to the square root of 3 (about 1.73), as compared to the 2D diagonal movement example here , which is the square root of 2 (about 1.41). This even applies to movements in theoretical 4D dimensions and beyond.
@10_days_till_xmas9 ай бұрын
In 3D games, up velocity is usually done separately, bc of gravity, and u can’t add continuous velocity when jumping, so the jump strength is balanced around the jump height. Ofc space games are different tho
@acebandge52939 ай бұрын
Coming from an avid OW2 nerd, you just helped me understand faster flying character's movement tech. Specifially, Echo's mainmovement ability lets her fly vertically while holding the a diagonal movement combination. This is just better to do as Echo when flying (which is what her thing is.) Now, mathematically, I will, be the Echo Diff, if not in frags; then at least in quicker fly speed velocity.
@justaway_of_the_samurai9 ай бұрын
@@10_days_till_xmas Yeah typically character movement in 3D videogames would not be utilizing all 3 dimensions in the same way, so it is more like 2D movement in that regard. But it still applies to other use-cases outside of the main character's movements, such as with flying enemies, particles, and perhaps scenery.
@why_i_game9 ай бұрын
@@10_days_till_xmas This made me think of flying around in Descent bumping into walls. It was the first game I played with fully 3D movement (up, down, rotation, rolling, etc.) and it got really confusing at times!
@nickpatella15258 ай бұрын
This very much applies to 4D games, where the ground is 3D, meaning you need to normalize a 3D movement vector.
@BlizV28 күн бұрын
First time math classes actually helped me 😭
@mohamedmoh57892 жыл бұрын
I love how you explain these concepts generally without specifying a game engine this help different game engine users to apply these cocepts according to game engine that they're using
@jesusofbullets9 ай бұрын
It’s crazy how many major video games don’t understand this simple concept. Halo 3 even, for example, you travel significantly faster diagonally while using a ripped off chain gun or missile launcher than you do when moving forwards or backwards
@Eddman36810 ай бұрын
This also explains why in older games like Doom you move faster diagonally
@giow15465 ай бұрын
It's funny that this even happens in famous games like Chrono Trigger
@iuPeepleAnimations13 күн бұрын
"Normalise the Vector" Me: "OH YEAH!"
@KIRBOFLURBO10 ай бұрын
Ah, the xenoblade music fits in so many peaceful places
@missus_chan8 ай бұрын
Normal players: Go straight Speedrunners: WWWWWWWW
@AacatNet9 ай бұрын
Normalizing the vector is good for 3D games but when I developed my game, the diagonals felt slower despite it moving the same speed. So I made it 1.2x faster for diagonals on purpose and no one noticed in testing because it felt more normal than actually normalizing.
@Muho_is_me9 ай бұрын
Thats probobly becouse the screen will move slower when you are still holding the same key since you cant move camera around to abuse fastness of it like in 3D games id say its a good idea to keep it fast like you did
@duncathan_salt9 ай бұрын
little cheats like this are often necessary for things to feel good. it's particularly useful when running up slopes - players rarely want the physics to be realistic in that case, since it only slows them down
@hugoguh19 ай бұрын
The thing about normalizing is that while you move at the same speed in the diagonal direction, you lose speed in the vertical or horizontal direction which discourages you to have a little fun when moving from point A to point B
@eVCANN9 ай бұрын
@@Muho_is_meyeah I noticed this in Stardew Valley, the camera moves a lot slower when walking diagonally and it feels painful so I just avoid walking diagonally even though I know it’s the same speed
@Allplussomeminus4 ай бұрын
Bread and Butter for speedy movement in 007 Goldeneye (N64).
@Equal-zzz8 ай бұрын
In this type of game(with 8 direction movement) it is easier to just create a new constant that is approximately equal to sqrt2 and use it for diagonals. This reduces the need of constantly normalising direction vector, which implies square root every moving frame.
@nidbahn7 ай бұрын
divide the speed by sqrt2 and put it in both x and y of movement vector
@patrikugrin25929 ай бұрын
Every beginners first problem, it's quite fun to encounter these kind of problems
@codahighland9 ай бұрын
If you have to use integer pixels, have moving diagonally by 2 pixels in each direction take three frames. This means you're moving sqrt(8)/3 pixels per frame, which is about 0.94, which is close enough to make the speed difference far less noticeable.
@Aerialyn8 ай бұрын
Luna Game 3D has this error which helps immensely on speedruns
@waltercardcollector9 ай бұрын
I just want to say that I love your choice of background music (it's from Xenoblade which is one of my favorite games of all time)
@guimon785 ай бұрын
I appreciate the "Outside Colony 9 (Night)" as the music
@nikitapower9478 ай бұрын
Several Zelda games even don’t mind that acceleration
@MinorLife109 ай бұрын
I swear to god, if JRPGs fix this "bug", that will make me hate them even more
@EyNickSeeАй бұрын
I'm learning gamedev/programming, and this helps understand the use of "normalize" so much more clearly now. Thank you
@softolive6 ай бұрын
If I were to make a game, I'd intentionally leave this in as a speedrunning strat
@mom0367 Жыл бұрын
Game dev is the only reason I'm genuinely interested in math class now.
@keroadh14559 ай бұрын
Teachers: “This is something you’ll need to know in the real world.” The one time I actually need to use it for:
@RotcodFox7 ай бұрын
I personally wouldn't want to normalize the speed, because I'd be holding back speedrunners
@pickledokra29637 ай бұрын
Ye but that's such a minute community in gaming
@esben181 Жыл бұрын
I've never noticed that the diagonal movement in my prototype was like this. Thanks!
@Ridlay_7 ай бұрын
Dang, bro really just pulled out the Pythagorean theorem on me. Ok, I see you.
@soloshottie9 ай бұрын
fun fact: controller sticks have this kind of "normalizing" built in. since it can only rotate in a circle, it can only read X and Y axis inputs within that circle, meaning all edges of the stick are a 1 input, in some combination of X and Y
@nidbahn7 ай бұрын
this made me realize that sin²x+cos²x=1 also comes from the pythagorean theorem
@mmmmmmok52925 ай бұрын
trig moment
@ErdrickHero4 ай бұрын
I hate that devs have started doing this without regard to the game in question. Moving faster at a diagonal can be a really fun movement technique.
@Phychologik Жыл бұрын
This is always something that you could do, but it's not always something that you should do. For example, I know undertale doesn't do this, as it doesn't really have a reason to. If you were to do this to a game like undertale, you would be slowing down the movement for no good reason. Now if you had a game where your speed not being consistent would upset the balance of the game, like a game where you spend a lot of time running away from enemies, this would be a pretty good change.
@LeSpatiocorneАй бұрын
That remembers me the fact that some old games forgot it in some situations like in hitman bloodmoney where you're faster when dragging a body in diagonal.
@b.s.76937 ай бұрын
Bethesda didnt't know that up to Oblivion...
@Greywander878 ай бұрын
This "bug" existed in a lot of older games. I remember in Perfect Dark on the N64, there were cheats you could unlock by beating levels in a certain time on a specific difficulty. By using diagonal strafing, you could speed your character up and beat the level faster. This is also an issue in any game with tile based movement, such as a lot of strategy games that use square grids. It's one of the reasons why a lot of people prefer hex grids, since there is no diagonal movement on a hex grid.
@ElFastasXD6 ай бұрын
Wow, 2D zelda games also reduces diagonal speed
@ChickenTandies9 ай бұрын
How anyone who goes through school and college not knowing this already baffles me. It’s vectors 101
@miles11we6 ай бұрын
Well maybe I didn't graduate 4th grade
@someone75549 ай бұрын
We wouldn’t have this problem if the pixels were hexagons
@addictionsucks88486 ай бұрын
I actually kind of prefer the faster diagonal speed. I think having things that make big fans of the game faster or stronger without specifically adding in more equipment for them to grind to is underated. Being able to go 40% faster by figuring this out is so much more fun for me as a player than logging 20 hours for voots that do the same. And it being available from the start of the game just means that any returning player will be rewarded with tips and tricks from their intial play through. It will also help cut the time to retrace steps and travel times
@nidodsonАй бұрын
It still feels faster, because the screen scrolls in both directions, instead of just one.
@ismyname_jep13942 жыл бұрын
Very informative, thank you!
@ImCrowned766 ай бұрын
Of all the math I’ve learned until now, the pythagorean theorem seems to be the only one that keeps popping up as useful
@diitrii8 ай бұрын
I love how you used two different algebra topics, even one from linear algebra, which is what I’m learning right now
@KieraQ03236 ай бұрын
That's why I run diagonally in real life.
@TheActualDP9 ай бұрын
i wrote a little multiplayer game as a kid where i noticed this, overcomplicated the math to fix it, and when me and my friends playtested it we decided it was more fun to keep fast the diagonal movement in
@gravestron96952 жыл бұрын
Very informative in terms of understanding why the problem is there. The video doesn't help much in terms of solving the problem though!
@firstname43372 жыл бұрын
I know, right normalize it ! ok, show me the math,
@dreamy978362 жыл бұрын
when moving diagonally divide the speed by √2 to normalize it
@warguy647410 ай бұрын
@firstname4337 divide the vector by the magnitude, also known as length. Generalized by sqrt(x^2 + y^2) for [x ,y] in R^2.
@vulkanosaure9 ай бұрын
a general version of the solution where the angle of movement can be any angle (not only multiple of 45°) would be to use trigonometry ; vx = cos(angle) * velocity vy = sin(angle) * velocity then use vx and vy to increment your character's position. that's what you would need if your input system allow you to go in any direction (ex following your mouse)
@veggiet20099 ай бұрын
And suddenly that "automatic" diagonal movement is no longer automatic
@core3gamegd5879 ай бұрын
As a speedruner and programmer, I prefer making it even a little faster just because of how fun it is.
@pryntik91366 ай бұрын
Thanks ! Thanks to you I finally understood standardization 😁
@arctic8137 Жыл бұрын
yeah i get that, BUT HOW DO I ACTUALLY ADD THIS!!!!
@ckorp666 Жыл бұрын
you could just add (a) conditional check(s) for two perpendicular directions, and have them multiply ur effective speed by .6 to reduce it by 40%
@arctic8137 Жыл бұрын
@@ckorp666 doesn’t help
@ckorp666 Жыл бұрын
@@arctic8137 aight i wrote this real quick in GML, it should get the job done - player object create: spd = 6 diag_mult = 1 - player object step: xmove = (keyboard_check(ord("D")) - keyboard_check(ord("A"))) ymove = (keyboard_check(ord("S")) - keyboard_check(ord("W"))) xspd = spd * xmove yspd = spd * ymove diag_mult = 1 if !(xmove = 0) && !(ymove = 0) { diag_mult = .6 } x = x + (xspd * diag_mult) y = y + (yspd * diag_mult)
@BoardGameMaker4108 Жыл бұрын
This is probably a late reply but oh well. To "normalise" like it says in the video, you divide the X and Y by the distance moved. So, If you are moving orthogonally, or vertically, divide the X and Y by 1. If you are moving diagonally, divide the X and Y by 1.4. The key thing is to slow yourself down if you are going diagonal. To implement this for any direction, you can do something like: (set initial movement) x = 2 y = 3 (work out length of move) length = √(x * x + y * y) (normalise movement by dividing by length) x / length y / length (movement should now be exactly 1 unit in any direction) (multiply by speed or whatever for final value). The other comment replied with multiplication probably because that's quicker for a computer to do iirc.
@BoardGameMaker4108 Жыл бұрын
@@dephoro Sure, I was just explaining how to "normalise" a vector, so I kept the example as simple as possible. Normally my implementation doesn't use any branches at all. Normally it's just something like: - Get initial vector from input. - Normalise the vector (should just be a function called Normalise) Literally two function calls, you would be hard pressed to find a solution cleaner than that. The Normalise function is also quite a common operation that has been optimised to death(atleast with improvements to sqrt). You can modify it further if you need extra features, but I don't think it gets much simpler or faster than just input.Normalise(). If your engine doesn't have a native Normalise(), you can implement it yourself using pythagoras (it's a single line for the equation, and doesn't involve any branches). Normalise just takes a vector (an X and Y value) and outputs circular values for them, exactly as you describe(It outputs on a unit circle though). What is the difference between your solution and just normalise?
@c4c4cr07739 ай бұрын
This is also true for Doom and Doom 2 and many other early FPS. Moving in diagonal is the base for many speedruns.
@Tragedy-Tv8 ай бұрын
Alternative idea, keep the quirks and have fun speedrun tech to boost your game’s replayability
@ieatmicroplasticsforlunch9 ай бұрын
Day 0 of not using the Pythagorean theorem as an adult in the real world
@RustyhairedAlp95758 ай бұрын
This is why mathematicians hate chess
@AmyStrikesBack4 ай бұрын
Theres also the pokémon/RPG maker strat: forcing the player to Walk in tiles
@wyattr79826 ай бұрын
I feel like a lot of PC ports don’t correct for this, and im grateful for that
@Mioxitty3 ай бұрын
Programming is the one place that made me grateful for school :)
@swolecole88995 ай бұрын
That’s why you move faster diagonally in undertale
@ThatRandomGamer_Main9 ай бұрын
So that’s why you move faster in some games.
@ProCoder20406 ай бұрын
I love the fast diagonal tho :(
@thegamingcow507227 күн бұрын
This is actually the first thing I learned for 2D movement in game design
@chainbladeallience8 ай бұрын
This didn't actually explain anything but it's hard to give programming tutorials through shorts, so I applaud you for trying anyway
@Krzztl2 ай бұрын
Oh so THAT’s how you use the pythagorean theorem
@Trashedaccount1238 ай бұрын
I thought I was going crazy when I was moving faster diagonally in Mother 3
@waynegalen15389 ай бұрын
This exact thing happens in the original Doom when you move forward and strafe at the same time
@CasualRandom506 ай бұрын
Yesssss math in coding I love math in code because it has automatic functions for finding things and it makes you feel smart
@amiboacid71838 ай бұрын
Elementary school knowledge
@JorisQC7 ай бұрын
One of the first things I learnt during my game development studies! 😊
@bradfjord8 ай бұрын
Understanding vectors and what normalizing does was like half of all my gamedev experience lmao
@traversal68819 ай бұрын
There's also potential key conflicts depending how you code it - you can make it OG Pokemon style where two buttons pressed prioritises the one last pressed, limiting movement to the four cardinal directions. I'm love my nostalgia so I like to do this, lol.
@Trenty_Boi9 ай бұрын
Remember kids: Even in vr games this diagonal concept works (I would know bec I've played vr games often that it works for but some you need to do it properly instead of just go diagonally)
@SiemJansen-x5fАй бұрын
Thank you! I’m creating a game with a friend for school and this really helped!
@heyspookyboogie6448 ай бұрын
Imagine if this was the kind of example used when teaching the Pythagorean theorem in school.
@Xero-phantom897068 ай бұрын
This breaks math
@wikedawsom9 ай бұрын
For anyone looking to implement this, just remember with the pythag theorem, "c" should equal 1 unit of movement, so "a" and "b" need to be adjusted to maintain the same angle, while resulting in the correct "c" distance. Thankfully, you can accomplish this with some simple equations, and computers have calculators built-in, so you don't have to do the math yourself :)
@ClodsireBcuzYes4 ай бұрын
the one and only time that will come in handy
@totallynotyourmom56838 ай бұрын
Bro actually found a use for the Pythagorean theorem
@TristanDena7 ай бұрын
If it helps anyone, you should add to x: cos(angle off of the x axis you're moving at) * desired movement speed, and add to y: sin(angle off the y) * movespeed. This way even if you were moving in 360 degrees, you will always move at your desired movespeed in any given direction. Good luck