Apply force to bottom of object given rotation
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have a box and I want to apply a force in the direction that the bottom of the box is facing, given any Pitch, Roll, or Yaw rotation. At a resting point where pitch, roll, and yaw are 0, I know the downward force would be: x = 0, y = 0, z = -n, as the box is laying flat.
I also have the box's quaternion (qx, qy, qz, qw) available if that is helpful.
Here is a visual example showing my question:
A box with a pitch of 0
A box with a pitch of 90
How can I get this force using the objects rotation?
trigonometry rotations
 |Â
show 1 more comment
up vote
0
down vote
favorite
I have a box and I want to apply a force in the direction that the bottom of the box is facing, given any Pitch, Roll, or Yaw rotation. At a resting point where pitch, roll, and yaw are 0, I know the downward force would be: x = 0, y = 0, z = -n, as the box is laying flat.
I also have the box's quaternion (qx, qy, qz, qw) available if that is helpful.
Here is a visual example showing my question:
A box with a pitch of 0
A box with a pitch of 90
How can I get this force using the objects rotation?
trigonometry rotations
@mvw The force will be applied in a loop, so as the rotation changes, the direction of the force needs to change with it to always be applied to the top of the box. At any given time I need to be able to get the direction the force needs to be in using the current rotation
– funcs
Jul 25 at 18:51
@mvw you are correct, sorry for my misuse of the terms!
– funcs
Jul 25 at 18:54
@mvw I am looking to get the X, Y, and Z direction of force (in my particular case, Z is less necessary)
– funcs
Jul 25 at 18:57
Is there no way to calculate the force from the present orientation alone? I don't think that's what I'm trying to find. The goal is the simulated gravity relative to the objects orientation.
– funcs
Jul 25 at 19:09
@mvw I believe my problem is much for simple than your interpretation of it. Lets just say for example my box's current orientation is: Pitch=90, Roll=10, Yaw=20. There is 0 force presently on the object (I need to calculate it and apply it myself!). Using that orientation information, can I calculate what the force needs to be to push on the top of the object. I also have the box's quaternion available if that is helpful.
– funcs
Jul 25 at 19:31
 |Â
show 1 more comment
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a box and I want to apply a force in the direction that the bottom of the box is facing, given any Pitch, Roll, or Yaw rotation. At a resting point where pitch, roll, and yaw are 0, I know the downward force would be: x = 0, y = 0, z = -n, as the box is laying flat.
I also have the box's quaternion (qx, qy, qz, qw) available if that is helpful.
Here is a visual example showing my question:
A box with a pitch of 0
A box with a pitch of 90
How can I get this force using the objects rotation?
trigonometry rotations
I have a box and I want to apply a force in the direction that the bottom of the box is facing, given any Pitch, Roll, or Yaw rotation. At a resting point where pitch, roll, and yaw are 0, I know the downward force would be: x = 0, y = 0, z = -n, as the box is laying flat.
I also have the box's quaternion (qx, qy, qz, qw) available if that is helpful.
Here is a visual example showing my question:
A box with a pitch of 0
A box with a pitch of 90
How can I get this force using the objects rotation?
trigonometry rotations
edited Jul 25 at 19:33
asked Jul 25 at 18:33
funcs
11
11
@mvw The force will be applied in a loop, so as the rotation changes, the direction of the force needs to change with it to always be applied to the top of the box. At any given time I need to be able to get the direction the force needs to be in using the current rotation
– funcs
Jul 25 at 18:51
@mvw you are correct, sorry for my misuse of the terms!
– funcs
Jul 25 at 18:54
@mvw I am looking to get the X, Y, and Z direction of force (in my particular case, Z is less necessary)
– funcs
Jul 25 at 18:57
Is there no way to calculate the force from the present orientation alone? I don't think that's what I'm trying to find. The goal is the simulated gravity relative to the objects orientation.
– funcs
Jul 25 at 19:09
@mvw I believe my problem is much for simple than your interpretation of it. Lets just say for example my box's current orientation is: Pitch=90, Roll=10, Yaw=20. There is 0 force presently on the object (I need to calculate it and apply it myself!). Using that orientation information, can I calculate what the force needs to be to push on the top of the object. I also have the box's quaternion available if that is helpful.
– funcs
Jul 25 at 19:31
 |Â
