Login

Fancade Wiki

Renamed Joystick and Button to Joystick & Button

... ...
@@ -82,3 +82,4 @@ FanWeek.md: Events/FanWeek.md
82 82
yuuuuuuhhih.md: dinosaur ros.md
83 83
Blocks/Truth (True/False).md: Blocks/Truth (True & False).md
84 84
Blocks/Joystick & Button.md: Blocks/Joystick and Button.md
85
Blocks/Joystick and Button.md: Blocks/Joystick & Button.md
... ...
@@ -0,0 +1,51 @@
1
Joystick and Button Shares the same limit, there are only 4 points in this limit, Button consumes 1 point each and joystick consumes 2 points, at max you can have 1 joystick + 2 buttons, 2 joysticks, or 4 buttons
2
3
# Joystick
4
Adds joystick/s in the screen, unlike most of the blocks in **Control** tab, Joystick doesn't have any execution (yellow) output wire
5
6
[[uploads/Joystick.png|width=336px]]
7
8
## Details
9
10
#### Output :
11
\- Joy Dir: (Joystick Direction) Outputs joystick movement's direction
12
13
#### Settings :
14
\- Direction: Most useful when [[perspective]] is active, changes the direction "Joy Dir" outputs:
15
16
* XZ - Outputs XZ vector values perpendicular to camera direction (While assuming that the screen is always facing straight to a certain axis)
17
18
* Screen - Outputs XY vector values regardless of where the camera is facing.
19
20
21
# Button
22
Adds button/s in the screen.
23
24
[[uploads/Button.png|width=336px]]
25
26
## Details
27
28
#### Output :
29
\- Button: Executes when the button display is pressed
30
31
#### Settings :
32
\- Display: Changes wheter the buttons should be displayed as buttons or arrows:
33
* Button - displays the button as a circular button
34
* Direction - displays the button as a directional arrow
35
36
Setting the display to "Direction" mode results in following :
37
- 1 button - button is displayed as arrow pointing up
38
[[Uploads/Up_Front.jpg]]
39
- 2 buttons - buttons are displayed as arrows facing left and right respectively
40
[[Uploads/2-Sides.jpg]]
41
- 3 buttons - buttons are displayed as arrows facing left , right and up respectively
42
[[Uploads/Side-Up.jpg]]
43
- 4 buttons - buttons are displayed as arrows facing left , right , down and up respectively
44
[[Uploads/All_four.jpg]]
45
46
# Advanced Techniques
47
48
### Joystick
49
Joystick may not give the right outputs you need, this is because it only gives values perpendicular to the where the camera is facing, for example, if you use **XZ** option the values will seem normal if the camera is facing in Y-axis upwards or downwards regardless of angle but if it's facing sidewards or front and backwards it will only output X-axis value if you're looking at Z-axis and vice versa, in this case you could instead use the **Screen** option which outputs XY values instead and ignores where the camera is facing. This will help but also there's still one more problem to solve, it only output values upwards and sidewards now! Well the solution is actually pretty simple!! Just use rotate vector with **<font color="ffa500">Rotation</font>** input [90, 0, 0].
50
51
[[Uploads/Joystick_Solution.jpg]]
... ...
@@ -1,51 +0,0 @@
1
Joystick and Button Shares the same limit, there are only 4 points in this limit, Button consumes 1 point each and joystick consumes 2 points, at max you can have 1 joystick + 2 buttons, 2 joysticks, or 4 buttons
2
3
# Joystick
4
Adds joystick/s in the screen, unlike most of the blocks in **Control** tab, Joystick doesn't have any execution (yellow) output wire
5
6
[[uploads/Joystick.png|width=336px]]
7
8
## Details
9
10
#### Output :
11
\- Joy Dir: (Joystick Direction) Outputs joystick movement's direction
12
13
#### Settings :
14
\- Direction: Most useful when [[perspective]] is active, changes the direction "Joy Dir" outputs:
15
16
* XZ - Outputs XZ vector values perpendicular to camera direction (While assuming that the screen is always facing straight to a certain axis)
17
18
* Screen - Outputs XY vector values regardless of where the camera is facing.
19
20
21
# Button
22
Adds button/s in the screen.
23
24
[[uploads/Button.png|width=336px]]
25
26
## Details
27
28
#### Output :
29
\- Button: Executes when the button display is pressed
30
31
#### Settings :
32
\- Display: Changes wheter the buttons should be displayed as buttons or arrows:
33
* Button - displays the button as a circular button
34
* Direction - displays the button as a directional arrow
35
36
Setting the display to "Direction" mode results in following :
37
- 1 button - button is displayed as arrow pointing up
38
[[Uploads/Up_Front.jpg]]
39
- 2 buttons - buttons are displayed as arrows facing left and right respectively
40
[[Uploads/2-Sides.jpg]]
41
- 3 buttons - buttons are displayed as arrows facing left , right and up respectively
42
[[Uploads/Side-Up.jpg]]
43
- 4 buttons - buttons are displayed as arrows facing left , right , down and up respectively
44
[[Uploads/All_four.jpg]]
45
46
# Advanced Techniques
47
48
### Joystick
49
Joystick may not give the right outputs you need, this is because it only gives values perpendicular to the where the camera is facing, for example, if you use **XZ** option the values will seem normal if the camera is facing in Y-axis upwards or downwards regardless of angle but if it's facing sidewards or front and backwards it will only output X-axis value if you're looking at Z-axis and vice versa, in this case you could instead use the **Screen** option which outputs XY values instead and ignores where the camera is facing. This will help but also there's still one more problem to solve, it only output values upwards and sidewards now! Well the solution is actually pretty simple!! Just use rotate vector with **<font color="ffa500">Rotation</font>** input [90, 0, 0].
50
51
[[Uploads/Joystick_Solution.jpg]]
Fancade Wiki