TPS Controls for mobile devices Unity3D source code third person controls

제품 정보

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

inspectedPieceX에서 검사한 제품

개발자

avatar
Unity Games
×

가격 협상

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

Oct 13, 2020

공개 채팅

제품 세부 정보



Test it here (WebGL): 

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

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

https://www.dropbox.com/s/ywtjh1qwqc1hf2f/TPS%20test.apk?dl=0

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

How to use it?

Drag and drop “TPS Controls” prefab from “Prefabs” folder to your project hierarchy.

*Camera is attached to “TPS Controls” prefab, so remove any other cameras on your scene.

*When you do this step and click play button in unity editor, you will be able to fully use joystick controls like in example scene. But you may want to change capsule mesh into your custom player 3D model. To do that follow the next steps.

To change capsule mesh into your custom player 3D model delete “PlayerMesh” game object (that it a child object of “Player” game object that you drag and dropped to your project hierarchy in the first step) and place your custom character 3D model instead.

*After this step when you click play button in unity editor, you will be able to move your character but without animations. To set up your animations follow the next step.

To use your custom animation that will require a little bit of coding. Make a new script and use this static variable to detect in which direction player is moving:

JoystickLeft.positionX – If value of this variable is negative (from 0 to -1) player is moving in left direction. If value is positive (from 0 to 1) player is moving in right direction. Example:

if(JoystickLeft.positionX < 0) {
print("player is moving left at the speed: " + JoystickLeft.positionX);
}

if(JoystickLeft.positionX > 0) {
print("player is moving right at the speed: " + JoystickLeft.positionX);
}

JoystickLeft.positionY – If value of this variable is negative (from 0 to -1) player is backward. If value is positive (from 0 to 1) player is moving forward. Example:

if(JoystickLeft.positionY < 0) {
print("player is moving backward at the speed: " + JoystickLeft.positionY);
}

if(JoystickLeft.positionY > 0) {
print("player is moving forward at the speed: " + JoystickLeft.positionY);
}

To detect rotation changes when player drags finger on right side of the screen use JoystickRight.rotX and JoystickRight.rotY.

These variables will return value from 0-360. And use value from JoystickLeft.angle static variable if you are using “Use right area to rotate camera” option.
Using these variables you can make your custom logic for playing animation.

Additional Options

If “Sticky” option is checked joystick will be invisible and it appear on the position where you touch the screen. If this option is unchecked joystick will always stay on the same position.

“Stick Movement Threshold” will determine how much joystick can move from its central position.

“Move Joystick Base On Drag” – whether joystick base should move when you drag outside joysticks base area.

“Sensitivity” will determine how fast character will rotate when player drag the finger on the right side of the screen.

“Rotation Y Max Angle” will limit rotation on Y axis when player drag the finger on the right side of the screen.

File Tree

  • 📁 TPS Controls for mobile devices Unity3D source code third person controls

가격 정보

가격 통계

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

인사이트

제한된 미리 보기


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

종속성 확인

제품 외부 종속성 보기

무작위로 선택한 샘플 파일

프로젝트 파일 통계

계층구조

샘플 파일 선택
X
user-symbol

문의하기

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