Discuss Scratch

sensei1007
Scratcher
14 posts

how do you raycast!?!?

the final thing i ever need to know on scratch is how do you raycast?! i know it involves
define 

but i need to know more (P.S you need to be more experienced in scratch to know what a raycast is and how to code it)
ErnieParke
Scratcher
1000+ posts

how do you raycast!?!?

Recasting involves quite a bit of math, especially 3D. Here is a nice Wiki tutorial on how to make recasting, both with sprites and lists: Raycasting (wiki)

Linking,

ErnieParke
sensei1007
Scratcher
14 posts

how do you raycast!?!?

ErnieParke wrote:

Recasting involves quite a bit of math, especially 3D. Here is a nice Wiki tutorial on how to make recasting, both with sprites and lists: Raycasting (wiki)

Linking,

ErnieParke


THANK U

Last edited by sensei1007 (Feb. 19, 2016 17:16:11)

BKFighter
Scratcher
1000+ posts

how do you raycast!?!?

If you know what a ray is, then just send a ray in all directions, and return the distance to an object. Ray: https://www.brightstorm.com/math/geometry/geometry-building-blocks/rays/
maxkapow
Scratcher
4 posts

how do you raycast!?!?

This is a website you might want to check out:
www.lodev.org/cgtutor/raytracing
brynmorien
Scratcher
1 post

how do you raycast!?!?

Raycasting seems to be quite difficult, and the scratch wiki isn't helping much, because I can't find out what sprites to put the code in, (I'm trying to learn sprite based,) and so all I ever get is a solid wall of color. Hopefully I'll find something online about this and I'll post it here.
cs544305
Scratcher
13 posts

how do you raycast!?!?

Raycasting is very easy.Use a square sprite.
when green flag clicked
forever
go to x: (0) y: (0)
clear
change y by (2)
stamp
change y by (2)
stamp
change y by (2)
stamp
change y by (2)
stamp
change y by (2)
stamp
change y by (2)
stamp
change y by (2)
stamp
change y by (2)
stamp
end

Last edited by cs544305 (May 28, 2017 21:06:04)

justdragon100
Scratcher
100+ posts

how do you raycast!?!?

scratch wiki has answers
justdragon100
Scratcher
100+ posts

how do you raycast!?!?

ErnieParke wrote:

Recasting involves quite a bit of math, especially 3D. Here is a nice Wiki tutorial on how to make recasting, both with sprites and lists: Raycasting (wiki)

Linking,

ErnieParke
how is list Raycast?
cs316735
Scratcher
30 posts

how do you raycast!?!?

See the Scratch Wiki. I learned about raycasting from it and now I use it in all sorts of games from racing games to platformers!
game_pr0grammer
Scratcher
500+ posts

how do you raycast!?!?

cs544305 wrote:

Raycasting is very easy.Use a square sprite.
when green flag clicked
forever
go to x: (0) y: (0)
clear
change y by (2)
stamp
change y by (2)
stamp
change y by (2)
stamp
change y by (2)
stamp
change y by (2)
stamp
change y by (2)
stamp
change y by (2)
stamp
change y by (2)
stamp
end[/quote]

this isn't even raycasting
another_one_2
Scratcher
100+ posts

how do you raycast!?!?

I think that's some type of joke 3D engine, it can't rotate around z or y axis
justdragon100
Scratcher
100+ posts

how do you raycast!?!?

game_pr0grammer wrote:

cs544305 wrote:

Raycasting is very easy.Use a square sprite.
when green flag clicked
forever
go to x: (0) y: (0)
clear
change y by (2)
stamp
change y by (2)
stamp
change y by (2)
stamp
change y by (2)
stamp
change y by (2)
stamp
change y by (2)
stamp
change y by (2)
stamp
change y by (2)
stamp
end[/quote]

this isn't even raycasting[/quote]
Well it is a different 3d engine
cevacineva
Scratcher
15 posts

how do you raycast!?!?

ErnieParke wrote:

Recasting involves quite a bit of math, especially 3D. Here is a nice Wiki tutorial on how to make recasting, both with sprites and lists: Raycasting (wiki)

Linking,

ErnieParke
There is a thing. The drawing function is broken, drawing only some lines, but the frames are still going low
To know the framerate, make this script:
when green flag clicked
forever
change [Counter v] by (1)
wait (0) secs
if <(timer) > [1]> then
reset timer
set [On Screen Counter v] to (join [FPS or anything you like: ] [(Counter)])
set [Counter v] to [0]
end
end
PrincessFlowerTV
Scratcher
1000+ posts

how do you raycast!?!?

Wow, six necroposts! And all after the topic creator got his answer… pity.

LOL, but seriously, this topic should get closed so this doesn't get any more necroposts…

Powered by DjangoBB