Discuss Scratch
- Discussion Forums
- » Suggestions
- » Augmented Reality (AR) in Scratch?
- newSUPERMARIOTRASH
-
Scratcher
500+ posts
Augmented Reality (AR) in Scratch?
Lots of games and apps use augmented reality (or AR for short), such as Pokémon Go and Minecraft Earth. Even Nintendo made an AR game for the 3DS! But what if Scratch can use it?
- The stuff needed
- How this works
- The BLOCKS
//I made these sensing since the BLOCKS have nothing to do with the Pen extension.And that should be it for now.
go to [center v] of card::sensing//Options are center, front center, back center, etc…
glide (1) seconds to [center v] of card::sensing//Same options as last block
send card message [message1 v]::sensing//Basically just works like the broadcast block but for card sprites
when I receive card message [message1 v]:: sensing hat//same thing like the “when I receive” block
when screen touched::sensing hat//Detects for anywhere clicked
- Anuhmayshun
-
Scratcher
100+ posts
Augmented Reality (AR) in Scratch?
This is probably rejected, since this is kind of similar to 3D Scratch and virtual reality:
1.7 3D Scratch
This block, and others, could be used with a z-axis in the project stage to make it easier to create 3D projects. But, Scratch is a language that is designed to be as easy as possible for beginners to learn. Adding 3D features would make the language more difficult for beginners to understand, and a 3D engine is not exactly the purpose of Scratch. This suggestion also includes the possibility for virtual-reality features in Scratch, or “Scratch VR.” A lot of the same difficulties come up.
- weeeeeeeyay5
-
Scratcher
41 posts
Augmented Reality (AR) in Scratch?
Hi, so one thing I've seen on some projects is that you can move sprites based on camera movement, which could lead to basic AR. You could also put sensors on the edges of a sprite to make it smaller or larger depending on how close the camera is to something. Since you can also detect colors on camera, you could make sprites that appear when a sensor touches grass, for example. Or have a certain color change the background.
- weeeeeeeyay5
-
Scratcher
41 posts
Augmented Reality (AR) in Scratch?
when green flag clicked
forever
turn cw (video [rotation v] on [Sprite v]) degrees
move ((0) - (video [movement v] on [Sprite v])) steps
end
- newSUPERMARIOTRASH
-
Scratcher
500+ posts
Augmented Reality (AR) in Scratch?
do you are have stupidwhen green flag clicked
forever
turn cw (video [rotation v] on [Sprite v]) degrees
move ((0) - (video [movement v] on [Sprite v])) steps
end
- weeeeeeeyay5
-
Scratcher
41 posts
Augmented Reality (AR) in Scratch?
Lots of games and apps use augmented reality (or AR for short), such as Pokémon Go and Minecraft Earth. Even Nintendo made an AR game for the 3DS! But what if Scratch can use it?You can make AR by simply doing:So basically this will run on the technology of Nintendo’s AR Games app for 3DS. So if you can find some AR cards laying around, or if you can find some online, that’s all you need.
- The stuff needed
It’s simple. The user just flops down the ? card and then Scratch should read it. You can put multiple sprites onto the card (50 max, excluding clones). You can then program the sprites as usual.
- How this works
- The BLOCKS
//I made these sensing since the BLOCKS have nothing to do with the Pen extension.And that should be it for now.
go to [center v] of card::sensing//Options are center, front center, back center, etc…
glide (1) seconds to [center v] of card::sensing//Same options as last block
send card message [message1 v]::sensing//Basically just works like the broadcast block but for card sprites
when I receive card message [message1 v]:: sensing hat//same thing like the “when I receive” block
when screen touched::sensing hat//Detects for anywhere clicked
when green flag clickedCamera blocks appear red since I guess 2.0 didn't have them or something.
set rotation style [don't rotate v]
forever
point in direction (camera (direction v) on (sprite v))
move ((camera (motion v) on (sprite v)) / (7)) steps
Also, “when screen clicked” is exactly the same as “when stage clicked”.
Last edited by weeeeeeeyay5 (June 21, 2024 21:12:23)
- weeeeeeeyay5
-
Scratcher
41 posts
Augmented Reality (AR) in Scratch?
i accidentaly wrote twice on here, both times i was searching “ar mask in scratch” lol
- keistofer10
-
Scratcher
100+ posts
Augmented Reality (AR) in Scratch?
This idea is pretty interesting but it might be a bit too advanced for scratch
- anybodyoruser
-
Scratcher
10 posts
Augmented Reality (AR) in Scratch?
OK, ok. Stop with your blocks-base signatures, we are here to talk about scratch 3D AR. I found an amazing 3D framework here. I am changing it into a 3D AR framework. Do do the first step between 3D and 3D AR in this framework, simply replace the background decorations creation scripts with video detection blocks that turn the video on and set the transparancy to 100.
- gem1001
-
Scratcher
100+ posts
Augmented Reality (AR) in Scratch?
You can make AR by simply doing:2.0 did, it's that it actually says ‘video’ and uses rectangular dropdowns that you can't put reporters in:when green flag clickedCamera blocks appear red since I guess 2.0 didn't have them or something.
set rotation style [don't rotate v]
forever
point in direction (camera (direction v) on (sprite v))
move ((camera (motion v) on (sprite v)) / (7)) steps
(video [motion v] on [Stage v])
Last edited by gem1001 (June 22, 2024 14:15:08)
- newSUPERMARIOTRASH
-
Scratcher
500+ posts
Augmented Reality (AR) in Scratch?
it works on my phone (i don't have a webcam for my PC)Lots of games and apps use augmented reality (or AR for short), such as Pokémon Go and Minecraft Earth. Even Nintendo made an AR game for the 3DS! But what if Scratch can use it?You can make AR by simply doing:So basically this will run on the technology of Nintendo’s AR Games app for 3DS. So if you can find some AR cards laying around, or if you can find some online, that’s all you need.
- The stuff needed
It’s simple. The user just flops down the ? card and then Scratch should read it. You can put multiple sprites onto the card (50 max, excluding clones). You can then program the sprites as usual.
- How this works
- The BLOCKS
//I made these sensing since the BLOCKS have nothing to do with the Pen extension.And that should be it for now.
go to [center v] of card::sensing//Options are center, front center, back center, etc…
glide (1) seconds to [center v] of card::sensing//Same options as last block
send card message [message1 v]::sensing//Basically just works like the broadcast block but for card sprites
when I receive card message [message1 v]:: sensing hat//same thing like the “when I receive” block
when screen touched::sensing hat//Detects for anywhere clickedwhen green flag clickedCamera blocks appear red since I guess 2.0 didn't have them or something.
set rotation style [don't rotate v]
forever
point in direction (camera (direction v) on (sprite v))
move ((camera (motion v) on (sprite v)) / (7)) steps
Also, “when screen clicked” is exactly the same as “when stage clicked”.
- EyFox
-
Scratcher
4 posts
Augmented Reality (AR) in Scratch?
when green flag clicked
forever
set rotation style [ v]
point in direction ( v)
end
- Discussion Forums
- » Suggestions
-
» Augmented Reality (AR) in Scratch?