show 1 more comment
@mvw The force will be applied in a loop, so as the rotation changes, the direction of the force needs to change with it to always be applied to the top of the box. At any given time I need to be able to get the direction the force needs to be in using the current rotation
– funcs
Jul 25 at 18:51
@mvw you are correct, sorry for my misuse of the terms!
– funcs
Jul 25 at 18:54
@mvw I am looking to get the X, Y, and Z direction of force (in my particular case, Z is less necessary)
– funcs
Jul 25 at 18:57
Is there no way to calculate the force from the present orientation alone? I don't think that's what I'm trying to find. The goal is the simulated gravity relative to the objects orientation.
– funcs
Jul 25 at 19:09
@mvw I believe my problem is much for simple than your interpretation of it. Lets just say for example my box's current orientation is: Pitch=90, Roll=10, Yaw=20. There is 0 force presently on the object (I need to calculate it and apply it myself!). Using that orientation information, can I calculate what the force needs to be to push on the top of the object. I also have the box's quaternion available if that is helpful.
– funcs
Jul 25 at 19:31
@mvw The force will be applied in a loop, so as the rotation changes, the direction of the force needs to change with it to always be applied to the top of the box. At any given time I need to be able to get the direction the force needs to be in using the current rotation
– funcs
Jul 25 at 18:51
@mvw The force will be applied in a loop, so as the rotation changes, the direction of the force needs to change with it to always be applied to the top of the box. At any given time I need to be able to get the direction the force needs to be in using the current rotation
– funcs
Jul 25 at 18:51
@mvw you are correct, sorry for my misuse of the terms!
– funcs
Jul 25 at 18:54
@mvw you are correct, sorry for my misuse of the terms!
– funcs
Jul 25 at 18:54
@mvw I am looking to get the X, Y, and Z direction of force (in my particular case, Z is less necessary)
– funcs
Jul 25 at 18:57
@mvw I am looking to get the X, Y, and Z direction of force (in my particular case, Z is less necessary)
– funcs
Jul 25 at 18:57
Is there no way to calculate the force from the present orientation alone? I don't think that's what I'm trying to find. The goal is the simulated gravity relative to the objects orientation.
– funcs
Jul 25 at 19:09
Is there no way to calculate the force from the present orientation alone? I don't think that's what I'm trying to find. The goal is the simulated gravity relative to the objects orientation.
– funcs
Jul 25 at 19:09
@mvw I believe my problem is much for simple than your interpretation of it. Lets just say for example my box's current orientation is: Pitch=90, Roll=10, Yaw=20. There is 0 force presently on the object (I need to calculate it and apply it myself!). Using that orientation information, can I calculate what the force needs to be to push on the top of the object. I also have the box's quaternion available if that is helpful.
– funcs
Jul 25 at 19:31
@mvw I believe my problem is much for simple than your interpretation of it. Lets just say for example my box's current orientation is: Pitch=90, Roll=10, Yaw=20. There is 0 force presently on the object (I need to calculate it and apply it myself!). Using that orientation information, can I calculate what the force needs to be to push on the top of the object. I also have the box's quaternion available if that is helpful.
– funcs
Jul 25 at 19:31
 |Â
