how to make a hitbox: Make a costume with your hitbox (and ofc the player costume) use this code: When green flag clicked Forever switch costume to hitbox switch costume to player This happens because the script at the end always goes last.
Why did I think of this, “-1” times “x” will equal the opposite of the value inputted. My collision problems are over. Also Mythic Pixels for the win 😂
I have a question does it work in games that have a geometry dash style? that are like from the side and have jumping instead of going up?@@bigfatsnakeviiper
oh ok. Im asking because im using my own movement code and since ur making the collision physics by amplifying your own script i was just worried it might not work@@bigfatsnakeviiper
I love your videos dude, seriously these short and sweet tutorials are not only easy to understand but are also real time savers I was use to having to watch 25 minute videos breaking all of this down but you managed to do it in just 2. You deserve more subs. Easily one of the best scratch youtubers.
Simple and awesome tutorial, + sub, and a huge respect. I am not a beginner in Scratch but anyway this tutorial saved me from loosing tons of time. Very useful!
You also can make like this: put forever, if touching (Wall) then move ( negative player speed )if the wall if on right side or ( player speed ) if the wall its on left side hope you understand
i have a video idea if its possible to do : try make a game where u have to dodge the exploding barrel from the sky and the longer you survive you get points (rest is optional) you can make a store for the points with powerups
Online? If you can't I don't mind making games without online But if you can please tell me ❤ Also, I love your tutorials you getting a new subscriber!!!
hello, I have the exact same movement code as you exact same collision code as you but when I run the game and try to use wasd my ctrls are inverted and scratch is jumping in steps like change y by 2 each time I press w/s same for a/d
My way to make collisions is making two variables, old x and old y, put them in the top of the forever loop and when the "Player" sprite is colliding with "Ground" set x to old x (put it after the "change x by "x vel"" variable). And the same for y
@@bigfatsnakeviiper ermm, when i watched it till the end, vertical colission are in there so my bad but if i recreate this tut it just slows my player instead of tottaly stopping it
I'm making a game where the player isn't restricted to just changing the x and y directly when moving, the player can rotate freely and move forward/backwards/side to side relative to their direction. How would I change this code to accommodate this?
Good Tutorial But I'm Having An Issue With The Y Collisions. When The Player (In My Case, The Red Bird From Angry Birds) Touches The Level From The Y Axis He Goes Through The Ground Slowly And At A Diagonal Angle. This Doesn't Happen For The X Axis And I Have Been Following The Tutorials Making Sure Everything Is Like The Code Shown. Still, Good Tutorial.
yo when I try to make like blocks that my character can collide with (ground in your case) the hitbox of the whole sprite becomes a cube and my character is always in it, how do I fix this?
when i tried this the character sprite phased through the wall. i have read some of the comments and nobody else has had the problem where the code does nothing if someone can figure out why it doesn't work for me that would be helpful.
I dont understand but when i was testing the y coordinates the sprite starts to go diagonally could u help i tired doing as you said step by step but didn't work pls help(i use scratch 3
Hey uhm just wondering if you can help on wall collisions, ive watched alot of tutorials and unfortunately none of them seem to be working? im currently making a game for our school project and a little assist could help, if you're interested i can send you the link of our game to see for yourself. THANK YOU! :)
Make sure that you didn’t use a change x by block in both if conditions. If that’s not it, make sure you didn’t use the x vel block in both if conditions. I hope this helped. 😁
how to make a hitbox:
Make a costume with your hitbox (and ofc the player costume) use this code:
When green flag clicked
Forever
switch costume to hitbox
switch costume to player
This happens because the script at the end always goes last.
Thanks 👍
what happens if its a game were you jump mine is
X
@@AFellowObjectShowFan or you could make a different sprite and you could have the other sprite(costume) move to the hitbox.
Why did I think of this, “-1” times “x” will equal the opposite of the value inputted. My collision problems are over. Also Mythic Pixels for the win 😂
Comment any tutorials that you would like to see from this channel.😀
gravity/jumping please
@@meowmeow6743 I've actually already done that in this video: Simple Jumping Physics in Under a Minute
ua-cam.com/video/rk5iz8XFMpw/v-deo.html
Clicker game please
heyy viper im rlly just a beginner and idk how to hide and restart the game when i lose
How to make an RPG
THANK YOU SO MUCH, I've watched so many videos and this one worked. Who knew the shortest video is the best. Thank You!
yo you really helped me to make good movement for my game and collision. you are VERY underrated you are pretty good tbh
Thanks!
@@bigfatsnakeviiper np
This Was the BEST tutorial I’ve seen on collision. I will be using this in the future!
Thank you!
I have a question does it work in games that have a geometry dash style? that are like from the side and have jumping instead of going up?@@bigfatsnakeviiper
@@ArtscoStudioShorts It depends on which jumping code you are using, but in a lot of cases it will work.
oh ok. Im asking because im using my own movement code and since ur making the collision physics by amplifying your own script i was just worried it might not work@@bigfatsnakeviiper
ur channel is the best, it helps me out so much!!!! i remember the easy movement and i can do it by myself now! i honestly can not thank you more.
Happy to help!
I love your videos dude, seriously these short and sweet tutorials are not only easy to understand but are also real time savers I was use to having to watch 25 minute videos breaking all of this down but you managed to do it in just 2. You deserve more subs. Easily one of the best scratch youtubers.
Glad you like them!
scratch cat my boy keeps phasing through walls and going "HEEELP HEEELP HEELP MEEE HEEELP"
@@socal_2424 same, did you find a fix?
Thanks for the tutorial, I really needed it for an RPG game 😊
Oh ok
Glad I could help!
Simple and awesome tutorial, + sub, and a huge respect. I am not a beginner in Scratch but anyway this tutorial saved me from loosing tons of time. Very useful!
Thanks!
im probably an average LOL
Love your vids! Keep up the good work :))
Thank you!
making a pizza tower-esque game on scratch and you wouldnt believe how much your tutorials helped me
Thanks soo much Viiperr! I really needed this for my game. I appreciate it!
You got a new subscriber :D
Thanks1
Np:D
Another tutorial by this guy that I needed, ty!
editing skills 11/10 keep it up :)
Thanks
@@bigfatsnakeviiper😄
💯
im not a scratch developer but i like watching this channel
Thanks.
viperr > khan academy
Good topic. Good explanation 😊😊
Agreed. Great vid!
Thanks
@@bigfatsnakeviiper no problem! You explained this very well!
Thank you so much. I've never understood collisions in Scratch. It turns out that by "touching" it means to overlap the sprite you want to touch.
Glad it helped!
Wow!Great Job!🎉🎉😊.
Thank you! 😃
@@bigfatsnakeviiperYour Welcome!.
Also it can be 0 - x vel
Yeah
@@bigfatsnakeviiperViper? From Top Gun?
No lol
You also can make like this:
put forever, if touching (Wall) then move ( negative player speed )if the wall if on right side or
( player speed ) if the wall its on left side
hope you understand
Thank you so much! My old collision system just made the wall like Glue. This has fixed that issue!😁
Glad I could help!
What time do you upload
I don't have a particular upload schedule, but you can expect a video ever week or two.
Thanks this was really helpful
Thanks for the help before mine colison and movement were very laggy and now they are very smooth thanks!
Glad I could help!
i have a video idea if its possible to do : try make a game where u have to dodge the exploding barrel from the sky and the longer you survive you get points (rest is optional) you can make a store for the points with powerups
I will keep that in mind.
what do you mean "if its possible to do"? this is a game engine,of course you can make any game no matter how complex
great job! could you do a video about the easiest way to raycast?
Raycasting isn't easy, but I will look into it.
@@bigfatsnakeviiper thank you
W I love ur channel keep it up mate!
Thanks, will do!
thanksssssssss for this video i am making among us😀😀😀😀😀😀😀😀😀
Hope you enjoy
I was having a huge bug with a wall clipping problem, realized it was because I didn't replace the change x with a change y.
My Scratch cat head stuck in the celling when trying to collide
same
Helps me with my TWHG Testing project.
Can you make a video about how to easily make gravity In games?
I've actually already done that in this video: Simple Jumping Physics in Under a Minute
ua-cam.com/video/rk5iz8XFMpw/v-deo.html
@@bigfatsnakeviiperI thanks I didn’t see that because it was a short lol
bros the reason good job exists
I have a question. Is there a way to make this work for a simple AI, which just points towards the player and moves?
Just subed
Thanks.
Thanks man that helped a lot. Like and Sub
how did you get the theme color on green?, also cool video
Thanks man! Its really helpfull
Glad it helped!
Haha now i will make a...... PLATFORMER 👹👹👹👹
this help TYSM!
2:17 he go into da backrooms
Online?
If you can't I don't mind making games without online
But if you can please tell me ❤
Also, I love your tutorials you getting a new subscriber!!!
I will consider making a video on that subject in the future. :)
@@bigfatsnakeviiper thank you ❤️
hello, I have the exact same movement code as you exact same collision code as you but when I run the game and try to use wasd my ctrls are inverted and scratch is jumping in steps like change y by 2 each time I press w/s same for a/d
Nvm I was just being dumb :D
How do I make it go in the opposite direction when a sprite touches it
I did that and that didnt work i used offline editor
Can you please tell me what part didn’t work?
@@bigfatsnakeviiper i tried that and it was so bad that when i go to the center collision occurrs
I'm sorry to hear that. Do you perhaps have a Scratch account where you could post what you have so that I can fix what is wrong?
great!
My way to make collisions is making two variables, old x and old y, put them in the top of the forever loop and when the "Player" sprite is colliding with "Ground" set x to old x (put it after the "change x by "x vel"" variable). And the same for y
Nice!
for some reason your cat stays still but mine like bounces off the wall??
pls help
Collision chain
Collision
Collision
x vel in german???
x Geschwindigkeit (x gesch) im guessing
I just put it in my back pack so I don't have to do the script again =]
Good idea.
can u make tut for vertical collisions
Vertical colisions work with this tutorial
@@bigfatsnakeviiper ermm, when i watched it till the end, vertical colission are in there so my bad but if i recreate this tut it just slows my player instead of tottaly stopping it
I'm making a game where the player isn't restricted to just changing the x and y directly when moving, the player can rotate freely and move forward/backwards/side to side relative to their direction. How would I change this code to accommodate this?
Coming soon.. Collisions in Scratch - The HARD WAY
cant see x vel
thanks
No problem
Good Tutorial But I'm Having An Issue With The Y Collisions. When The Player (In My Case, The Red Bird From Angry Birds) Touches The Level From The Y Axis He Goes Through The Ground Slowly And At A Diagonal Angle. This Doesn't Happen For The X Axis And I Have Been Following The Tutorials Making Sure Everything Is Like The Code Shown. Still, Good Tutorial.
i used all three of your tutorials but when I go on top of an platform in stops the cat from moving how do I fix that?
I did exactly what you did and it just the collisions just make the play slow down, please help
For some reason my player can still go through the ground but just slower
Make sure that your set x vel to x vel *0.8 blocks are above your change x by x vel blocks. (Do the same thing for y)
@@bigfatsnakeviiper It is, i dont know wh its doing this
yo when I try to make like blocks that my character can collide with (ground in your case) the hitbox of the whole sprite becomes a cube and my character is always in it, how do I fix this?
when i tried this the character sprite phased through the wall. i have read some of the comments and nobody else has had the problem where the code does nothing if someone can figure out why it doesn't work for me that would be helpful.
annd what happens if i dont use a smooth movement and instead use the
(move ( ) block)?
Very extremly good tutorial but there's a problem, the player isn't actually touching the level. It is one pixel further.
I dont understand but when i was testing the y coordinates the sprite starts to go diagonally could u help i tired doing as you said step by step but didn't work pls help(i use scratch 3
How can this be done with clones?
uhh with me it just keep bouncing off and when its on Y axis it simply freeze, i think its a problem with my other piece of the code
What is xvel
wen i walk in a wall (with ate code) it sends it back by 6. (i some how made a bouncy wall while trying to fix it)
How do we make Controls
for mobile
Good tutorial, but can't you just do if touching (sprite) move -10 steps?
That wouldn't work. Because the momentum is more than 10 steps, the player would eventually go inside walls.
@@bigfatsnakeviiper Thank you for telling me :D
i recently noticed that while working on a project.
How do i make it so my guy won't slow down before hitting the wall
"easy way"
yes very ez
Hey uhm just wondering if you can help on wall collisions, ive watched alot of tutorials and unfortunately none of them seem to be working? im currently making a game for our school project and a little assist could help, if you're interested i can send you the link of our game to see for yourself. THANK YOU! :)
Thank you very very much
what happens if its a game were you jump??? mine is
Where do i find the x vel block
You make it
Does this works for scrolling game?
Make a more advanced one because I FOUND A WAY TO CLIP THROUGH WALLS IN MY FIRST 1 MINUTE OF TESTING.
W
I use a simpler way then that
What would that be?
How to make it so when a sprite touches a sprite you die
bro for me is just makeing me go in the x val i to the walls and only the y val woarks
after i did the collision detection my sprite cant move for some reason? can someone tell me why
Cool video but are you already did this in the platformer video
Yes I have, but this is for my smooth movement scripts which is better.
it dosent work bc my sprite follows the mouse pointer
For some reason when my sprite goes up to walls, the collision doesn’t work. But works when it hits walls going left or right, idk how to fix that 😅
Make sure that you didn’t use a change x by block in both if conditions. If that’s not it, make sure you didn’t use the x vel block in both if conditions. I hope this helped. 😁
@@bigfatsnakeviiper I accidentally put “change x by y vel x -1” 😭
i cant find the touching ground? block
breo r u dumb
i didn't use your code for the movement so now its all screwed up :(
I cant find the ground in if touching
You need to male a new ground sprite for that.
What is x vel?
Follow my smooth movement tutorial first
It doesn’t work
With gravity
It was acting a little weird and I don't know why
i cant find the touching ground
Go to sensing and find the 'touching (selection)' block and select whatever your ground is on the selection.
@@BoilingKettle thanks but i already finished my project
I found a glitch in your code i can phase through my wall
😀😁
E