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
0answers
26 views

Making a player jump [on hold]

I am developing a game in eclipse for android and I wont to make the player jump like in flappy bird.I developed some code to make the player jump when the screen is touched but when I run the app and ...
2
votes
1answer
70 views

My pool balls often jump around when there are two or more balls colliding/touching

I'm working through the book 'Introduction to Game Physics with Box2D' and I've created a little pool game with the example code. Despite the name, there is NO box 2D used in this particular exercise. ...
1
vote
0answers
86 views

How do I detect collisions between a particle-based net and a ball?

I've implemented a net using Verlet integration and many points connected with constrains; like this demo, but in 3D. I want to implement collision detection between this net and a ball (like in a ...
0
votes
1answer
43 views

Fixed joints in 3D

I'd like to build something like rigid origami in 3D space. So I need some mesh where each vertex is a particle and the set of the edges makes a chains/fabric where each edge is a "fixed length" ...
0
votes
0answers
38 views

How to move rigidbody player to its facing direction with AddForce?

How can I move a rigidbody to its facing direction? I've already tried this: rigidbody.AddForce (transform.forward * v, ForceMode.Acceleration); // v is a public float which gets a new value in ...
0
votes
1answer
42 views

Creating a Player object in a physics engine

I have a working physics environment using Farseer - but how do I create a player object that can walk around? My current attempt involves applying forces to a rectangular body whenever keys are ...
0
votes
0answers
15 views

Projectile Motion in lwjgl with java [duplicate]

I was trying to make a game with a bow and arrow using lwjgl but I couldent get the arch right. I have a function called projectile that is updated once a frame for each arrow. my frame cap is at 60 ...
0
votes
1answer
50 views

Oblique launch within a game

I'm creating a simple game in python that will follow the same logic of DDTank and Worms. The graph is formed by characters. The buildings that will be destroyed are formed by '*', players are '@' and ...
0
votes
1answer
21 views

Moving CCNode with constant speed in cocos2d

I want to move the object (CCNODE) with constant speed in any direction , what i have did till now is applied a force to object at start to get it moving and set elasticity as 1 and friction as 0 to ...
0
votes
1answer
84 views

2D physics collision/gravity problem?

I'm using Love2D and my own physics engine to create a 2D platformer. Y collision works fine, but X collision... well, it's a bit buggy. When I move off of a small platform I've created, I fall but it ...
1
vote
1answer
105 views

Downsides of using this integration formula for movement?

So I read that Gaffron integration basics tutorial and noticed how the Euler integration method gives a small error over time. I implemented the RK4 and noticed that with constant acceleration, I ...
14
votes
3answers
2k views

How can I create a stretchy, breakable pizza cheese material?

I want to create realistic pizza and allow user interact with it. What I want: What I created: I created model of the pizza (8 pieces) in Blender, then imported it into Unity. The piece of ...
1
vote
1answer
70 views

How can I implement smooth digging effects in a tile-based game?

I'm trying to make a Dig Dug styled game where you will be digging into a material. This is going to be a tile-based HTML5 game and I have decided to use the Phaser framework. One way to do the ...
0
votes
2answers
46 views

How to move an object uniformly from one point to another at a fixed angle? [duplicate]

In my 2d java game, I need to move Point objects (as projectiles) from Enemy object to Player object in a straight line. I did some research and found out that I can use atan2(x, y) method of Math ...
1
vote
1answer
55 views

Ground in AndEngine

I'm quite a newbie to AnEngine and I have a problem. I have been searching a lot, but I couldn't find answer. I'm trying to make my first game, but I have no idea how to make ground. I'd like to make ...
0
votes
0answers
53 views

Implementing a group formation behavior

I am trying to implement a group formation behavior where all the units in my group follow a leader and maintain their position throughout. So far I am able to move them, rotate and follow the leader. ...
0
votes
0answers
18 views

calculating avoidance forces for similar objects unity [duplicate]

I am trying to work on collision avoidance for my troops. Currently all my troops have their target object as the leader who is wandering in physical space. The troops just follow the leader but they ...
1
vote
1answer
53 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
123 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
37 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
53 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
132 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
71 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
42 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
110 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
70 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
943 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
91 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
198 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
244 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
87 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
120 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
74 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
149 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
91 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
135 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
90 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
124 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
49 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
80 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
183 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
2answers
126 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
67 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
79 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
99 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
224 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
33 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
138 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
34 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 = ...