Friday, 17 November 2017

Hololens Demo: Move Scale and Spin an 3D object

I have a new Hololens Demo video
Move Scale and Spin any 3D object


this demo used the Box Frame c# script I introduced last time, this time, I added code to let user move, scale and rotate the Box Frame

I am designing more exacting demo now

will show you soon

Enjoy it

Saturday, 11 November 2017

Unity Learning: I created a Box Frame for any GameObject

you can watch this video if you don't want to read my words
Unity 2017, How to add a Box Frame to GameObject

I need to create a box frame for any game object I like, but I found it's hard, of course I can use Line Renderer, but it's not nice,

I want the frame to be in Cube mode, in Cylinder mode, not just boring plane surface

that's why I created this magic class BoxFrame.cs

enjoy the video

Tuesday, 7 November 2017

Unity, How to understand Transform.Rotate(Vector3, Space.Self) ?

when developing in Unity, you always has to use Transform.Rotate() function, one of its overload is
Transform.Rotate(Vector3 v, Space.Self), like this:

void Update () {
    this.transform.Rotate(new Vector3(1, 1, 1), Space.Self);
}

i didn't read any document explain it very well, all give reader some confusion, (really  don't understand why?)

ok, let's use some very straightforward words

Suppose the object which attach this script, the transform.position is (100, 100, 100),

there will be a little box centered by this point,  the diagonal points will be
 (100+1, 100+1, 100+1), (100-1, 100-1,100-1)

if you consider this two points as a line, the object will be rotated based on this line

this is how this function works, easy, en..