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
0
votes
1 answer

Wordpress + Gravity Form + Custom Post Types + Flickr integration

I need to find a solution this scenario. I am trying to achieve the ability to let user post a picture using file upload or paste a Flickr (or Picasa) link of a photo (not a set or gallery or favorites of an user). Each of these pictures / links…
mdo
  • 69
  • 1
  • 1
  • 7
0
votes
3 answers

Setting gravity for auto generated TextView and Button

How can I set the gravity and margin for auto-generated(within the code) TextViews and Buttons? They are inside a LinearLayout. Here is my generation code: for(int i=0; i
rel-s
  • 6,108
  • 11
  • 38
  • 50
0
votes
1 answer

Working on simple platform game issue with multiple side collisions

SO far I started out with a flat platform and my character on top. I have implemented gravity and a jump function. So the gravity concept works as following, continue to fall downwards until player has collided with an object below him. So, this…
zyeek
  • 1,277
  • 12
  • 27
0
votes
2 answers

Place View at bottom of a screen/layout using a TableLayout

I am trying to place a TableRow with two Buttons at the bottom of the screen, under other view elements in the layout, but if I put there, the TableRow dissappear out of the screen. I I put at top or in the middle, no problem. I was trying a lot of…
Pelanes
  • 3,451
  • 1
  • 34
  • 32
0
votes
3 answers

Android: Why is my column heading being pushed off the edge of the screen?

I'm new to Android development, so forgive me if this is a noob question! I am trying to display a table containing 2 columns. The 2nd column should be right aligned, but can be a fixed width. The first column should stretch to fill any remaining…
Russ
  • 3,768
  • 7
  • 28
  • 37
0
votes
2 answers

how to set position of textview

I want to set my my text under the center of my view. I know that I need to do it with Gravity but still dont see the right result I just wanted to do Animation that starts from under the center and go left right and return to started position My…
Vitaly Menchikovsky
  • 7,684
  • 17
  • 57
  • 89
-1
votes
0 answers

If m1 and m2 are on a bar, Can the forces heir forces be computed, give a third mass m3 acting gravitationally?

The simple problem of 2 masses m1 and m2, joined by a bar (constant distance between them), and a third body (outside the bar) m3. O(m1) \ \ O(m3) O(m2) All masses and positions are known. From the system center of mass: [Xcm,Ycm] =…
-1
votes
1 answer

After a short time, collision stop working and objectA clip through objectB

Working on a basic joust (a old arcade game) clone, reaching the collision detection, it's seemed to work at first. But i found that when i stay stationary on a platform or even if i move on it, after a bref period (~5sc) i clip trought the…
Akrokan
  • 1
  • 1
-1
votes
1 answer

How to use time/seconds on your rust code?

Basically I want to make gravity system in Rust Bevy for my player, but I can't figure out how can I do that so I came up with this idea to multiply the -y value with the seconds. If you have any other idea please tell me. Hope you understand what…
-1
votes
1 answer

center the text in position 0, code problem xamarin

I looked everywhere, but for the moment works. here is my code:
michael
  • 25
  • 7
-1
votes
1 answer

Falling object gravity interval of time

I made this code where I have 8 objects and each object has this script, where between a random time interval the objects drop randomly using System.Collections; using System.Collections.Generic; using UnityEngine; public class cylinderFallv2…
mtpog093
  • 17
  • 6
-1
votes
1 answer

I am making a gravity simulator in javascript, and I have no idea how to make a collision work

I want it to work with these algorithms: 1:The smaller mass collides with the larger mass. 2: The smaller mass' mass and velocity are added to the larger mass. Can you help me? Link to the project: https://jsfiddle.net/awesomespaceman/bq60znj9/54/ I…
-1
votes
1 answer

how to spawn objects in unity using two axis but not in a specific section

Hi im working on a character animation / interaction with the environment. Im trying to spawn rocks of different sizes going from the ground to where the gravity direction is applied. Im using c# for both of my scripts…
Loizos Vasileiou
  • 674
  • 10
  • 37
-1
votes
3 answers

SpriteKit enemy should move sideways

Where enemies are moving from every side to the screen. Falling enemies were easy to make with gravity. But how can I make an enemy moving along the x axis or from down the screen to the top?
srgnbcrk
  • 11
  • 2
-1
votes
2 answers

How to apply gravity to a projectile that has directional velocity?

I have a bullet that fires at an angle. I want the bullet to react to a gravitational force. The following code is in the update function of a bullet. this.pos.x += Math.cos(this.angle * Math.PI/4) * (this.vel.x); this.pos.y += Math.sin(this.angle…
Kake
  • 62
  • 5