In-depth introduction to game algorithms (4)-unity3d algorithms (1)-ball rotation, in-depth introduction-unity3d

Source: Internet
Author: User

In-depth introduction to game algorithms (4)-unity3d algorithms (1)-ball rotation, in-depth introduction-unity3d

Ball rotation

Place the unity3d components in the following layout, and set the rendering, position, light source, and size.




All contents of the good AI Park blog is original, if reproduced please indicate the source http://blog.csdn.net/myhaspl/

Write the following code:

# Pragma strict


Function Start (){
This. Start ();
}


Function Update (){
This. transform. Rotate (1, 1,-1 );
}

The effect is shown in the link:
Http://mygame.myhaspl.com/test1/test1.html

You can also create a rotation object and select this object in the property box.


The Code is as follows:

# Pragma strict
Var tf_object: GameObject;
Function Update (){
Tf_object.transform.Rotate (1, 1,-1 );
}


1-[9/10-(3/4-1/6)] Simple Algorithm Calculation

1-[9/10-(3/4-1/6 )]
= 1-9/10 + 3/4-1/6
= 1/10 + 9/12-2/12
= 1/10 + 7/12
= 6/60 + 35/60
= 41/60

(1 to 4 in 3) + (1 to 5 in 4) + (1 to 6 in 5)

(1/3-1/4) + (1/4-1/5) + (1/5-1/6)
= 1/3-1/4 + 1/4-1/5 + 1/5-1/6 = 1/3-1/6 = 1/6

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.