Search Unity

Yet another Vector and Rotation notes

Discussion in 'Community Learning & Teaching' started by Owen-Reynolds, Oct 6, 2016.

  1. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,998
    I put pages with Unity-specific stuff about using vectors and rotations - code using common math; AngleAxis, local space, RotateTowards .. . Well, there's a table of contents. I had old notes lying around I thought would be easy to clean up and post. Ended up being nine 4-9 page sections.

    http://www.taxesforcatses.com/vectorW/TOC.html

    Here’s my literature search:

    o https://docs.unity3d.com/Manual/VectorCookbook.html is pretty good for what it does, but is short and written from more a mathematicians perspective (for example, it covers dot product instead ofVector3.Angle.)

    o The video at https://unity3d.com/learn/tutorials/topics/scripting/vector-maths
    just covers part of that same vector cookbook stuff.

    o https://docs.unity3d.com/356/Documentation/ScriptReference/index.Vectors.html is a very short into to vector contructors and programming - not how to use them.

    o youtube.com/watch?v=0KUhzde-INY comes up high in a google search as vector2 guide. It’s a 4-line program using the vector struct.

    o http://processing.org/learning/pvector/ also comes up high in a “unity vector math” search. But it’s a mix of writing C++ classes, simple hand-made physics, and simple vector math, for some other graphics engine(?)

    o Unity Answers has lots of snippets in response to specific Qs, often with specific solutions without context. Even the ones I wrote, which are fine, are at best one specific context-free fact.
     
    AlanMattano and SimonDarksideJ like this.
  2. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,998
    Now comes 3 ways: a complete PDF (clickable table of contents) or links to pdf's for each chapter, or an HTML table of contents with each chapter on a page.

    Re-edited most of it. Big re-write of first rotations chapter. Added "connect two blocks" example to last chapter.
     
  3. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    This Manual is so Super Awesome!!

    Is it possible to add at the end of the rotation section this:
    • Without using physics and using C#
    • Difference between Rotate and Rotation
      > Rotate: adding rotation angles to the actual rotation? spin
      > Rotation: rotate to a final fixed direction angle using the global world space? fix

    • How to Set Globally the game object
      > to a fix rotation in world space.
      > and make spin it in world space adding angles.
    • How to Set Locally the game object
      > to a fix rotation
      > and make it spin it local space.

    • How to Get Globally the game object
      > the fix rotation in world space
      > and get the spin difference.
    • How to Get Local
      > fix rotation
      > and the spin difference.