rotational_velocity not working anymore? [solved]

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Zieman
---- E L I T E ----
---- E L I T E ----
Posts: 680
Joined: Tue Sep 01, 2009 11:55 pm
Location: in maZe

rotational_velocity not working anymore? [solved]

Post by Zieman »

I built Oolite Trunk yesterday per another_commander's instructions, and all subentities with rotational_velocity -key defined stopped rotating.

I really don't know which 'test' version I'm running, since Latest.log just says:

Code: Select all

Opening log for Oolite version 1.77.1 (x86-32 test release) ...
and the version number isn't anymore present in the top-right corner of game screen (IIRC it was top-right corner previously).
Last edited by Zieman on Wed Aug 07, 2013 9:13 pm, edited 1 time in total.
...and keep it under lightspeed!

Friendliest Meteor Police that side of Riedquat

[EliteWiki] Far Arm ships
[EliteWiki] Z-ships
[EliteWiki] Baakili Far Trader
[EliteWiki] Tin of SPAM
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6634
Joined: Wed Feb 28, 2007 7:54 am

Re: rotational_velocity not working anymore?

Post by another_commander »

Could you please upload somewhere a minimal OXP that exhibits this problem for you?

Building instructions for Windows will result in a standard test release executable, not a snapshot one. This is the reason you are not seeing the version number of your build. To enable this, you must compile using the command make -fMakefile release-snapshot, which will enable the version watermark on the top right and logging of the SVN revision number as well.
User avatar
Zieman
---- E L I T E ----
---- E L I T E ----
Posts: 680
Joined: Tue Sep 01, 2009 11:55 pm
Location: in maZe

Re: rotational_velocity not working anymore?

Post by Zieman »

Ok, will try to build another trunk with that command.

One example is my Baakili Far Trader:
https://app.box.com/shared/zug5tyeqfk
-thingamagigs at front & rear should be spinning
...and keep it under lightspeed!

Friendliest Meteor Police that side of Riedquat

[EliteWiki] Far Arm ships
[EliteWiki] Z-ships
[EliteWiki] Baakili Far Trader
[EliteWiki] Tin of SPAM
User avatar
Zieman
---- E L I T E ----
---- E L I T E ----
Posts: 680
Joined: Tue Sep 01, 2009 11:55 pm
Location: in maZe

Re: rotational_velocity not working anymore?

Post by Zieman »

another_commander wrote:
Building instructions for Windows will result in a standard test release executable, not a snapshot one. This is the reason you are not seeing the version number of your build. To enable this, you must compile using the command make -fMakefile release-snapshot, which will enable the version watermark on the top right and logging of the SVN revision number as well.
After deleting the folder "trunk" & starting over from

Code: Select all

svn co http://svn.berlios.de/svnroot/repos/oolite-linux/trunk
I got the revision number visible.
It says 1.77.1.5687
And none of the subentities that should rotate do so.
...and keep it under lightspeed!

Friendliest Meteor Police that side of Riedquat

[EliteWiki] Far Arm ships
[EliteWiki] Z-ships
[EliteWiki] Baakili Far Trader
[EliteWiki] Tin of SPAM
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: rotational_velocity not working anymore?

Post by cim »

Confirmed. While you're waiting for the fix to get into the source, you should be able to fix this in your own copy by opening src/Core/Entities/ShipEntity.m, going to around line 2300-2400, and changing

Code: Select all

	if (!quaternion_equal(subentityRotationalVelocity, kIdentityQuaternion) &&
		!quaternion_equal(subentityRotationalVelocity, kZeroQuaternion))
	{
		Quaternion qf = subentityRotationalVelocity;
		qf.w *= (1.0 - delta_t);
		qf.x *= delta_t;
		qf.y *= delta_t;
		qf.z *= delta_t;
		orientation = quaternion_multiply(qf, orientation);
	}
to

Code: Select all

	if (!quaternion_equal(subentityRotationalVelocity, kIdentityQuaternion) &&
		!quaternion_equal(subentityRotationalVelocity, kZeroQuaternion))
	{
		Quaternion qf = subentityRotationalVelocity;
		qf.w *= (1.0 - delta_t);
		qf.x *= delta_t;
		qf.y *= delta_t;
		qf.z *= delta_t;
		[self setOrientation:quaternion_multiply(qf, orientation)];
	}
(only the last statement is different)
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6634
Joined: Wed Feb 28, 2007 7:54 am

Re: rotational_velocity not working anymore?

Post by another_commander »

Oops :oops: I committed a revert of r5639 before seeing your post, cim. If you want feel free to apply the correct fix or let me know and I'll go apply it as per your code above.

Edit: Reverted my revert on SVN and I see you already have updated the github part. I guess entropy in the universe has been restored to standard expected levels. ;-)
User avatar
Zieman
---- E L I T E ----
---- E L I T E ----
Posts: 680
Joined: Tue Sep 01, 2009 11:55 pm
Location: in maZe

Re: rotational_velocity not working anymore?

Post by Zieman »

It works!
Thanks cim!
...and keep it under lightspeed!

Friendliest Meteor Police that side of Riedquat

[EliteWiki] Far Arm ships
[EliteWiki] Z-ships
[EliteWiki] Baakili Far Trader
[EliteWiki] Tin of SPAM
Post Reply