Boats

Author Topic: Boats  (Read 10959 times)

I just shat splinters and seaweed. These are some damn nice boats!

EDIT: Could you possibly make a raft or some type of "homemade" looking boat? It would be great for Islands/Survival
« Last Edit: December 03, 2014, 08:38:33 AM by Goth77 »

Btw did you managed to find a workaround for the limited turning boats usualy had? I can't test them now so..

Code: [Select]
function eulerToAxis(%euler)
{
%euler = VectorScale(%euler,$pi / 180);
%matrix = MatrixCreateFromEuler(%euler);
return getWords(%matrix,3,6);
}

function axisToEuler(%axis)
{
%angleOver2 = getWord(%axis,6) * 0.5;
%angleOver2 = -%angleOver2;
%sinThetaOver2 = mSin(%angleOver2);
%cosThetaOver2 = mCos(%angleOver2);
%q0 = %cosThetaOver2;
%q1 = getWord(%axis,3) * %sinThetaOver2;
%q2 = getWord(%axis,4) * %sinThetaOver2;
%q3 = getWord(%axis,5) * %sinThetaOver2;
%q0q0 = %q0 * %q0;
%q1q2 = %q1 * %q2;
%q0q3 = %q0 * %q3;
%q1q3 = %q1 * %q3;
%q0q2 = %q0 * %q2;
%q2q2 = %q2 * %q2;
%q2q3 = %q2 * %q3;
%q0q1 = %q0 * %q1;
%q3q3 = %q3 * %q3;
%m13 = 2.0 * (%q1q3 - %q0q2);
%m21 = 2.0 * (%q1q2 - %q0q3);
%m22 = 2.0 * %q0q0 - 1.0 + 2.0 * %q2q2;
%m23 = 2.0 * (%q2q3 + %q0q1);
%m33 = 2.0 * %q0q0 - 1.0 + 2.0 * %q3q3;
return mRadToDeg(mAsin(%m23)) SPC mRadToDeg(mAtan(-%m13, %m33)) SPC mRadToDeg(mAtan(-%m21, %m22));
}

These two functions helped a lot. Basically convert Blockland transform into X Y Z,

Code: [Select]
%eX = getWord(axisToEuler(%obj.gettransform()),0);
%eY = getWord(axisToEuler(%obj.gettransform()),1);
%eZ = getWord(axisToEuler(%obj.gettransform()),2);

Check its rotation at whatever angle you want, add inverse values,

Code: [Select]
if(%eY > %this.maxYaw) {
    %eY = %eY - 0.8;
}

then apply.

Code: [Select]
%obj.setTransform(%obj.getPosition() SPC eulerToAxis(%eX SPC %eY SPC %eZ));
« Last Edit: December 03, 2014, 12:52:43 PM by Str4tofortress »

Because I'm curious, where did you end up going for so long Strat?

What's up with the magical rowboats that move by themselves?
They're invisible, similar to the blockhead's arms.


Sorry for the bump, but this is awesome! Reminds me of the elegant ChrisCrafts. Awesome job, great to see you back. Your mods pretty much made my "blockland career"


Now make your old boats work this way.

These boats are really fancy! Will there possibly be a small sailboat in the future?


All we need is someone to re-make the boat scene from Indiana Jones and the Last Crusade
« Last Edit: January 25, 2015, 10:40:30 PM by Blockteen »

Please please please adjust your battle ships and PT boat for this

Please please please adjust your battle ships and PT boat for this

REJOICE! HE HAS RETURNED!

Seriously though, these are great. Thanks!

You should make the invisible boatmobile next