Relating to the motion of objects through space and time. Including concepts such as acceleration (thrust and gravity), mass, collision response, friction and more.

learn more… | top users | synonyms

0
votes
3answers
104 views

What is the easiest way to make an object follow the edge of a sprite?

I have a rounded rectangle sprite and another sprite that's just a circle. I want the center of the circle to follow the edge of the rounded rectangle. Is there any easy way to accomplish this task? ...
1
vote
1answer
28 views

Spritekit - gradually apply force vector in different direction (space ship turning)

I have a space ship that I'm applying a force vector to using a joystick for control. I would like this to smoothly fly around when I'm switching directions.. Exactly like minisquadron if youve ever ...
1
vote
1answer
145 views

3D collision physics. Response when hitting wall, floor or roof

I am having problem with the most basic physic response when the player collide with static wall, floor or roof. I have a simple 3D maze, true means solid while false means air: bool ...
1
vote
1answer
516 views

Collider2D and Rigidbody2D, how do they work?

I have been learning JavaScript and Unity for a week now. I learned how to make Cube as a Ground and another Cube as a player and I used this code to make the Player Cube move forward and backward and ...
0
votes
1answer
31 views

How can I implement a more realistic momentum system in Unity 4.5?

I'm just starting out with Unity and am making a simple environment where there is a sphere and a ramp. When the sphere approaches the ramp everything is fine. As soon as the sphere hits the ramp is ...
0
votes
1answer
61 views

Bullet 3D Physics Objects Not Rotating?

So I've got Bullet 3D controlling the motion of objects rendered with DirectX. In the clipping below I've got 2 identical rectangles & 5 balls. The lowest rectangle has a mass of 0 and doesn't ...
0
votes
1answer
36 views

How to resolve OBB collision penetration?

I would think this is a common issue, but I couldn't find an answer that helped me. Help would be appreciated. In my game I have rectangular objects. They have rotating bounding box, aka not AABB but ...
0
votes
1answer
113 views

Integration error in high velocity

I've implemented a simple simulation of two planets (simple 2D disks really) in which the only force is gravity and there is also collision detection/response (collisions are completely elastic). I ...
0
votes
1answer
84 views

Relative Position/Rotation calculation

I have 2 objects each with a 3x3 Matrix (Orientation) and a Vector3 (Translation). Both are relative to world coordinates. How do I calculate the position and orientation of object B in relation to ...
0
votes
1answer
114 views

Grid collision - finding the location of an entity in each box

I am trying to implement grid-based collision in a 2d game with moving circles. The canvas is 400x400 pixels. Below you can see the code for my Grid class. What I want it to do is check inside which ...
-1
votes
1answer
90 views

Can not seem to adjust the speed of my Car

I'm programming in C++, rendering in OpenGL and using GLM for matrix/vector manipulation and I have implemented very (very) basic car controls; ignoring many forces that are present in reality. Since ...
-1
votes
1answer
213 views

forward motion car physics - gradual slow

Im having trouble creating realistic car movements in xna 4. Right now i have a car going forward and hitting a terminal velocity which is fine but when i release the up key i need to the car to slow ...
-2
votes
1answer
287 views

How can I create a curved path for a ball?

I am creating a soccer game. Now I want to shoot the ball and create an after-effect resulting in a curved path. I tried several things, but nothing seems to work. I am using a 3D tool, but the ...
2
votes
0answers
163 views

Collision detection with an irregular curve

I'm building a custom physics engine to accompany a level-editor. This image shows how the level-editor outputs levels: Now, some explanation is in order. The curve is defined by the red points. ...
2
votes
0answers
248 views

Friction due to gravity in an impulse based physics engine

In my physics engine, I'm using impulses to solve collisions. I'm basing all calculations on these equations: impulse = desired_velocity_change * mass impulse = force * time friction_force <= ...
1
vote
0answers
16 views

PhysX - Revolute joint around unit vector

I'm using a right-handed coordinate system with (0,0,-1) = forward, (1,0,0) = right and (0,1,0) = up. PhysX version is 3.3.0. I have a unit vector which represents the axis around which my actor is ...
1
vote
0answers
38 views