show 1 more comment
1 Answer
1
active
oldest
votes
up vote
0
down vote
I expanded my search terms to finding a force direction from a quaternion and was able to find an excellent answer by a user named Dobbs:
forward vector:
x = 2 * (xz + wy)
y = 2 * (yz - wx)
z = 1 - 2 * (xx + yy)
up vector:
x = 2 * (xy - wz)
y = 1 - 2 * (xx + zz)
z = 2 * (yz + wx)
left vector:
x = 1 - 2 * (yy + zz)
y = 2 * (xy + wz)
z = 2 * (xz - wy)
Using the "forward vector" with a negative magnitude I was able to apply a constant force onto the top of my object, no matter the orientation.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I expanded my search terms to finding a force direction from a quaternion and was able to find an excellent answer by a user named Dobbs:
forward vector:
x = 2 * (xz + wy)
y = 2 * (yz - wx)
z = 1 - 2 * (xx + yy)
up vector:
x = 2 * (xy - wz)
y = 1 - 2 * (xx + zz)
z = 2 * (yz + wx)
left vector:
x = 1 - 2 * (yy + zz)
y = 2 * (xy + wz)
z = 2 * (xz - wy)
Using the "forward vector" with a negative magnitude I was able to apply a constant force onto the top of my object, no matter the orientation.
add a comment |Â
up vote
0
down vote
I expanded my search terms to finding a force direction from a quaternion and was able to find an excellent answer by a user named Dobbs:
forward vector:
x = 2 * (xz + wy)
y = 2 * (yz - wx)
z = 1 - 2 * (xx + yy)
up vector:
x = 2 * (xy - wz)
y = 1 - 2 * (xx + zz)
z = 2 * (yz + wx)
left vector:
x = 1 - 2 * (yy + zz)
y = 2 * (xy + wz)
z = 2 * (xz - wy)
Using the "forward vector" with a negative magnitude I was able to apply a constant force onto the top of my object, no matter the orientation.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I expanded my search terms to finding a force direction from a quaternion and was able to find an excellent answer by a user named Dobbs:
forward vector:
x = 2 * (xz + wy)
y = 2 * (yz - wx)
z = 1 - 2 * (xx + yy)
up vector:
x = 2 * (xy - wz)
y = 1 - 2 * (xx + zz)
z = 2 * (yz + wx)
left vector:
x = 1 - 2 * (yy + zz)
y = 2 * (xy + wz)
z = 2 * (xz - wy)
Using the "forward vector" with a negative magnitude I was able to apply a constant force onto the top of my object, no matter the orientation.
I expanded my search terms to finding a force direction from a quaternion and was able to find an excellent answer by a user named Dobbs:
forward vector:
x = 2 * (xz + wy)
y = 2 * (yz - wx)
z = 1 - 2 * (xx + yy)
up vector:
x = 2 * (xy - wz)
y = 1 - 2 * (xx + zz)
z = 2 * (yz + wx)
left vector:
x = 1 - 2 * (yy + zz)
y = 2 * (xy + wz)
z = 2 * (xz - wy)
Using the "forward vector" with a negative magnitude I was able to apply a constant force onto the top of my object, no matter the orientation.
answered Jul 27 at 17:26
funcs
11
11
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2862700%2fapply-force-to-bottom-of-object-given-rotation%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
@mvw The force will be applied in a loop, so as the rotation changes, the direction of the force needs to change with it to always be applied to the top of the box. At any given time I need to be able to get the direction the force needs to be in using the current rotation
– funcs
Jul 25 at 18:51
@mvw you are correct, sorry for my misuse of the terms!
– funcs
Jul 25 at 18:54
@mvw I am looking to get the X, Y, and Z direction of force (in my particular case, Z is less necessary)
– funcs
Jul 25 at 18:57
Is there no way to calculate the force from the present orientation alone? I don't think that's what I'm trying to find. The goal is the simulated gravity relative to the objects orientation.
– funcs
Jul 25 at 19:09
@mvw I believe my problem is much for simple than your interpretation of it. Lets just say for example my box's current orientation is: Pitch=90, Roll=10, Yaw=20. There is 0 force presently on the object (I need to calculate it and apply it myself!). Using that orientation information, can I calculate what the force needs to be to push on the top of the object. I also have the box's quaternion available if that is helpful.
– funcs
Jul 25 at 19:31