Unity Standard Assets Profile Crossplatforminput

Source: Internet
Author: User

This article describes the cross-platform input toolkit crossplatforminput, which mainly includes the prefabs and Scripts two folders:

  

Because the scripts in this package are closely related, they are all designed to implement specific functions and are not very independent and reusable, so we only introduce the individual presets.

Cartiltcontrols Presets:

  

Cross-platform input control for racing games. You can choose between two input modes:

One, vertical axis input value is controlled by a pair of buttons, horizontal axis input value by the device Gravity induction control (target platform for the PC using mouse position simulation, the same below);

Two, the input values in two directions are controlled by touch screen swipe (mobile device) or mouse drag (PC).

Dualtouchcontrols Presets:

  

Demonstrates how touchpad scripts are used in multi-touch scenarios to avoid collisions by mapping sliding or dragging data from different regions to different virtual axes.

Mobileaircraftcontrols Presets:

  

Cross-platform input control for aircraft. This paper mainly demonstrates the use of the Buttonhandler script to automatically map the press and lift of a touch or mouse pointer to the state change of a specific virtual axis. The gravity-sensing data is also mapped to horizontal and vertical input values.

Mobilesinglestickcontrol Presets:

  

Mainly demonstrates the use of joystick scripts, by sliding or dragging the control input, and the difference between the touchpad is to use the distance from the starting point rather than the previous frame position as the input value.

Mobiletiltcontrolrig Presets:

Without UI elements, the values of their mapped axes can be obtained in code through Crossplatforminputmanager, with input from gravity-sensing data (mobile platform) or mouse position (PC).

Unity Standard Assets Profile Crossplatforminput

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.