Bullet Physics ConvexDecomposition?

I've looked at Bullet Physics ConvexComposition Demo and would like to implement that in my game but the code is so undescriptive and it's hard to understand what is going on. Would any of you people ...
1
vote
0answers
51 views

How do you calculate the rate of rotation using the accelerometer values in Android for a particular axis?

I am developing a simple game which involves a character moving up and down only along the Y axis. Currently I am using the accelerometer readings to change the Y velocity of the character. The game ...
1
vote
0answers
161 views

Spin wheel with gesture in Andengine

I want to implement Fortune wheel in Andengine. The wheel would start spinning based on the speed of a finger fling. Then it would stop slowly like real Fortune wheel. What I am able to do now is to ...
1
vote
0answers
95 views

How to aim with a spaceship in 3D considering its angular momentum?

So I have a spaceship and I have 6 degrees of freedom. At a given moment the following vectors are known of the spaceship: Local forward. Local up. Local sideways (may be implied from the previous ...
1
vote
0answers
960 views

Why do restitution values less than one still cause infinite bouncing in Box2D?

I'm currently trying to implement basketball bouncing into my game using Box2d (jBox2d technically), but I'm a bit confused about restitution. While trying to create the ball in the testbed first, ...
1
vote
0answers
177 views

How do I implement a physics gun?

I'm currently trying to implement a physics gun for my game. What I want is for the entity to stay in the same position on the screen no matter how I wiggle the camera about, what is the correct way ...
1
vote
0answers
627 views

Unity3D: collider performances on mobile iOS devices

I'm experimenting with Unity3D and colliders. Unfortunately I still don't have Unity Pro version and I can't use the profiler. Consider the following situation: mobile devices (ios, iphone 3GS). an ...
1
vote
0answers
119 views

Collision shape and Model problem

I used BEPUphysics for my XNA 4.0 game , the problem is that I load my model.fbx from into the game then add it to the space of physics engine , but when I change the scaling matrix of my Model then ...
1
vote
0answers
599 views

Unity3d Gravity script issues

I'm try this script out http://wiki.unity3d.com/index.php/Gravity and I'm having some issues with it (it seemed to work when I tried it with an old version of unity) the first issue is of ...
1
vote
0answers
177 views

Updating physics for animated models

For a new game we have do set up a scene with a minimum of 30 bone animated models.(shooter) The problem is that the update process for the animated models takes too long. Thats what I do: Each ...
1
vote
0answers
283 views

Need help with objects moving toward the player

I am making a 2D game with simple "gravity": everything is just pulled toward 0,0. The speed at which they accelerate towards it is GravityAcceleration up to MaxGSpeed. I also want the player to be ...
1
vote
0answers
80 views

What is the most effective way to create a set of collision points for an aribitrary mesh?

In my project I am working on automatically deforming an arbitrary mesh with respect to another arbitrary mesh, within the context of user generated content, similar to this deformer being developed ...
1
vote
0answers
436 views

Joint constraints in PhysX

I'm trying to use PhysX for my physics engine. I'd like to use spherical joints, but I'm having trouble with the constraints. All of the examples that I've found refer to SDK v2.8. I'd like to ...
0
votes
0answers
22 views

Friction effects on ball motion direction when crossing surfaces edges

I have a ball rolling from a high friction coefficient surface (snow) to a very low friction coefficient surface (ice). When the ball crosses the boundary at an angle, I believe it should change ...
0
votes
0answers
13 views

CCTextField won't appear

I can't seem to add a CCTextField in my physics node, I tried all different methods, but it's still not happening. Here's my code: CCTextField *tf = [[CCTextField alloc] init]; tf.contentSize = ...
0
votes
0answers
19 views

Box2D collision damage calculation from postSolve or not?

I'm using postSolve to get impulse then calculate damage base on that impulse. But there's some issue: Stability The damage isn't stable. When the same ball is hitting with same speed, the damage ...
0
votes
0answers
76 views

Realistic collisions with a kinematic rigidbody?

I have a car game where player drives a car; this car has a collider and a kinematic rigidbody attached and is completely controller by script (i.e. a script sets its position and rotation). In the ...
0
votes
0answers
108 views

How do I combine multiple squares into one Tetris block?

I am learning Phaser by making a simple game—Tetris. I'm having difficulties: Can I use simple rectangles as tetrominoes or they should be sprites? I don't know how make the figure's block ...
0
votes
0answers
42 views

setChaseEntity freezes or jitters the AnimatedSprite

I'm trying to implement setChaseEntity method in a physics based app. I wrote the below code which has an animated sprite ans as the player. The player is movable and it can jump. When i try to focus ...
0
votes
0answers
93 views

How to find correct offset to adjust sprite to the position of box2D body after rotation

I am trying to implement phsyics with the as3 box2d port. I currently have a b2body for each of some certain sprites in my game and I am able to update the sprite's positions correctly from the ...
0
votes
0answers
79 views

How to design basic physics and movement behavior for 2D platformer?

I want to make a simple 2D platformer. I know some basic 2D physics and how to implement them in a game. How to make a character jump, accelerate, decelerate, etc. But I have no idea how to actually ...
0
votes
0answers
43 views

Issue with implementing friction for player movement

I have been writing a 2.5D FPS engine in the same style of Doom and Duke Nukem 3D. The game is 3D rendered but the world is represented in 2D. This is my current position update code for an entity ...
0
votes
0answers
16 views

Handling gyroscope data

I'm working on a mobile game that allows user to rotate player around an axis using accelerometer. In addition to that, to allow fast, almost instant, rotation I thought of using gyro data. It seems ...
0
votes
0answers
109 views

Polygon Collision Response

I'm working on a game engine that has a built in custom physics engine (I know it's a waste of time, but I have years to make this, so why not make it good?). Currently, with any number of polygons, ...
0
votes
0answers
49 views

