Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do i make physics?
- NoodleBlock
-
Scratcher
5 posts
How do i make physics?
Hi Man (KO)
[scratchblocks/][scratchblocks]
move (66666:() steps
[/scratchblocks]
Last edited by NoodleBlock (Nov. 24, 2021 19:14:59)
- arcader_games
-
Scratcher
25 posts
How do i make physics?
If you're asking how to make Scratch physics realistic, it's pretty complicated.
Depending on what type of physics you want (gravity, water simulator, bounce and weight, ect…) there's a lot of different blocks needed to do so. Can you be a bit more specific on what type?
Depending on what type of physics you want (gravity, water simulator, bounce and weight, ect…) there's a lot of different blocks needed to do so. Can you be a bit more specific on what type?
- deck26
-
Scratcher
1000+ posts
How do i make physics?
Gravity is generally not too hard. Have y-velocity and each time through your main control loop subtract a value for gravity. For example, if you jump and set y-vel to 8 and have gravity as -2 your sprite would go up 8, then 6, then 4, 2, 0, and start falling -2, -4, -6 and so on.
Need more info regarding water. If you just mean a sprite is moving through water then you just need to reduce gravity and slow down x movement more quickly.
Need more info regarding water. If you just mean a sprite is moving through water then you just need to reduce gravity and slow down x movement more quickly.
- Minoru07
-
Scratcher
100+ posts
How do i make physics?
Gravity is always easy in games, but realistic physics is very difficult, so I have never bothered to try it out. If you want a simple physics engine, you can look at @funut's yt tutorial. If you want a more advanced physics engine, tutorials for them are available online, but they are in different coding languages, so they can be a bit difficult
- arcader_games
-
Scratcher
25 posts
How do i make physics?
I want gravity and water for my new game.
As has been said, gravity is relatively easy, water on the other hand isn't unheard of but certainly is a challenge. Water is something I could try to think but would require clones, tons of variables and hours of thought and trial and error.
I'd suggest either watching a couple tutorials on it, see if it's something you'd wanna include or just don't really do it and just have a basic blue costume, something like that.
- amazingscratchcoder
-
Scratcher
100+ posts
How do i make physics?
Does your water need to flow like terraria or do you just need the physics of being in the water
- tcz2022
-
Scratcher
4 posts
How do i make physics?
wow this is old
when green flag clicked
set [ v] to []
set [ v] to []
when this sprite clicked
if <touching [ v] ?> then
end
- coIIide
-
Scratcher
100+ posts
How do i make physics?
How do I make Collision Detection?Please create your own post for help. Do not necropost on old topics.
- Discussion Forums
- » Help with Scripts
-
» How do i make physics?