iphone vibration...

Previous topic - Next topic

gregbug

iphone vibration is possible in glbasic? 

how can i call an sdk api? is possible ?

thanks.  =D
Ciao Ciao,
Gianluca. (l'Aquila tornerà a volare alta nel cielo!!!!)

trucidare

i send gernot the code long time ago before v7 released. Think he has implemented this.
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Kitty Hello

FORCEFEEDBACK - untested, but should work.

gregbug

Quote from: Kitty Hello on 2010-Jan-04
FORCEFEEDBACK - untested, but should work.

wooooowwww  =D
now i'm on work when i go home i'll test and report if work!  8)

thanks again!.

PS: i there a tutorial or an example on how to interface glbasic with " objective C" for iphone direct api call?

thanks.
Ciao Ciao,
Gianluca. (l'Aquila tornerà a volare alta nel cielo!!!!)

gregbug

ok. tested on my iPhone 3GS
works.!

but "FORCEFEEDBACK nJoy#, duration#, x_motor#, y_motor#"

duration# is always the same...  :(
i try 1, 10, 20, 50 millisecs but the vibration it's always about 0.4 second...

it's possible to correct this ?

i searched on iphone api but seems that "AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);" do not allow to specify the duration...

any help?
thanks again...
Ciao Ciao,
Gianluca. (l'Aquila tornerà a volare alta nel cielo!!!!)

Hatonastick

If duration cannot be specified then I guess you are going to have to make a function that calls it repeatedly -- probably from your main game loop.  No idea how well it would work, but don't see any other option unless there's another call in the API that allows you to set a duration.

Kitty Hello

Yes - I have to spawn a thread for that. Sorry. So far I just rumble once.