Questions tagged [gravity]

The concept of UI widgets being dragged to a specific side of a surrounding element.

The concept of UI widgets being dragged to a specific side of a surrounding element.

Do not use this to refer to accelerometers (gravity sensors) in mobile phones. Use accelerometer instead.

832 questions
-1
votes
3 answers

Toast location does not update if that toast is already showing

My question, in particular, is in reference to the refreshing of toasts that have already been created. For example i have a toast that has been created: Toast myToast; // ... protected void onCreate(Bundle savedInstanceState) { // ... …
JFreeman
  • 974
  • 1
  • 10
  • 26
-1
votes
1 answer

Imagemagick crop from northeast

I am trying to crop an image starting from top-right and cut out a 48x48 box. This is the image I'm working with I've tried this in.png -gravity northeast -crop 48x48 out.png out-0.png out-1.png out-2.png out-3.png Which creates like 4 files,…
knuxyl
  • 129
  • 3
  • 12
-1
votes
1 answer

Detect device motion with respect to gravity

I am trying to build an App where I want to detect the motion of device. Basically I need to detect the fall of device. Can anyone help me on how can I do this Using accelerometer with respect to Gravity?
-1
votes
3 answers

How can I efficiently shift everything in a 2d array down by a given amount?

I have a 2d char array that represents a game board similar to tetris. I remove blocks from the board when there are three or more in a row. Now, I want to basically remove the spaces in between the blocks. So I want to start at the bottom right and…
presence
  • 61
  • 3
  • 8
-1
votes
1 answer

2d motion simulator for given differential equations

Phet has a really neat simulation here for gravitation orbits that you can play around with. Are there any other simulations out there that let you do the same, but also allow you to play around with the equations of motion? (ie. diff equations). I…
-1
votes
2 answers

How to make ImageView be left of a TextView, when Textview is HorizontalCentered

I have a XML file with RelativeLayout, I also have Textview which has Gravity Center. In code I would like to get X coordinate of this Textview, where the TextView begins (length of TextView is not constant, it can change). I need a ImageView to be…
M. Krsak
  • 13
  • 2
-1
votes
1 answer

AS3/Flash Develop - Radial Gravity (character on planet simulation)

I am trying to create a program where a character shape will be constantly drawn towards the centre of a planet shape. I have taken on previous advice into using physics equations to generate the desired effect yet I think I am missing some and…
-1
votes
1 answer

How to get location (x,y) of UIView

I have a falling UIView object, and I'm trying to get the current location of it. I know that its possible to get the original location, but how can i get the current location?
Liad
  • 21
  • 1
-1
votes
1 answer

SpriteKit Gravity

Im just messing around in sprite-kit working on my game design skills and I came across something that I dont know how to do. That is make the physicsworld gravity more like moon gravity. I have a SKSpriteNode which is a red ball and I can drag that…
Cj Miller
  • 51
  • 1
  • 7
-1
votes
1 answer

Gravity Forms Date Push Reservations

I currently use GF for reservations 'Arrive' and 'Departure'. I would like the date displayed on the 'Departure' to always be one date ahead of the 'Arrival' date, regards of what date the guest picks. Then can pick a custom 'Departure' date, but…
-1
votes
2 answers

Player jumps higher on iPhone 6 than iPhone 5s

I created an impulse: impulse = frame.size.height/18 and gravity: self.physicsWorld.gravity = CGVectorMake(0.0, -2.85) and I use this code to apply the impulse to the player: hond.physicsBody?.applyImpulse(CGVectorMake(0, impulse)) Now when I…
sdd
  • 889
  • 8
  • 29
-1
votes
2 answers

Gravity / Jumping ball in canvas, javascript

My project is to create a game, ball which should be jumping on a keypress, go left and right. My problem is, that the gravity I have implemented into that game brought me a problem. The ball is stuck in the ground, which is a picture on the bottom…
domestos
  • 7
  • 4
-1
votes
1 answer

Wrong text position in Textview Landscape mode, Android

I have this Landscape Activity (she can't switch in Portrait mode):
Teo Rock
  • 1
  • 1
-1
votes
2 answers

implement 2D gravity and basic collision C++ and OpenGL Tile based side scroller game

I have some questions for correctly implementing a system that add gravity to my player while still detecting and correcting collision with the floor. I understand the basic math for the AABB and adding gravity vector to the players velocity vector…
Dewie102
  • 1
  • 3
-1
votes
1 answer

Actionscript 2 - hitTesting multiple instances

I'm making a platformer using Actionscript 2. I got the jumping and gravity and everything going, but I'm limited to one "ground". As one might imagine, platformers require multiple "grounds" for jumping onto and falling off of. I tried editing the…
Ziggy
  • 365
  • 2
  • 5
  • 13