FPS Controls for mobile devices Unity3D source code

제품 정보

$119.79
cart 장바구니에 담기 favorites 즐겨 찾기에 추가
사용 설명서 문서 스크린샷 실시간 미리 보기 비디오

inspectedPieceX에서 검사한 제품

개발자

avatar
Unity Games
×

가격 협상

코드 샘플 요청 다이렉트 메세지

Aug 28, 2020

공개 채팅

제품 세부 정보

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

가격 정보

가격 통계

최고 가격
$119.79
평균 가격
$119.79
최저 가격
$119.79
AI 가격 예측
$25.26

인사이트

제한된 미리 보기


실제 제품에는 모든 파일과 전체 코드가 포함되어 있습니다.

종속성 확인

제품 외부 종속성 보기

무작위로 선택한 샘플 파일

프로젝트 파일 통계

계층구조

샘플 파일 선택
X
user-symbol

문의하기

비즈니스 개발자를 위한 최신 정보를 원하십니까? 소스 코드 프로젝트에 대한 PieceX 커뮤니티의 요구사항을 알아보세요. PieceX의 최신 무료 커뮤니티 코드를 빠르게 알려드립니다.