<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/13077" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2020-10-19T18:27:18+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/13077</id>

		<entry>
		<author><name><![CDATA[haydeng21]]></name></author>
		<updated>2020-10-19T18:27:18+00:00</updated>

		<published>2020-10-19T18:27:18+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43157#p43157</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43157#p43157"/>
		<title type="html"><![CDATA[Re: How to rotate rigid body around Y and Z axis independently and simultaneously?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43157#p43157"><![CDATA[
Yes, in three.js the default forward axis is -Z. After these attempts I do think that the trick requires a multi-staged approach, which I probably won't be able to try right now but If I do I'll keep you updated. Please let me know if you think of any other possible solutions to this, especially a bullet-equivalent solution like this (<a href="https://gamedev.stackexchange.com/questions/136174/im-rotating-an-object-on-two-axes-so-why-does-it-keep-twisting-around-the-thir?noredirect=1&amp;lq=1" class="postlink">https://gamedev.stackexchange.com/quest ... ect=1&amp;lq=1</a>) <br><br>Thanks for all your quick replies, I appreciate it a lot.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13782">haydeng21</a> — Mon Oct 19, 2020 6:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drleviathan]]></name></author>
		<updated>2020-10-19T16:56:53+00:00</updated>

		<published>2020-10-19T16:56:53+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43156#p43156</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43156#p43156"/>
		<title type="html"><![CDATA[Re: How to rotate rigid body around Y and Z axis independently and simultaneously?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43156#p43156"><![CDATA[
Ah I see the controls now.<br><br>Yeah, I tried lots of values and could not get anything that looks like a varial. In fact, I was having trouble getting the skateboard tips to flip front to back on landing for anything.  I could contrive to land some fancy flips but the front would return to facing forward.  Meanwhile, the velocity on the local X-axis should defintely NOT be negative.  Perhaps the skateboard's forward axis is along -Z instead of +Z?  I was trying to apply the "right-hand rule" to figure out directions of axes.<br><br>Dunno where to go from here.  Perhaps you really do need to turn it into a two-stage trick.  If you do: maybe try reducing gravity while manually tuning the angular velocity to use so you can spin it slower and watch it more carefully.  Finally, maybe color front and back tip differently so they are easier to watch.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11033">drleviathan</a> — Mon Oct 19, 2020 4:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[haydeng21]]></name></author>
		<updated>2020-10-19T15:50:02+00:00</updated>

		<published>2020-10-19T15:50:02+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43154#p43154</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43154#p43154"/>
		<title type="html"><![CDATA[Re: How to rotate rigid body around Y and Z axis independently and simultaneously?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43154#p43154"><![CDATA[
Did you change the values in the top left panel? The V key won't do anything unless you change those values, since the default angular velocity is 0.<br><br>I just tried your new angular velocity suggestion but it's not causing a varial. I've tried many combinations of angular velocity and none are getting close to a varial so I'm starting to think the desired varial requires more than 1 angular velocity, meaning I'd have to change the angular velocity throughout the trick. <br><br>Awesome, I will try implementing your calculations for local to world!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13782">haydeng21</a> — Mon Oct 19, 2020 3:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drleviathan]]></name></author>
		<updated>2020-10-16T23:09:03+00:00</updated>

		<published>2020-10-16T23:09:03+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43148#p43148</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43148#p43148"/>
		<title type="html"><![CDATA[Re: How to rotate rigid body around Y and Z axis independently and simultaneously?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43148#p43148"><![CDATA[
Hrm... the V button wasn't doing anything for me, but I did manage to land a kick-flip.<br><br>Looking back at what I said... I would add:<br><br><strong class="text-strong">(a)</strong> The numbers I was using were for a board that was starting its varial part while already kicked nose-up about 45 degrees.  If your simple varial is starting with the board level then I would guess the initial velocity should be something like:<br><br><strong class="text-strong">angular_velocity = C * &lt;0.5, 0, 1&gt;</strong><br><br>Because it would do a full rotation about local Z-axis for half rotation about local X-axis.<br><br><strong class="text-strong">(b)</strong> I think the rotation about the (left) X-axis is actually be negative (as per the right hand rule).  So (a) should be changed to:<br><br><strong class="text-strong">angular_velocity = C * &lt;-0.5, 0, 1&gt;</strong><br><br><strong class="text-strong">(c)</strong> Bullet does not provide btQuaternion * btVector3 operator.  Well... it does but the operator doesn't do what you think it would.  I won't get into the details of that.  Instead I will outline what how I would go about it:<div class="codebox"><p>Code: </p><pre><code>// just the rotation partbtTransform transform = body-&gt;getWorldTransform();btQuaternion varial_start_rotation = transform.getRotation();transform.setIdentity();transform.setRotation(varial_start_rotation);// compute world velocity and use it// Note: we're assuming the skateboard is FORWARD along its local Z-axis// (the local-frame angular velocity would be different when moving backwards in local-frame)btScalar varial_duration = 1.0; // seconds (set this to what it should be)btScalar varial_speed_about_z = TWO_PI / varial_duration;btVector3 varial_angular_velocity_local_frame = varial_speed_about_z * btVector3(-0.5, 0.0, 1.0);btVector3 varial_angular_velocity_world_frame = transform * varial_angular_velocity_local_frame;body-&gt;setAngularVelocity(varial_angular_velocity_world_frame);// start a timer to wait for varial_duration seconds// ...when timer is up, check to see if skateboard's rotation is close to expectedbtTransform transform = body-&gt;getWorldTransform();btQuaternion varial_end_rotation = transform.getRotation();btQuaternion flip_about_y = btQuaternion(0.0, 1.0, 0.0, 0.0);btQuaternion expected_rotation = varial_start_rotation * flip_about_y;// Note: the way to think about rotations in Bullet is... they always operate "from the left"// on hypothetical vectors located "at the far right"// which allows us to order these rotations correctly: flip about y-first in local-frame,// then apply the local-to-world offset to get to world-frame where the trick// is actually happening.//// in this case, I just happen to know that a 180-degree flip about the Y-axis// is &lt;x,y,z,w&gt; = &lt;0,1,0,0&gt; in Quaternion form.// two quaternions are close when their dot-product is very close to 1.0// (or close to -1.0 when on on opposite hemi-hyperspheres)btScalar dot_product = expected_rotation.dot(varial_end_rotation);if (dot_product &lt; 0.0) {    // keep both quaternions on the same hemi-hypersphere    dot_product *= -1.0;}// For 30-degree misalignment (plenty of slop) the dot-product would be// (cos((30 * pi / 180)/2))^2 = 0.93301btScalar MIN_DOT_PRODUCT = 0.93301;if (dot_product &gt; MIN_DOT_PRODUCT) {    // yay, the varial worked!    // stop the tumble "with the feet"    body-&gt;setAngularVelocity(btVector(0.0, 0,0, 0,0));} else {    // something went wrong...    // either our math is wrong or there was a collision}</code></pre></div>Note, that ^^^ is pseudo-code: I didn't try to compile it.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11033">drleviathan</a> — Fri Oct 16, 2020 11:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[haydeng21]]></name></author>
		<updated>2020-10-16T14:35:30+00:00</updated>

		<published>2020-10-16T14:35:30+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43145#p43145</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43145#p43145"/>
		<title type="html"><![CDATA[Re: How to rotate rigid body around Y and Z axis independently and simultaneously?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43145#p43145"><![CDATA[
I tested your suggested angular velocity and more combinations but no luck so far. I've setup a sandbox to directly test different angular velocities (<a href="https://varial--awesome-franklin-02c975.netlify.app" class="postlink">https://varial--awesome-franklin-02c975.netlify.app</a>).<br><br>Once you're in the park, jump with "space" and then press "v" to varial. For now, I've kept the ollie/varial simple so the space bar creates a central force upwards then the V key sets the angular velocity to the values specified by you in the top left drop-down panel. The panel values are hooked up to the code like so:<br><div class="codebox"><p>Code: </p><pre><code>this.body.setAngularVelocity(new this.Ammo.btVector3(this.xav * this.avFac, this.yav * this.avFac, this.zav * this.avFac)); </code></pre></div>FYI, I wasn't able to make the conversion from local AV to world AV yet but just press R to reset the board so local and world rotation are equal.<br><blockquote class="uncited"><div>world_angular_velocity = skateboard_rotation * local_angular_velocity (at moment of impulse)</div></blockquote> How do I multiply the skateboard rotation (comes as a quaternion) with the local angular velocity? I tried multiplying the quaternion and vector3 AV together as well as using quaternion.getAxis() and multiplying that by the vector3 AV - neither worked.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13782">haydeng21</a> — Fri Oct 16, 2020 2:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drleviathan]]></name></author>
		<updated>2020-10-14T20:35:46+00:00</updated>

		<published>2020-10-14T20:35:46+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43140#p43140</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43140#p43140"/>
		<title type="html"><![CDATA[Re: How to rotate rigid body around Y and Z axis independently and simultaneously?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43140#p43140"><![CDATA[
<blockquote class="uncited"><div>How do I calculate the angular velocity of the desired varial (tumble phase)?</div></blockquote>That is the question.  I don't know, but I've been thinking about it:<br><br>(1) I wonder if my assumption that the angular velocity remains constant for the duration of the tumble is valid.  The board needs to perform a full twist about its long-axis and I worry that might be plenty of time to allow the angular velocity to wander.  For now I will continue to assume the approximation as valid and if you ever manage to attempt it and find the board never manages to end up at the right final orientation then we could revisit this.<br><br>(2) Watching the video again carefully I can see how the skater is applying angular impulse (e.g. torque with moment-arm over some short amount of time).  Assuming the impulse is straight into the plane of the board in direction of board's local Y-axis and the moment arm has only components along Z and X... then I would guess the resulting velocity in the local-frame immediately after the impulse would be something like...<br><br><strong class="text-strong">local_angular_velocity = C * &lt;0.375, 0, 1&gt;</strong><br><br>Where the local-frame cardinal axes point:<br><strong class="text-strong">C</strong> = some constant<br><strong class="text-strong">X</strong>  = left<br><strong class="text-strong">Y</strong> = up<br><strong class="text-strong">Z</strong> = forward<br><br>Note: I'm guessing the two relative components because from the video it seems to me the board performs one full spin rotation about its long axis and something like a 3/8 rotation about the other.  Also I'm using this vector equation:<br><br><strong class="text-strong">torque = force X arm</strong><br><br>Which is merely used to figure out which axes are non-zero with <strong class="text-strong">force = &lt;0,-y,0&gt;</strong> and <strong class="text-strong">arm = &lt;x, 0, y&gt;</strong>.  The torque must be perpendicular to the force, and hence has zero Y-component.<br><br>The world-frame value would be:<br><br><strong class="text-strong">world_angular_velocity = skateboard_rotation * local_angular_velocity</strong> (at moment of impulse)<br><br>and would remain constant in world-frame for the tumble, as per the aforementioned assumption.<br><br>Time to spin about the long axis would be: <strong class="text-strong">T = (2*pi) / C</strong> but really you would mandate <strong class="text-strong">T</strong> (say ~ 0.3 sec) and solve for <strong class="text-strong">C</strong>.  Remember units of <strong class="text-strong">angular_velocity</strong> is <strong class="text-strong">radians/sec</strong>.<br><br>Dunno if that works out right, but if I were trying it then I'd start there and adjust the relative local-frame angular-velocity components to get the tumble to line up to the end target.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11033">drleviathan</a> — Wed Oct 14, 2020 8:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[haydeng21]]></name></author>
		<updated>2020-10-14T17:08:53+00:00</updated>

		<published>2020-10-14T17:08:53+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43138#p43138</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43138#p43138"/>
		<title type="html"><![CDATA[Re: How to rotate rigid body around Y and Z axis independently and simultaneously?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43138#p43138"><![CDATA[
Thank you for the wonderful breakdown of this in detail, it makes a lot of sense! <br><br>One final question before this is solved: How do I calculate the angular velocity of the desired varial (tumble phase)? I've been searching online but can't find anything that helps me wrap my brain around that calculation.<br><br>Less importantly, I looked up ballistic in regards to velocity but all I'm finding is talk about the motion of an object as a result of gravitation forces on it. What do you mean when you say ballistic velocity?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13782">haydeng21</a> — Wed Oct 14, 2020 5:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drleviathan]]></name></author>
		<updated>2020-10-14T16:24:18+00:00</updated>

		<published>2020-10-14T16:24:18+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43136#p43136</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43136#p43136"/>
		<title type="html"><![CDATA[Re: How to rotate rigid body around Y and Z axis independently and simultaneously?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43136#p43136"><![CDATA[
Yes, you could apply impulses (or better yet: just slam the angular velocity) to follow a "keyframe" of rotations.  That is pretty much what I'm suggesting except I claim there are only (as I count them)... one, two, three... inflection points in minimal keyframe path.  Or to put it another way: there are four distinct periods of "ballistic" velocities<br><br><strong class="text-strong">(1)</strong> before varial starts (skateboard is on ground):<br>angular_velocity = zero<br>linear_velocity = forward<br><br><strong class="text-strong">(2)</strong> pop up (constant-angular velocity, ballistic linear-velocity):<br>angular-velocity = constant non-zero about local X-axis<br>linear_velocity = forward with ballistic vertical component<br><br>Note: in period <strong class="text-strong">(2)</strong> the angular and linear velocities are related such that as the skateboard rises and rotates... its lower wheels remain touching (or nearly touching) the ground.  In other words: there is an equation which relates the angular_velocity magnitude to the vertical linear_velocity component.  The duration <strong class="text-strong">T2</strong> of period <strong class="text-strong">(2)</strong> can be computed as the time it takes for the skateboard to rotate to the angle at which we want to start <strong class="text-strong">(3)</strong>.<br><br><strong class="text-strong">(3)</strong> tumble (constant angular_velocity, ballistic linear velocity):<br>angular_velocity = some off-axis tumble which is needs to be computed, but is nevertheless constant during the tumble and will bring the skateboard around correctly after time <strong class="text-strong">T3</strong><br>linear_velocity = continues forward with ballistic vertical component<br><br>Note: the time <strong class="text-strong">T3</strong> (aka the "duration of period <strong class="text-strong">(3)</strong>) is somewhat variable but is bounded:  It can't take longer than the time for the vertical ballistic motion to bring the skateboard back to the ground.<br><br><strong class="text-strong">(4)</strong> tumble stops:<br>angular_velocity = zero<br>linear_velocity = continues forward with ballistic vertical component<br><br>In the local-frame the rotations at the keyframe inflection points would be "known" (pre-computed), and the corresponding expected world-frame rotations are related by some constant:<br><br><strong class="text-strong">Q_world(t) = Q_local_to_world_offset * Q_local_rotation(t)</strong><br><br>Since this is true for the duration of the trick, the constant offset is easy: it is the local-to-world rotation of the skateboard (e.g. the body's rotation) right before the trick starts.<br><br>The fundamental reason you can't just "rotate a rigidBody around 2 axis independently and simultaneously" is because in general: <strong class="text-strong">rotations don't commute</strong>.  It is a mathematical property of rotations as a <strong class="text-strong">group</strong>, and by "group" I mean: under "group theory".<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11033">drleviathan</a> — Wed Oct 14, 2020 4:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[haydeng21]]></name></author>
		<updated>2020-10-14T15:37:47+00:00</updated>

		<published>2020-10-14T15:37:47+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43135#p43135</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43135#p43135"/>
		<title type="html"><![CDATA[Re: How to rotate rigid body around Y and Z axis independently and simultaneously?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43135#p43135"><![CDATA[
Thank you again for the quick response and updated thoughts!<br> <blockquote class="uncited"><div>No you wouldn't have to continually update the target rotation using my recipe.  You would compute the angular velocity to move from <strong class="text-strong">A</strong> to <strong class="text-strong">B</strong> in time <strong class="text-strong">T</strong>, then set the body rotating and allow the physics engine to update the body until <strong class="text-strong">T</strong> seconds have passed.  It is prescriptive only by slamming the angular velocity at <strong class="text-strong">t=0</strong> and stopping it again at <strong class="text-strong">t=T</strong>. <br><br>In any case, the varial definitely has a complicated multi-step motion.  At the very beginning the skateboard is on the ground and at the very end it is also on the ground but with front now pointing back.  Ultimately it is a mere 180 degree flip about the vertical Y-axis, but it doesn't take the shortest path to get there.</div></blockquote>In regards to these parts of your response, I'm slightly confused. You are correct in that the varial is a multi-step motion where the board (basically) ends in the same spot it starts at except for it's flipped around the vertical y-axis 180 degrees. But the varial also requires a 360 degree rotation around the forward z-axis. So with your recipe I'd guess the computation of angular velocity from start to end would be somewhat simple - rotate the board 180 degrees around the Y axis (basically). But that angular velocity won't result in the varial. So my confusion stems from your statement that I could compute 1 angular velocity to create this whole varial motion. Again, I'm not very familiar with physics/quaternions but it seems like I'd need to be changing the angular velocity throughout the trick to create proper varial motion. Computing 1 angular velocity would be the simplest solution though so if this is a viable route please correct me.<br><br>My updated thoughts on how to pull this off are along these lines, let me know if you think this could work. In blender I've created the correct varial animation with keyframes and I can see how the board's quaternion changes throughout the trick to result in the varial. For simplicity, lets say the skateboard in my sim has no rotation, so quaternion is (0, 0, 0, 1), at the start of the varial. I'm thinking that I could then, frame by frame, update the physical skateboard's quaternion (via world transform) to the correct values that I've plotted via blender keyframes. <br><br>A nuance would be that I'd need to stop the prescribed quaternion "keyframes" (applied to the physical body) if the board collides with something. Also the board would rarely have a quaternion rotation of (0, 0, 0, 1) when starting the varial so there would need to be calculations (that are currently over my head) to apply the proper quaternion "keyframe" deltas to create a varial motion.  <br><br>If we had 2 objects that were parented and weren't hooked into the physics engine, it would be easy to apply 1 axis of rotation to each object and it would result in the correct varial motion. But it guess there's no way to do that with Bullet rigidBodies via parenting or some setup with constraints? I'm just somewhat shocked that there's not a way to rotate a rigidBody around 2 axis independently and simultaneously.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13782">haydeng21</a> — Wed Oct 14, 2020 3:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drleviathan]]></name></author>
		<updated>2020-10-14T14:34:11+00:00</updated>

		<published>2020-10-14T14:34:11+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43134#p43134</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43134#p43134"/>
		<title type="html"><![CDATA[Re: How to rotate rigid body around Y and Z axis independently and simultaneously?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43134#p43134"><![CDATA[
First of all I should mention: I now realize my recipe for making a varial is incorrect.  The step where the delta rotation <strong class="text-strong">Q01</strong> is computed is wrong because I was assuming the skateboard would take the shortest possible rotation from <strong class="text-strong">Q0</strong> to <strong class="text-strong">Q1</strong> and that is not what happens.  It actually takes a more circuitous path to arrive at the orientation where the feet stop it.  Unfortunately at this moment I don't know how to compute that path through quaternion space.  I will think about it: clearly there are an infinite number of long paths that would work, but the one you want uses an angular velocity with an integral ratio between its components and/or its length.<br><br>No you wouldn't have to continually update the target rotation using my recipe.  You would compute the angular velocity to move from <strong class="text-strong">A</strong> to <strong class="text-strong">B</strong> in time <strong class="text-strong">T</strong>, then set the body rotating and allow the physics engine to update the body until <strong class="text-strong">T</strong> seconds have passed.  It is prescriptive only by slamming the angular velocity at <strong class="text-strong">t=0</strong> and stopping it again at <strong class="text-strong">t=T</strong>.  While playing the game it would be possible to start a varial next to an obstacle and have the tumbling motion interrupted by collisions.  In this scenario your game would check the rotation at <strong class="text-strong">t=T</strong> to see if it was close to the expected rotation <strong class="text-strong">Q1</strong> and if yes: stop the velocity (with the "feet") and land the varial.  If not: the varial failed and you let it tumble and eventually reset to upright if necessary.<br><br>A "keyframed" solution would indeed render the skateboard as tumbling but wouldn't actually move the "physical" skateboard.  This might work if you had a character+skateboard game and just wanted to make it easy for the character to appear to do tricks and always land them.  But you're making a physical skateboard game so simple keyframe effects won't fit.  Nevertheless, the point I was trying to make, and which you already seem to have adopted is: it is ok to fudge the physics in games to make them fun.<br><br>My idea was: a proper ollie is nearly identical to a varial and if you were to change your ollie to use the more complicated recipe, then it might take only a slight tweak of that to produce a varial.  Right now I don't have any other ideas for how to do it.<br><br>In any case, the varial definitely has a complicated multi-step motion.  At the very beginning the skateboard is on the ground and at the very end it is also on the ground but with front now pointing back.  Ultimately it is a mere 180 degree flip about the vertical Y-axis, but it doesn't take the shortest path to get there.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11033">drleviathan</a> — Wed Oct 14, 2020 2:34 pm</p><hr />
]]></content>
	</entry>
	</feed>
