Hi! I’m afraid I don’t quite understand sin and cosine. It’ll seems very complicated, can someone teach me how? Thanks
This is an old topic explaining sin and cos and it’s using the old Hopscotch version, but it is still really helpful:
Mmmmmm… Maybe look it up on Google or something? Well, to make a circle with sin and cosine you just do this (you should also ask some other more educated people for help too):
let r = [what you want the radius of your circle to be]
let x = [the x where you want your circle to be]
let y = [the y where you want your circle to be]
Then, make a 7 = 7 block or just a repeat forever inside a game starts.
When 7 = 7
Set Position x ( r * cos(self(rotation)) + x) y (r*cos(self(rotation)) + x)
Here’s a screenshot if your a visual learner like me:
Here’s a link to the project: https://c.gethopscotch.com/p/zu990mz78
You beat me to it.
Thank you @William04GamerA! That’s really helpful! Here’s a question- do you have any game ideas?
Try making a dodging game where the enemies move in sine/cosine waves!
What @CreationsOfaNoob suggested is a really good idea! You can also take a look here for lots of ideas:
Come join the Party! Yayyy
Could someone help me as well? I also want to know a lot of math blocks.
Sine and cosine is blocks were you can do so objects are going around things.
In The first space you are going to write how far away from the point the object should be. In the second space you’ll insert a variable who’s increasing itself every time. (The speed).
And the last space is for were the point should be.
Cos, is for X/Widht. So put cos in the set pos. X.
Sine, is for Y/Height. So put sine in the set pos. Y.