Entrar
Últimos assuntos
» Retorno da GMBR!!!por theguitarmester Ter 19 Mar 2024, 22:38
» Procuro Programador de game maker
por Wou Sex 15 Mar 2024, 10:27
» Mod APK
por gamerainha Qua 13 Mar 2024, 06:30
» Mudar cor de apenas uma palavra
por lunalol Sex 01 Mar 2024, 13:42
» Aceito pedidos de sprites (Com exemplos meus)
por Sevilha Qua 28 Fev 2024, 12:17
» Inventário simples
por Isquilo_Roedor Qui 22 Fev 2024, 15:18
» Problemas na programaçnao de inimigo [jogo DOOM LIKE]
por Black Mirror Dom 11 Fev 2024, 13:34
» ANDROID MULTI TOUCH
por DiegoBr Dom 04 Fev 2024, 12:13
» Servidor de Discord do fórum?
por Lighter Sáb 27 Jan 2024, 17:18
» Save e Load Json
por Klinton Rodrigues Qui 25 Jan 2024, 11:12
» Colisão com mais de um objeto
por aminaro Seg 22 Jan 2024, 15:02
» Oi sou novo aqui
por Thiago Silveira Alexandre Sáb 20 Jan 2024, 20:55
» Como acessar conteudo comprado no marketplace
por macmilam Sex 19 Jan 2024, 07:42
» Devlogs em vídeos do Block Room
por Joton Seg 15 Jan 2024, 16:56
» Alguém aqui já ganha dinheiro com seus games?
por Joton Seg 15 Jan 2024, 16:49
» ACERVO GMBR MAGAZINE
por Joton Qui 11 Jan 2024, 19:21
» como aumentar o obj sem aumentar a colisão??
por GabrielXavier Qua 10 Jan 2024, 07:21
» Asteroid Core - Early Acesse Update [0.2.0.0]
por JOZ. Seg 08 Jan 2024, 14:39
» Versionamento de código com GitHub
por GabrielXavier Seg 08 Jan 2024, 07:32
» Rio Rise - novo launcher do Gta San Andreas SAMP Brasil
por kolesovsup Sex 29 Dez 2023, 07:16
» a funçao approach ainda existe?
por PEDRINDEV Ter 26 Dez 2023, 20:05
» Inimigo ataca até por trás! >:(
por saim Sex 22 Dez 2023, 08:55
» [RESOLVIDO]Spawn após morte
por Deception_1999 Dom 17 Dez 2023, 16:39
» Remunerado $$$ - Procuro programador para ajudar a "montar" um jogo
por theguitarmester Sáb 02 Dez 2023, 16:28
» Game maker nao abre
por Cerf Dom 26 Nov 2023, 12:01
Pergunta sobre andoid
3 participantes
Página 1 de 1
Pergunta sobre andoid
qual seria o codigo para checar o motion sensor do cleular? pra fazer um joguinho que o controle é o sensor de movimento
obrigado a quem responder
obrigado a quem responder
LoweerM- Data de inscrição : 13/02/2012
Reputação : 1
Número de Mensagens : 10
Prêmios :
x 0 x 0 x 0
x 0 x 0 x 0
x 0 x 0 x 0
Re: Pergunta sobre andoid
se me lembro bem era algo como YoYo_GetTiltX()
Com os updates a funçao deve ter mudado de nome, procure por tilt no manual que vc irá encontrar...
Com os updates a funçao deve ter mudado de nome, procure por tilt no manual que vc irá encontrar...
Última edição por Jiraya em Dom 17 Fev 2013, 13:11, editado 1 vez(es)
Re: Pergunta sobre andoid
Verifiquei agora no Manual do GMS e as funções para verificar isso que você deseja, LoweerM, são:
Observação: Tudo o que mostro aqui foi tirado diretamente do manual do GM Studio (na atualização 1.1.827).
Até!
- device_get_tilt_x:
- This function returns the amount of tilt on the x axis of your device.
Syntax :
device_get_tilt_x()
Returns : Real
Description:
This function returns a value between -1 and 1 depending upon the the angle of "tilt" of the device. The actual correlation between degrees of tilt and the value returned depends on the device and OS that it uses, but generally a value of 1 or -1 is the same as +/-90°.
Example :
if display_get_orientation() = display_landscape
{
x += sign(device_get_tilt_y());
}
else
{
x += sign(device_get_tilt_x());
}
The above code checks the orientation of the display and then uses the corresponding tilt value to move the player along the x axis.
- device_get_tilt_y:
- This function returns the amount of tilt on the x axis of your device.
Syntax :
device_get_tilt_y()
Returns : Real
Description:
This function returns a value between -1 and 1 depending upon the the angle of "tilt" of the device. The actual correlation between degrees of tilt and the value returned depends on the device and OS that it uses, but generally a value of 1 or -1 is the same as +/-90°.
Example :
if display_get_orientation() = display_landscape
{
x += sign(device_get_tilt_y());
}
else
{
x += sign(device_get_tilt_x());
}
The above code checks the orientation of the display and then uses the corresponding tilt value to move the player along the x axis.
- device_get_tilt_z:
- This function returns the amount of tilt on the x axis of your device.
Syntax :
device_get_tilt_z()
Returns : Real
Description:
This function returns a value between -1 and 1 depending upon the the angle of "tilt" of the device. The actual correlation between degrees of tilt and the value returned depends on the device and OS that it uses, but generally a value of 1 or -1 is the same as +/-90°.
Example :
y += sign(device_get_tilt_z());
The above code uses the tilt value to move the player along the y axis.
Observação: Tudo o que mostro aqui foi tirado diretamente do manual do GM Studio (na atualização 1.1.827).
Até!
Machow8- Data de inscrição : 21/05/2011
Reputação : 16
Número de Mensagens : 625
Prêmios :
x 0 x 0 x 0
x 0 x 0 x 0
x 0 x 0 x 0
Re: Pergunta sobre andoid
obrigado por responder, pode trancar o topico.
agradeço
agradeço
LoweerM- Data de inscrição : 13/02/2012
Reputação : 1
Número de Mensagens : 10
Prêmios :
x 0 x 0 x 0
x 0 x 0 x 0
x 0 x 0 x 0
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|