Questions tagged [tilt]

Tilt is a thin interface over a collection of Ruby template engines, that attempts to make their usage as generic possible.

118 questions
37
votes
3 answers

How to measure the tilt of the phone in XY plane using accelerometer in Android

I tried to use the Z axis data from SensorEvent.values, but it doesn't detect rotation of my phone in the XY plane, ie. around the Z-axis. I am using this as a reference for the co-ordinate axes. Is it correct? How do I measure that motion using…
udiboy1209
  • 1,472
  • 1
  • 15
  • 33
25
votes
1 answer

How can I use SensorManager.getOrientation for tilt controls like "My Paper Plane"?

The Android game My Paper Plane is a great example of how to implement tilt controls, but I've been struggling to understand how I can do something similar. I have the following example that uses getOrientation() from the SensorManager. The whole…
richq
  • 55,548
  • 20
  • 150
  • 144
14
votes
6 answers

How can i test tilt efftect? - IPhone Simulator

I am trying to write a game. That game uses tilt effect, but i don't know how to test it on Iphone Simulator 3.0. I search it on internet, but the result is zero. How can i...?
Khoa
  • 163
  • 1
  • 2
  • 11
11
votes
1 answer

Documentation for creating custom Sprockets processors?

I'm trying to create a sprockets preprocessor for Rails that finds .png.rb files in the asset pipeline and uses them to generate png screenshots of various pages in my application. I've read up on this topic quite a bit but I can't seem to find any…
Ajedi32
  • 45,670
  • 22
  • 127
  • 172
9
votes
3 answers

How to calculate the phones rotation around the y axis (roll) while it's laying flat?

This few lines of C# code calculate the phone's rotation around the y axis using the accelerometer: private float GetRoll() { /* * Sum up the accelerometer events */ Vector3 accelerationVector = Vector3.zero; for (int i=0; i <…
SePröbläm
  • 5,142
  • 6
  • 31
  • 45
9
votes
3 answers

Get tilt angle from the android accelerometer

I have a class that implements SensorEventListener and I would like to get the tilt Angle of my device using the Accelerometer. I looked for examples on the internet but they use Sensor.TYPE_MAGNETIC_FIELD. I believe my device doesn't have this…
user1615888
  • 91
  • 1
  • 1
  • 3
6
votes
3 answers

iphone compass tilt compensation

has anybody already programmed a iphone compass heading tilt compensation? i have got some approaches, but some help or a better solution would be cool! FIRST i define a vector Ev, calculated out of the cross product of Gv and Hv. Gv is a gravity…
user302606
  • 118
  • 1
  • 6
6
votes
2 answers

Vertical movement sensor

I am working on an android app that requires the detection of vertical motion. When moving the tablet upward, the Gyroscope, Accelerometer, and Linear Acceleration sensors give a corresponding value indicating upward or downward motion. The problem…
user1795223
  • 291
  • 1
  • 3
  • 8
5
votes
1 answer

Pitch problems in landscape mode

I need to read the pitch value (how much the phone is tilted backwards and forwards) both in portrait and landscape modes. using the code bellow in portrait I get my value from value[1] with 0.0 when phone stay laying flat with face up, -90 when…
Alex
  • 2,213
  • 4
  • 32
  • 44
5
votes
1 answer

Tilt template fragments

Is it possible to render fragments of Tilt templates (i.e., without using a template file on disk)? Background: I'd like to render inline template strings in a Ruby CGI program.
Sunder
  • 1,445
  • 2
  • 12
  • 22
4
votes
4 answers

Android Pitch and Roll Issue

I am working on a tilt app for Android. I am having an issue with Portrait & landscape mode. When the pitch = 90 degrees (phone on end) and even slightly before the roll value goes crazy when there has been no physical change in roll. I have not…
user1234051
  • 271
  • 1
  • 3
  • 9
4
votes
1 answer

Google static maps get satellite view with tilt

Didn't see anything in documentation so I figured I'd ask here: For capturing image via google static maps api, is there any way to get views that have tilt? Doesn't seem to be any documentation on how to query for this. Thanks.
4
votes
1 answer

cannot load stylus in slim template

when I am trying to use the styl: tag in the stylus file I am not able to compile it...here is the error I am getting. Temple::FilterError: Tilt engine styl is not available. Use --trace for backtrace.
coool
  • 8,085
  • 12
  • 60
  • 80
4
votes
2 answers

Tilt (Bundler dependency error)

I need to upgrade my apps to Rails 3.2.16, when I did bundle update rails it gives me the following error. Bundler could not find compatible versions for gem "tilt": In Gemfile: sass-rails (= 3.2.6) ruby depends on tilt (~> 1.3) ruby …
user1982288
4
votes
3 answers

How can I do Github-style Markdown rendering from Sinatra?

TL;DR - how can I use something like improved_markdown :some_file to do custom rendering, but still render the layout as usual? Normally, to render Markdown in Sinatra, you'd just do: markdown :some_file But I'd like to add the ability to do…
Nathan Long
  • 122,748
  • 97
  • 336
  • 451
1
2 3 4 5 6 7 8