Lateral Friction Phisics

I am trying to create a physics engine for my game, and need to cancel out any lateral velocity for when entities turn. I have tried to mimic this page's example, but it is not working. I have objects ...
0
votes
0answers
38 views

Rotate to face a direction in ODE

I'm trying to code some AI for a space flight simulation game. I have a function called seek that returns the desired velocity to head towards a target. My problem is now applying this to an ODE ...
0
votes
0answers
81 views

Separating axes test for moving objects

I am having trouble figuring when a given case that is often mentioned actually comes into being. In multiple GDC presentations, and in Eberly's Game Physics book SAT on moving objects it is also ...
0
votes
0answers
88 views

Game physics movement

I am trying to write some code in Pygame that will achieve smooth movement from place to another. I've been able to do some nice physics for jumping but when I need to move horizontally I am not sure ...
0
votes
0answers
93 views

Tension Force is zero

And it's not supposed to be. I've been pulling my hair out for a while trying to figure out why... The values used in T = F - ma are below: mass of first body: 1 kg acceleration: [0, 9.80665] (as a ...
0
votes
0answers
183 views

Farseer: Difficulties with implementation of DebugView

I added the project "Farseer Physics Engine 3.3.1 HelloWorld XNA\DebugView XNA\DebugView XNA.csproj" to my solution explorer in Visual Studio. In addition, I added a reference to my project and the ...
0
votes
0answers
161 views

Simulating smooth movement along a line after calculating a collision containing a restitution of zero in 2D

[for tl;dr see after listing] //...Code to determine shapes types involved in collision here... //...Rectangle-Line collision detected. ...
0
votes
0answers
138 views

Farseer non-colliding bodies affect eachother

I'm trying to use Farseer to make a tile engine, but bodies that are not colliding with a sprite are still having an effect on it. In this image there is a single sprite(the green box) and a single ...
0
votes
0answers
337 views

How do I properly use multithreading with Nvidia PhysX?

I'm having a multithreading problem with Nvidia PhysX. the SDK requires that you call Simulate() (starts computing new physics positions within a new thread) and FetchResults() (waits 'till the ...
-1
votes
0answers
14 views

Understanding the use of MTV for an elastic collision response

So, I'm trying to simulate polygon physics, both linear and angular. To calculate the MTV is easy in SAT (Minimum Translation Vector), and to use it to adjust position is also easy: PolygonA.center ...