Moving Objects in unity3d

Source: Internet
Author: User

There are two steps for moving an object:

1. Move objects in the scene

2. Play an animation on an object

We will achieve this step by step.

 

Unityscript is required for moving objects, but here we just want to move it easily. Just change it with the example in "script tutorial:

Function Update (){
Transform. position. x ++ = 0.02;
}

Run it in unity3d to see the effect. We bound the script to a ball and the ball began to move towards the X axis.

 

Next, let's take a look at how to play the animation.

In the Manual, if you want to use Max for animation, you must export it as an fbx file.

I have no experience or experience. I installed 3DS max9 and downloaded an fbx plug-in for Max 2009 from the Autodesk website. The result cannot be loaded. Finally, I want to try a lower version of the plug-in, how can I find another one for max9? Dare to say that max9 and max2009 are not the same thing! In addition, max9 is already so old, there is a gap between max2008, coupled with the latest max2010 ......

 

A simple ball and several simple animations are made in Max and exported to unity3d. You need to manually add the animation. The effect is as follows:


 

Combined with the above mobile script, we finally ran the test run, and the ball started to run

 

There are several questions:

1. When multiple animations are added in Max, they are added in unity3d. The playback position of the second animation is incorrect. No matter where the animation is played, this gameobject will go to the scene origin when the animation is played.

2. The Manual only supports animation and bone based animation. I don't know how the skeleton animation of Max is exported. Can I export the animation? Try it out.

 

-------------------

 

I spent half a day searching for the scale. It turns out that the unit settings in Max are incorrect.

Method: Customize-Unit setup-System Unit setup

In this way, a box of 100*100*100 is placed in unity3d to occupy an unity3d unit.

It is also said somewhere in the manual, but it is not obvious: Unity's physics system expects 1 meter in the game world to be 1 unit in the imported file.

Therefore, it is not necessary for me to assume that an unity3d unit is equal to one meter in the real world ......

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.