Discuss Scratch
- ilikerats4
-
Scratcher
100+ posts
how do i make an arm?
so im making a arm and i want to control it with my mouse but im having a hard time here it is https://scratch.mit.edu/projects/1326186851/ please help me fix this problem,
- dem_bot
-
Scratcher
1000+ posts
how do i make an arm?
https://scratch.mit.edu/projects/1326367686/
So essentially, what I did was just go through the angles until the amount it was off from the right distance was as low as possible. I did a few attempts at finding a formula to get theta directly, but ig im too bad at maths to solve that.
So essentially, what I did was just go through the angles until the amount it was off from the right distance was as low as possible. I did a few attempts at finding a formula to get theta directly, but ig im too bad at maths to solve that.
- Jlerpy
-
Scratcher
1000+ posts
how do i make an arm?
If you want to control it with your mouse (by which I'm guessing you want to have the hand move to the mouse pointer, and the arm bend accordingly, then I think the easiest way would be to use triangular wizardry, treating the distance between the “shoulder” and the “hand” as one side of a triangle, and keeping the lengths of the other two sides fixed (the upper arm and forearm), from which you can calculate the angle at the intersection between those two sides. Then from that you can calculate how much to turn and move.
- ilikerats4
-
Scratcher
100+ posts
how do i make an arm?
If you want to control it with your mouse (by which I'm guessing you want to have the hand move to the mouse pointer, and the arm bend accordingly, then I think the easiest way would be to use triangular wizardry, treating the distance between the “shoulder” and the “hand” as one side of a triangle, and keeping the lengths of the other two sides fixed (the upper arm and forearm), from which you can calculate the angle at the intersection between those two sides. Then from that you can calculate how much to turn and move.can you please add it to the project? i dont understand i would love it if you like just fix the project or show it with scratch projects..
- ilikerats4
-
Scratcher
100+ posts
how do i make an arm?
If you want to control it with your mouse (by which I'm guessing you want to have the hand move to the mouse pointer, and the arm bend accordingly, then I think the easiest way would be to use triangular wizardry, treating the distance between the “shoulder” and the “hand” as one side of a triangle, and keeping the lengths of the other two sides fixed (the upper arm and forearm), from which you can calculate the angle at the intersection between those two sides. Then from that you can calculate how much to turn and move.please elebarote
- dem_bot
-
Scratcher
1000+ posts
how do i make an arm?
triangular wizardryI kinda forgot
cos(A) = (b^2 + c^2 - a^2)/(2bc)
was a thing lol
well so you can use Pythagoras' theorem to compute the distance between hand and shoulder, then, along with the upper and lower arm lengths, you have a b and c. That you can then plop into this formula, take the acos of the answer and you have an angle of one of the joints.
- ilikerats4
-
Scratcher
100+ posts
how do i make an arm?
please use scratch blocs so i can understandtriangular wizardryI kinda forgot
cos(A) = (b^2 + c^2 - a^2)/(2bc)
was a thing lol
well so you can use Pythagoras' theorem to compute the distance between hand and shoulder, then, along with the upper and lower arm lengths, you have a b and c. That you can then plop into this formula, take the acos of the answer and you have an angle of one of the joints.
- ilikerats4
-
Scratcher
100+ posts
how do i make an arm?
hello?please use scratch blocs so i can understandtriangular wizardryI kinda forgot
cos(A) = (b^2 + c^2 - a^2)/(2bc)
was a thing lol
well so you can use Pythagoras' theorem to compute the distance between hand and shoulder, then, along with the upper and lower arm lengths, you have a b and c. That you can then plop into this formula, take the acos of the answer and you have an angle of one of the joints.
- Jlerpy
-
Scratcher
1000+ posts
how do i make an arm?
I'm much better at expressing in actual blocks than forum blocks, so here's a worked example: https://scratch.mit.edu/projects/1326867984/
It all hinges on the principle that dem_bot said, that you can calculate the sides of a right triangle from the values of the other sides, because the length of the hypotenuse is always the square root of the squares of the other two sides added together.
And if we define the length of our forearm and upper arm as the hypotenuse of a triangle, then we can use half the distance from our start point to the mouse pointer as one of the other sides, and from that, calculate the length of the third side - the distance between the midpoint between shoulder and mouse pointer and the elbow.
It all hinges on the principle that dem_bot said, that you can calculate the sides of a right triangle from the values of the other sides, because the length of the hypotenuse is always the square root of the squares of the other two sides added together.
And if we define the length of our forearm and upper arm as the hypotenuse of a triangle, then we can use half the distance from our start point to the mouse pointer as one of the other sides, and from that, calculate the length of the third side - the distance between the midpoint between shoulder and mouse pointer and the elbow.
- ilikerats4
-
Scratcher
100+ posts
how do i make an arm?
I'm much better at expressing in actual blocks than forum blocks, so here's a worked example: https://scratch.mit.edu/projects/1326867984/so when i make it smaller it dosent work
It all hinges on the principle that dem_bot said, that you can calculate the sides of a right triangle from the values of the other sides, because the length of the hypotenuse is always the square root of the squares of the other two sides added together.
And if we define the length of our forearm and upper arm as the hypotenuse of a triangle, then we can use half the distance from our start point to the mouse pointer as one of the other sides, and from that, calculate the length of the third side - the distance between the midpoint between shoulder and mouse pointer and the elbow.
- ilikerats4
-
Scratcher
100+ posts
how do i make an arm?
I'm much better at expressing in actual blocks than forum blocks, so here's a worked example: https://scratch.mit.edu/projects/1326867984/hello?
It all hinges on the principle that dem_bot said, that you can calculate the sides of a right triangle from the values of the other sides, because the length of the hypotenuse is always the square root of the squares of the other two sides added together.
And if we define the length of our forearm and upper arm as the hypotenuse of a triangle, then we can use half the distance from our start point to the mouse pointer as one of the other sides, and from that, calculate the length of the third side - the distance between the midpoint between shoulder and mouse pointer and the elbow.
- dem_bot
-
Scratcher
1000+ posts
how do i make an arm?
so when i make it smaller it dosent workwhen i make it smaller it does work. The project just lacks a bit to prevent your mouse from going out of range, meaning it goes flying.
- ilikerats4
-
Scratcher
100+ posts
how do i make an arm?
yeah i need a better remix and a small script for itso when i make it smaller it dosent workwhen i make it smaller it does work. The project just lacks a bit to prevent your mouse from going out of range, meaning it goes flying.
- Jlerpy
-
Scratcher
1000+ posts
how do i make an arm?
I'm much better at expressing in actual blocks than forum blocks, so here's a worked example: https://scratch.mit.edu/projects/1326867984/hello?
It all hinges on the principle that dem_bot said, that you can calculate the sides of a right triangle from the values of the other sides, because the length of the hypotenuse is always the square root of the squares of the other two sides added together.
And if we define the length of our forearm and upper arm as the hypotenuse of a triangle, then we can use half the distance from our start point to the mouse pointer as one of the other sides, and from that, calculate the length of the third side - the distance between the midpoint between shoulder and mouse pointer and the elbow.
Stop bumping so soon. You're meant to wait a whole 24 hours before bumping.
- ilikerats4
-
Scratcher
100+ posts
how do i make an arm?
okay??? i just bumped cuz like no one was helping me out goodly :I'm much better at expressing in actual blocks than forum blocks, so here's a worked example: https://scratch.mit.edu/projects/1326867984/hello?
It all hinges on the principle that dem_bot said, that you can calculate the sides of a right triangle from the values of the other sides, because the length of the hypotenuse is always the square root of the squares of the other two sides added together.
And if we define the length of our forearm and upper arm as the hypotenuse of a triangle, then we can use half the distance from our start point to the mouse pointer as one of the other sides, and from that, calculate the length of the third side - the distance between the midpoint between shoulder and mouse pointer and the elbow.
Stop bumping so soon. You're meant to wait a whole 24 hours before bumping.

- dem_bot
-
Scratcher
1000+ posts
how do i make an arm?
hello??well, to me this topic seems answered already. Please elaborate on what you still want.
- ilikerats4
-
Scratcher
100+ posts
how do i make an arm?
just someone to give me the answer i need in scratch blocks aka thesehello??well, to me this topic seems answered already. Please elaborate on what you still want.
move () stepsscratch blocks becuase i dont understand