Discuss Scratch

aieau
Scratcher
14 posts

Help with making projectiles point towards their trajectory

I am making a project that uses velocity variables to allow projectiles to bounce off surfaces. however, I do not know how to calculate the direction of a projectile with the variables speed X and speed Y. help me please

Last edited by aieau (Feb. 25, 2022 20:45:04)


when green flag clicked
create clone of [A new scratch project]
wait (60) secs
add [scratch project] to [List of unfinished projects that I will never finish v]
Hooateme
Scratcher
29 posts

Help with making projectiles point towards their trajectory

is it as simple as
forever
glide (whatever) secs to x: (your x) y: (your y)
end
?
plus you could use
point in direction (<your x> and <your y>

Last edited by Hooateme (Feb. 25, 2022 20:59:41)

The_White_Totoro
Scratcher
5 posts

Help with making projectiles point towards their trajectory

I need trigonometry. The reply above i believe doesn't understand the question. look up SOCATOAH or something. If you aren't GCSE maths you might struggle so if you are a kid mabye wait a bit. Good luck
Hooateme
Scratcher
29 posts

Help with making projectiles point towards their trajectory

The_White_Totoro wrote:

I need trigonometry. The reply above i believe doesn't understand the question. look up SOCATOAH or something. If you aren't GCSE maths you might struggle so if you are a kid mabye wait a bit. Good luck
I do not
aieau
Scratcher
14 posts

Help with making projectiles point towards their trajectory

that did not really help. guess I have to make the projectiles balls

Last edited by aieau (Feb. 25, 2022 21:31:57)


when green flag clicked
create clone of [A new scratch project]
wait (60) secs
add [scratch project] to [List of unfinished projects that I will never finish v]
The_Imaginarium
Scratcher
1000+ posts

Help with making projectiles point towards their trajectory

point in direction (([atan v] of ((speedx) / (speedy))) + ((180) * <(speedy) > (0)>))

https://scratch.mit.edu/discuss/topic/194659/?page=1#post-1931086
aieau
Scratcher
14 posts

Help with making projectiles point towards their trajectory

Thanks, that was exactly what I was looking for.

when green flag clicked
create clone of [A new scratch project]
wait (60) secs
add [scratch project] to [List of unfinished projects that I will never finish v]

Powered by DjangoBB