Hi all,
I am making a simple, tilt controlled game using UIKit. So far, when I tilt the device the character moves in the appropriate direction. What I want him to do is to change the direction he is facing when I tilt the device. For example, when I tilt it left, I want the character to face left. Is there a way to detect whether th...
Hello again,
I didn't say this last time but I am relatively new to iPhone programming and extremely new to iPhone game development so bear with me. In my game, when I tilt the device, the character moves and faces the correct direction, but does not animate. I am using an animated UIImageView. Here is the code:
float newX = characte...
How do I learn when the iPhone is moving in a particular direction (X-axis)? Can you show some sample code?
...
Hi,
I have a problem with my app.
I have create these.
My app store the accelerometer value (x,y,z) in an NSarray for a little time.
The information has store correctly but now i want to identify the similar path but i haven't any idea.
Can yo help me for identify the similar path that i have stored?
Thanks and sorry for my english
...
I have to develop some software in my school to utilize the accelerometer in the Wiimote for recording data from experiments, for example finding the acceleration and velocity of a moving object. I understand how the accelerometer values will be used but I am sort of stuck on the programming front. There is a set of things that I would l...
Hi, I know this question is definitely solved somewhere many times already, please enlighten me if you know of their existence, thanks.
Quick rundown:
I want to compute from a 3 axis accelerometer the gravity component on each of these 3 axes.
I have used 2 axes free body diagrams to work out the accelerometer's gravity component in the...
Just started to realize an augmented reality based project, got GPS location, heading, and the two missing variable to manipulate virtual camera is Pitch/Roll.
I'm wondering if there is a ready-made formula I can merge into the project. Could spare me a lot of time. Thanks in advance.
...
Is there any ready made class/formula somewhere I can use it for control my viewpoint by accelerometer's/compass's XYZ?
I want to achieve the same view control like acrossair uses.
I have the parts (OpenGL space, filtered accel-, compass values, and a cubic panoramic view mapped to a cube around my origin).
Can somebody suggest me whe...
Hi all!
my view controller is set to accept accelerometer delegate, and if I put the accelerometer value inside a label works...
after I tried to move an UIImageView into my ViewController and nothing happens
(the image is putted into the view from the interface builder...
(i try to move the image using the frame origin properties)
thank...
Hi all!
I made a viewcontroller that works fine on my iphone, I inserted this viewcontroller into an ipad app, sent the .app to my friend but the accelerometer didn't work...
here is the code I used:
into the declaration I added:
<UIAccelerometerDelegate>
this into my viewconotrller code
- (void)viewDidLoad {
[super viewDidLoad]...
Hello everyone,
I need to use the functionality of an accelerometer in my iphone game. I just have to move an image by tilting the device. However most videos on youtube just show the tilt feature that is somehow inverted and forget to include the calibration. I want the user to calibrate their device to whatever position they're in. Do...
Hi all, I'm trying to collect data for a machine learning project I'm working on. What I'd like to do is collect accelerometer data from an iPhone, save it to a csv and email it to myself. My app currently is able to acquire data from the accelerometer, but I'm at a bit of a loss as to how to proceed. First of all, I'd like to acquire...
Now that iOS 4 is no longer NDA, I would like to know what Gyroscope has to offer over the Accelerometer for developers. Is there a difference in APIs? Other things?
...
Hello,
I have just started working with Core Animation and I have an animation which moves an image from top to bottom.
theAnimation=[CABasicAnimation animationWithKeyPath:@"position"];
theAnimation.duration=5;
theAnimation.repeatCount=1;
theAnimation.autoreverses=NO;
theAnimation.removedOnCompletion=YES;
theAnimation.fromValue=[NSValu...
I have an accelerometer and magnetometer each producing raw X, Y and Z readouts. From this I need to determine the magnetic heading of an object.
I'm not that great at trig, but I've put together a formula that does respond pretty well to the rotation of the device, but also responds to movement that one would not think is relevant, suc...
I'm making an accelerometer based app using cocos2d, and I noticed that it's possible to set the accelerometer update time.
[[UIAccelerometer sharedAccelerometer] setUpdateInterval: (1.0f / 60.0f)];
I was wondering if updating the accelerometer very often like this, 60 times a second is a battery drain? Or should I not worry at all?
...
can it be determined that where a person is i.e is he walking ? is he in elevator ? or is he climbing up the stairs ?
using android's accelerometer or is there any other way to calculate such in android ?
...
I would like to have a program that build a program that uses the accelerometer to count the number of time an iphone spins (either on a table top or when tossed in the air ) any suggestions?
...
Hi,
I want to find distance traveled and velocity from accelerometer events. Like iphone's gMeter application is doing.
Any suggestion, by which value or formula I should use for that?
Thanks in advance.
...
Hi,
I need to retrieve the orientation of my phone. At the moment i wrote this :
public void onSensorChanged(SensorEvent event) {
switch (event.sensor.getType()){
case Sensor.TYPE_MAGNETIC_FIELD:
this.mag_vals = event.values.clone();
this.sensorReady = true;
break;
case Sensor.TYPE_ACCELEROMETER:
this.acc_vals = ...