Transform and camera components in the hierarchy view

Source: Internet
Author: User

Transform and camera components in the hierarchy view

In the hierarchy view, select Camera, and then view its components in the Inspector view, as shown in 1-8. For transform and camera components, it is familiar to readers who have used unity, but this article has been chosen from Ngui to the actual tutorial .

The script component named Uicamera, however, is unique to the UI control created by Ngui. Tip: The Uicamera Script component is typically assigned to a particular camera object, which is unique in that it needs to interact with the UI controls. This is the event that receives a variety of message events from the UI control, such as events that are clicked on by a particular button on the game interface. This article is selected from Ngui from beginner to actual combat tutorial .

Figure 1-8 the components in camera

The Uicamera Script component contains a number of properties:

Q Event Type: Specifies the types of events that will be sent by this camera;

Tip: This property contains two parameters: World and UI. The former indicates that the event comes from interacting with the game object in the 3D world, which indicates that the event comes from interacting with the 2D control;

Q Event Mask: Specifies the layer to which the event message can be received;

Q Allow Multi touch: Specifies whether multi-touch is allowed;

Q Sticky Press: Specifies whether the button will bounce when the finger is pressed at a button, and then the finger slides to the outside of the button, while the other object receives a trigger event from the finger;

Tip: When you check the sticky press property, the button continues to be pressed, even if the finger has been slid outside the button, and the other control does not receive a trigger event from the finger;

Q Sticky Tooltip: Specifies the note information on the UI control as a control description, which will be displayed after the event is triggered;

Tip: When the Sticky ToolTip property is checked, the note information is displayed when the mouse moves outside the UI control, when the mouse moves to the UI control when the cursor is removed, and then disappears immediately after it is moved.

Q Tooltip Delay: Used to set the duration of the note information display, in seconds;

Q Raycast range:raycast can actually be seen as an invisible ray that starts with the position of the mouse or the touch on the screen, emits a ray in the direction of the current camera, which is used to detect collisions and other events, Some developers may want to specify the range that the ray can detect, which can be done by setting this property.

Tip: Raycast Range Default Property value is-1, indicating no scope limit;

Q Event Sources: This property is used to specify the source of the event the camera listens to;

Hint: A total of 4 options, mouse means listening to mouse events, can be from the left mouse button, right, middle and scroll wheel; touch indicates the touching event of the mobile device, keyboard indicates the input event of the listening keyboard, and the controller indicates the interception of events from the joystick device;

Q Thresholds: Specifies the critical value that a particular event can be triggered;

Hint: One has 4 can set the value, Mouse drag indicates that the current event is the mouse drag event is the critical value of the mouse dragged at least how many pixels; Mouse Click indicates that the current event is the critical value of the mouse click event is the mouse is pressed down, in the number of pixels dragged within the point, When the button is released, the out-of-range is not judged to be a click event; touch drag and touch tap are similar to the first two values that can be set, except that the mouse is replaced by a finger;

Q Axes and Keys: Sets the input system for the Ngui plugin.

Tip: In unity, keys represents almost all of the input device's key values, for example, all keys on the keyboard have the corresponding keys, the other joystick is the same, so you can directly use the keys to represent specific keys. At the same time, unity maps Some of the commonly used keys to some other axes, so developers can also use axes to represent specific keystrokes directly. Ngui the default setting for the axes and keys property is 1-9, the first 3 are axes, and the last 4 are keys.

Figure 1-9 Ngui default settings for axes and keys properties

For keys, the reader can identify its corresponding key directly from the name, but for axes, the keys reader may not be aware of it, and the reader may sometimes need to modify the axes corresponding keys, sometimes directly adding axes. So how do you add and modify axes in unity? Method is, click edit| Project settings| The input command pops up a dialog box named InputManager, where the reader can add and modify axes,1-10 as shown in this article Ngui from getting started to actual combat tutorials .

Figure 1-10 Unity's default settings Axes

Transform and camera components in the hierarchy view

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.