Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Rotation based on speed
- Yusei-Fudo
-
Scratcher
1000+ posts
Rotation based on speed
How would you decide how fast and in which direction (Counter-Clockwise or Clockwise) would an object spin based on it's x accel. and y accel.?
Last edited by Yusei-Fudo (June 22, 2021 04:49:14)
- SuperRainbow1294
-
Scratcher
1 post
Rotation based on speed
If That's real block it was awesome!
when red button clicked
when red button clicked
- Yusei-Fudo
-
Scratcher
1000+ posts
Rotation based on speed
If That's real block it was awesome!
when red button clicked
Please do not post irrelevant responses, thanks.
- awesome-llama
-
Scratcher
1000+ posts
Rotation based on speed
Am I understanding this right, you want to accelerate a 2D object, but the force is applied not at its centre of mass (therefore some rotation will be caused)?
It's very-much physics related so if you wanted to understand it, you need to know the relationship between acceleration, angular acceleration, force, and torque.
I happen to have made up something which does do this, which looks like this:

NOTE: The custom blocks are made purple to improve readability.
It's not that big, but what each part is doing might be a bit tricky to understand.
Basically, what you need to do is this:

To get force, you need to use F=ma, where F is force (N), m is mass (kg), and a is acceleration (ms^2).
Here are the torque formulas too, you'll need it:

It's very-much physics related so if you wanted to understand it, you need to know the relationship between acceleration, angular acceleration, force, and torque.
I happen to have made up something which does do this, which looks like this:

NOTE: The custom blocks are made purple to improve readability.
It's not that big, but what each part is doing might be a bit tricky to understand.
Basically, what you need to do is this:

[An object's centre of mass] is located at [the red dot]. When a force F is applied to the particle, only the perpendicular component F⊥ produces a torque. This torque τ = r × F has magnitude τ = |r| |F⊥| = |r| |F| sin θ and is directed outward from the page.
To get force, you need to use F=ma, where F is force (N), m is mass (kg), and a is acceleration (ms^2).
Here are the torque formulas too, you'll need it:

Last edited by awesome-llama (June 22, 2021 05:44:44)
- Yusei-Fudo
-
Scratcher
1000+ posts
Rotation based on speed
Am I understanding this right, you want to accelerate a 2D object, but the force is applied not at its centre of mass (therefore some rotation will be caused)?0-0
It's very-much physics related so if you wanted to understand it, you need to know the relationship between acceleration, angular acceleration, force, and torque.
I happen to have made up something which does do this, which looks like this:
- snip -
NOTE: The custom blocks are made purple to improve readability.
It's not that big, but what each part is doing might be a bit tricky to understand.
Basically, what you need to do is this:
- snip -[An object's centre of mass] is located at [the red dot]. When a force F is applied to the particle, only the perpendicular component F⊥ produces a torque. This torque τ = r × F has magnitude τ = |r| |F⊥| = |r| |F| sin θ and is directed outward from the page.
To get force, you need to use F=ma, where F is force (N), m is mass (kg), and a is acceleration (ms^2).
Here are the torque formulas too, you'll need it:
- snip -
Is it because my math sucks, because I haven't learned it yet, or what that I don't understand?????? But thanks anyway!
- Discussion Forums
- » Help with Scripts
-
» Rotation based on speed