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

1
vote
1answer
84 views

Wandering motion in Unity

I am trying to come up with a smooth wandering motion for my game-object using Unity. What I currently doing is rotate the object by some random angle calculated every 1.5 second delay. But I am ...
2
votes
1answer
131 views

How can I simulate a magnet that attracts a ball in a 2D enviroment?

I am making a top-down game where you have to move a ball from point A to point B. You are attracting the ball using magnets that are standing still. The ball needs to get pulled by multiple magnets. ...
0
votes
1answer
51 views

Calculate an approximate distance between two rigid bodies or OOB

Is there any easy way to get an approximate distance between two OOB? I searched around and people talk about GJK algorithm, however I don't see it returning the distance between two convex objects ...
1
vote
0answers
55 views

How to apply physics when you have sub frame state changes?

I'm currently calculating my physics every 1/100th of a second and using a state machine to manage the current state of the player. In my main loop I'm checking user input and transitioning the state ...
0
votes
1answer
363 views

Unity Physics Material - Character Slides Too Much

I am currently working on a 2D platformer in Unity. I am using a prefab from the AssetStore for my character (The last paragraph contains a link to the prefab). The character has a circle collider for ...
2
votes
2answers
95 views

Implementing a motorized hinge joint

I have a 2d physics engine, with three boxes: "body", "left wing" and "right wing". The wing boxes are connected to the body using a hinge joint. The physics world has no gravity. I'm attempting to ...
0
votes
0answers
64 views

Drawing a object with Box2D and HTML5 canvas on current mouse position

I'm attempting to create a air hockey type game with HTML5 canvas and JavaScript, using Box2dWeb for the physics calculation. I need a way to draw the puck at the current mouse x and y position every ...
0
votes
3answers
121 views

Unrealistic sphere behavior on inclined plane

I am trying to model a ball rolling down an inclined surface in Unity based on what I am observing in real life but it is still quite off. In Unity it takes the ball about 3 seconds to travel from a ...
2
votes
1answer
84 views

AABB implementation

I have seen in some texts and tutorials on the web where an AABB is implemented as a position vector and then half-width and half-height vectors. What is the advantage in using the half-width and ...
0
votes
1answer
4k views

Simple collision detection in Unity 2D

I realise other posts exist with this topic yet none have gone into enough detail for me. I am attempting to create a 2D game in Unity using C# as my scripting language. Basically I have two objects, ...
-2
votes
1answer
100 views

Calculate velocity of a bullet ricocheting on a circle

I made a picture to demostrate what I need,basecaly I have a bullet with velocity and I want it to bounce with the correct angle after it hits a circle Solved(look the accepted answer for explain): ...
1
vote
2answers
493 views

Unity - Mecanim & Rigidbody on Third Person Controller - Gravity bug?

I'm working on a third person controller which uses physX to interact with the other objects (using the Rigidbody component) and Mecanim to animate the character. All the animations used are baked to ...
5
votes
1answer
322 views

How can glass breaking effect from Smash Hit be achieved? [duplicate]

I saw Smash Hit the other day and was amazed by the physics of the game, specially the shattered glass effect: I've read other posts about this subject but I still feel that they don't share enough ...
1
vote
1answer
105 views

Is Physics a prerequisite to learn Unity3D

I have got a basic knowledge about the Unity 3D platform but I coding in Unity has not been that easy for me. For the simple reason I can see is, I cannot understand which function to use for what ...
1
vote
1answer
243 views

Consistent Space Gravity Simulation

I have done some reading into this subject but haven't been able to come to a conclusion that I'm really satisfied with so far, so here is the situation. I have a game set in space, its top down and ...
0
votes
1answer
111 views

Bullet - objects falling through

I have problem with bullet collisions. You can see problem on this video (around 0:18): http://goo.gl/DiVP8l Objects are "embeded" inside vertical bars - that is not correct - they should be ...
1
vote
2answers
193 views

What torque should I apply in Bullet to maintain a vertical orientation?

I have a RigidBody in Bullet. Each frame, I want to apply torque to correct its orientation toward an upright position (i.e. near-zero pitch and roll). I know its angular velocity and orientation. ...
1
vote
1answer
99 views

Irregular oval collision detection

I am using a physics library based on the Bullet physics engine. How do I create an egg shaped object or a cylinder where the width differs from the depth (i.e. with an oval shape)? I'm not looking ...
2
votes
1answer
213 views

SpriteKit - How to jump to specific position?

I'm would like to achieve something like Object A will jump to position A in parabolic way. For example: I am able to make the object jump but i do not know how to calculate to make the object jump ...
1
vote
1answer
137 views

What is the appropriate way to implement wobble/balance mechanics in Unity 3D?

We are trying to implement a minigame where the player character sits on a bouncing ball, and needs to a) hit forward to move forward and b) hit left/right to adjust against the the ball's natural ...
2
votes
1answer
136 views

How to run physics simulation in the background for possible future outcomes?

I'm designing a physics-heavy game in 3d. The core mechanic of this game is that the user gets to choose his actions based on probable future outcomes. For example - the player has a choice whether ...
0
votes
1answer
84 views

