FPS Controls for mobile devices Unity3D source code

Detalles del producto

$119.79
cart Añadir al carrito favorites Agregar a los favoritos
Documento de guía del usuario Capturas de pantalla Vista previa Video

inspectedProducto inspeccionado por PieceX

Desarrollador

avatar
Unity Games
×

Negociar Precio

Solicitar muestra Enviar mensaje

Aug 28, 2020

Hablar con el vendedor

Detalles del producto

You can test it here (WebGL): 

https://e-ugovor.rs/FPS_Controls/

Or download test apk and test it on your android device: 

https://www.dropbox.com/s/nuj1bwive9n324b/FPS%20Controls.apk?dl=0


This asset will provide you with FPS controls for mobile devices that is very easy to setup and use.

How to use it?

• Drag and drop “Joystick.prefab“ from “Prefab” folder into your scene.
• Add EventSystem to your project hierarchy (Right click inside project hierarchy – UI – EventSystem)
• Use “JoystickLeft.positionX” static variable inside your scripts to get left joysticks X axis value, use “JoystickLeft.positionY” to get Y axis value (you will get value from -1 to 1 for x and also from -1 to 1 for y axis).

*Example
Vector3 moveX = JoystickLeft.positionX * speed * transform.right;
Vector3 moveY = JoystickLeft.positionY * speed * transform.forward;
rigidbody.MovePosition(transform.position + moveX * Time.fixedDeltaTime + moveY * Time.fixedDeltaTime);

In case that your character doesn’t have rigidbody you can use this:

transform.position = transform.position + moveX * Time.fixedDeltaTime + moveY * Time.fixedDeltaTime;

- For rotation use JoystickRight.rotX and JoystickRight.rotY.

* Example

void Update() {
transform.rotation = Quaternion.Euler(JoystickRight.rotY, JoystickRight.rotX, 0);
}

• To detect if shot button is pressed you can use JoystickRight.shot static variable. It will return true when shot button is pressed and false when it is released.
• To detect if jump button is pressed use JoystickRight.jump. It will return true whan jump button is pressed and false when it is released.

File Tree

  • 📁 FPS Controls for mobile devices Unity3D source code

Estadísticas de precios

Estadísticas de precios

Precio máximo
$119.79
Precio promedio
$119.79
Precio mínimo
$119.79
Pronóstico de precios IA
$25.26

Vista previa

Vista previa limitada


El producto real contiene todos los archivos y el completo código fuente

Comprobar dependencias

Ver dependencias externas del producto

Archivos de muestra seleccionados al azar

Estadísticas de los archivos

Jerarquía

Elija un archivo de muestra
X
user-symbol

Mantengase en contacto

Obtenga consejos prácticos para empresas y desarrolladores.

Conozca las necesidades de la comunidad de PieceX para vender proyectos de código fuente.

Sea el primero en conocer los últimos fuentes gratuitos.