Jump to content

Vec3::Forward() and Vec3::Up() function calls.


reepblue
 Share

Recommended Posts

Ultra Engine should include static function calls that contain the following.

static const Vec3 Vec3::Up()
{
	return Vec3(0,1,0);
}

static const Vec3 Vec3::Forward()
{
	return Vec3(0,0,1);
}

// Maybe this too?
static const Vec3 Vec3::Right()
{
	return Vec3(1,0,0);
}

I was following this math tutorial that was exampled in Unity and thought future users would get stuck when a guide or tutorial called for an Up() or Forward() call with them not knowing what it actually is. (Because I didn't!)

 

Once I was able to figure out what that Vector3.Up actually was with this, I had this working in Leadwerks. This would be a nice thing to have for people coming over from your competitors. 

  • Upvote 1

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

To me, this is like having constants like this:

const float THREE_AND_ONE_HALF = 3.5f;
const int NINETY_NINE = 99;
const String THE_LETTER_Q = "Q";

:D

  • Haha 2

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...