AddRelativeForce not working correctly

I am stuck on the code for couple of days but couldn't figure it out. Therefore I turned out to look the answer here but couldn't find any that match the requirement Hope some One might help here is ...
1
vote
1answer
118 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 ...
1
vote
1answer
349 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 you've ...
1
vote
3answers
220 views

How do you properly implement level boundaries in a physics room?

I have an issue with creating a proper boundary in GameMaker Studio when using a physics enabled room. My room has a gravity of 0, as it is in Space. My player object has the default values, but a ...
1
vote
3answers
79 views

Character animation in physics-simulated environment

What are the standard solutions for animating characters in physics-simulated environments? Let me explain what I mean - in most games characters are pretty much excluded from physics simulation - ...
-1
votes
2answers
146 views

Character bounces/stutters down hills

I'm using Unity3D (not 4) and I'm experiencing a bit of a problem with character movement. I'm using a cylinder as a First Person player with a child Main Camera. In this cylinder is the stock ...
0
votes
1answer
28 views

Moving multiple hingejoints based on joystick input

I'm controlling a 2D side-viewed (facing right) stickman with a joystick. The movements are fairly intuitive: Joystick down -> Stickman crouches down Joystick up -> Stickman stretches out ...
2
votes
1answer
109 views

Best practice for organizing the physics of objects?

Apologies because this is a long post and I am inexperienced. I would really appreciate the input from some experienced developers. These are my two goals for this project: To learn the best ...
4
votes
3answers
248 views

How do I resolve a sphere-triangle collision in a given direction?

I am trying my hand at game physics. I understand that the basic way to pull back a sphere when it collided is to negate the penetration distance: // If collided... // `distance`: distance form ...
1
vote
0answers
50 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 ...
3
votes
2answers
156 views

Why are my Box2D wheels slipping on ground?

I have a car, set up in Box2D as a rectangle connected with two wheels using WheelJoints: The wheels are defined as follows: FixtureDef wheelFixtureDef = new FixtureDef(); ...
0
votes
0answers
42 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
2answers
250 views

How to add a constant horizontal force just like gravity?

I want to add a constant horizontal force, just like gravity to a projectile or a sphere moving in 3d space, which will make the projectile or ball or sphere or whatever be influenced by this force so ...
3
votes
1answer
139 views

Unity's default integration method

Which method(s) does Unity provide for physical integration? RK4? Verlet? Euler?
0
votes
4answers
264 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? ...
0
votes
0answers
93 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 ...
6
votes
1answer
159 views

How can I predict player-to-projectile collisions in Box2D?

I'm making a real time shooting game with Box2D as the physics engine. The gameplay is mostly about trajectory, like Angry Birds. I want to make a slow motion effect and move camera to the player when ...
5
votes
1answer
166 views

Self colliding cloth physics

I've previously simulated cloth using Verlet integration but couldn't successfully get the cloth to collide with itself in an efficient way. The reason being is because I used a brute force algorithm ...
2
votes
1answer
171 views

Is there a way to view all colliders in a unity project at runtime (after the game have been deployed)?

I'm have created a small Unity project but physics has weird behavior (bug). Unfortunately it only happens on some specific hardware (after build), not on development machine. I don't know what is ...
1
vote
1answer
191 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 ...
2
votes
2answers
57 views

How can I add an impulse to specific rigid bodies at rest?

Scenario Rocks falling down a rocky slope, with a flat surface at the bottom. When they land on the surface, the rocks move slightly before coming to a rest. GLESDebugDraw shows the bright orange ...
0
votes
1answer
50 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
52 views

How can I avoid type checking in the physics side of collision handling?

I have a class responsible for handling the physics side of collisions. When the collision detector spots a collision, it notifies both entities in the collision to take care of gameplay. It also ...
1
vote
1answer
35 views

Forces on entities: remove all each update step, or remove on demand?

Following the answer to my question here, the way I apply forces on an entity, is each entity has a Map of forces (Vectors) and their IDs. Every update step, the acceleration vector is set to the sum ...
5
votes
2answers
250 views

How can I synchronize ocean waves over the network?

I've been performing a little bit of research in my spare time on ways to increase the interactivity of environments in a networked game or simulation. One of my areas of research is fluid-dynamics ...
2
votes
2answers
137 views

How to correctly implement player acceleration caused by player input

In my game I implement movement in the Player class like so: // called from Player's update() method, which is called from the gameloop. void move(){ velocity.x += acceleration.x; velocity.y ...
1
vote
1answer
93 views

2D how to add graphics for liquid physics?

I was always wondering how to add the graphics to a a blob body for example, regardless of what engine or library you are using, i want to know (theoratically) how to move from this state : ...
0
votes
1answer
51 views

Accelerated Motion

I'm making a menu for my game with SDL, when you click on an option a sub menu slides down and is shown, just sliding down is really boring, so I want it to accelerate(like if gravity was pulling it) ...
1
vote
1answer
230 views

Unity: Rolling a ball around a spherical planet with forces

I'm trying to make a game in Unity where the player character is a ball (a sphere), and the game world is a planet (a very large sphere) that the ball can roll around on. The ball can be rolled in any ...