CTNTVirtualPad:setJoyAsAnalog: Difference between revisions

From GiderosMobile
Created page with "__NOTOC__ '''Available since:''' Gideros 2019.4<br/> '''Class:''' VirtualPad<br/> === Description === Sets VPAD joystick analog mode on/off. <source lang="lua"> CTNTVirtu..."
 
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
'''Available since:''' Gideros 2019.4<br/>
'''Available since:''' Gideros 2019.4<br/>
'''Class:''' [[VirtualPad]]<br/>
'''Class:''' [[TntVirtualPad]]<br/>


=== Description ===
=== Description ===
Sets VPAD joystick analog mode on/off.
Sets VPAD joystick analog mode on/off.
<source lang="lua">
<syntaxhighlight lang="lua">
CTNTVirtualPad:setJoyAsAnalog(padComponent, isAnalogic)
CTNTVirtualPad:setJoyAsAnalog(padComponent, isAnalogic)
</source>
</syntaxhighlight>





Latest revision as of 21:23, 24 January 2026

Available since: Gideros 2019.4
Class: TntVirtualPad

Description

Sets VPAD joystick analog mode on/off.

CTNTVirtualPad:setJoyAsAnalog(padComponent, isAnalogic)


padComponent possible values:

  • PAD.COMPO_LEFTPAD
  • PAD.COMPO_RIGHTPAD

isAnalogic:

  • True (default) joystick is in analog mode: it returns the exact angle (in radians) of the joystick and its power
  • False: the angle returned is a value ranging form 0 to 7 (eight direction mode). 0 is right and so on in clockwise order. Steps are every 45 degrees

Parameters

padComponent: (number) the pad component
isAnalogic: (bool) is joystick analogic (default = TRUE)