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
3 views

Unity collider and rigidbody allow touch but not pushing

I'm making a pool game, and would like the circle (imaginary) to be in contact with the table and balls, and to fit perfectly as a ball would. Now I though I would use rigidbody and lerp the position ...
0
votes
1answer
32 views

Breakout angle calculation

I am making my first game in python and I am really stuck at with a physics problem. The game I am trying to make is a copy of the game Breakout. In Breakout, the player controls a "paddle" at the ...
0
votes
0answers
24 views

Coefficient of Restitution of Zero not resulting in complete loss of energy

It is my understanding that a CoR of zero should result in complete loss of energy resulting in the two colliding bodies almost 'sticking' together. In my program however when I find the impulse ...
0
votes
0answers
28 views

Collision with a platform slope (jump through slope) [duplicate]

So, I've gotten platform and slope collision working in my game, but now I'm trying to work on the combination of the two of them. To list it out specifically: Like a platform, you can jump up ...
4
votes
1answer
67 views

How to prevent jitter amongst near-stationary physics objects?

See image for reference Hi Guys, I have been implementing a custom physics engine, and I'm pretty close to having it working as I would like it. There is a gravitational force, and of course ...
1
vote
0answers
42 views

How do I bounce a ball/object without using rigidbody?

How do I bounce a ball without using a rigidbody? The distance between the two successive bounces should remain the same and the bounce speed should be controllable. For example, the bouncing object ...
1
vote
2answers
49 views

Client side prediction physics

I'm trying to build a simple networked game and I'm having trouble keeping a jump in-sync on the client and server. I've read the free gaffer on games articles and it's helped somewhat but I'm still ...
1
vote
1answer
21 views

Allow a character to walk/fall/sink through terrain?

I am making an elevator that passes through the terrain. The character should be allowed to pass through the ground temporarily when he is within the sphere collider. The code is as follows: using ...
0
votes
1answer
50 views

How to make 2D bullet have smooth bounce?

I have an example: //Code that need to run var codeRun = ` function* example(x, y) { x = x || Shmup.advanced.data().scene.size.x / 2; y = y || Shmup.advanced.data().scene.size.y / 3.75; ...
1
vote
1answer
34 views

Marble / Wheel Game Physics - Kinetic vs Static Friction?

I've read a bit about the "normal force" modeling of friction here. I gather that it isn't a full picture, but a decent approximation, if it fits the needs of what you are trying to model. It ...
0
votes
0answers
69 views

How to find blocks pushed by other blocks?

This is 2D world with 1 degree of freedom - the X (horizontal) axis. Each block on this picture might move left or right. It can't rotate etc. Problem All 7 blocks (blue number = block ID) are ...
0
votes
1answer
18 views

How to throw b2body with various speed at fixed position?

Above image is for ref to better representation. I have box2d object and i know start point & end point position. Now i want to give any force or impulse such that b2body will first collide at ...
1
vote
0answers
41 views

Reimplemented steering seek behavior from PyGame to LÖVE is much slower than original

I'm learning about steering behaviors and watched this nice explanation tutorial - https://www.youtube.com/watch?v=g1jo_qsO5c4&feature=youtu.be with the source code available at https://github.com/...
0
votes
2answers
140 views

Can I use Havok Physics for free in my game?

I found out that Microsoft purchased the Havok physics engine. Where can I get it for Windows Visual Studio 2015 Community? I tried to look around, but I could not find anything for the latest ...
0
votes
0answers
18 views

How to add side friction to vehicle physic model?

I'm writing a very simple vehicle physic model using information from this thread, but I'm stucked with side friction calculation. My vehicle slides on surface and don't loose speed at the drift. Here ...
3
votes
1answer
42 views

Disc Golf Physics in Unity

I am trying to make a frisbee golf game, and I am stuck on the physics of the frisbee. I can get the disc to fly, but I have not been able to add spin or make it act the way a frisbee would in real ...
0
votes
0answers
29 views

How to compute forces on objects

Say I have N bodies that moves and potentially collide. I can then compute the net force as F_net=sum(Normal forces from all objects in contact) + gravity + drag + damping + motor Which will result ...
0
votes
1answer
49 views

Can someone explain me how rayCast works?

Im learning libgdx and one of the things that really confuses me its raycasting. I read a tutorial of how to use it and I understand it but I really want to know what's in the back. I searched for the ...
0
votes
0answers
17 views

Game velocity in Winforms using C#

I was trying to make a game where the player could make a square jump up and down. I attempted to add what resembled velocity to make it appear more realistic. As soon as the square reaches the ground,...
0
votes
0answers
51 views

Unity3D make rigidbody ignore collisions from Physics.IgnoreCollision

I have a platformer game, and I am achieving the effects of one-way platforms by using Triggers to disable collisions between a platform and the player using Physics.IgnoreCollision. If I just use the ...
0
votes
1answer
46 views

How to jump exactly X meters in Box2D World?

I want my character to always jump a constant height, let's say 3 meters. Also character has double jump ability so he can jump max 6 meters. For example, let's say I have pressed jump key while ...
5
votes
1answer
168 views

How can I recreate the movement of arrow in air?

Given two Particles A and B which forms the arrow itself, A.P an edge of it and the opposite one B.P. Like so A.P---------B.P. const float DistArrow = 60; Where I have structure Particle: struct ...
2
votes
1answer
89 views

Physics for curved edges?

I'm learning how to program simple two-dimensional games in C++ using SFML, I've done a relatively simple pong game already I would like to ask how I could go about creating the physics for a curved ...
0
votes
0answers
16 views

Streach line on bow using onTouch

I have drawn a line on sprite(Bow) and i want to stretch it using onTouch by fingers. I have added Physics body but not getting how to stretch the line. Its a bow and arrow demo. Please see attached ...
1
vote
1answer
37 views

Specific path for ai for follow

I have an entity's following details: x, y vx, vy angle to x axis its target I want to reach the target by a parabolic path, how to implement an ai that follow a particular path from any given point ...
0
votes
1answer
79 views

Cannon fires straight upward

I'm trying to simulate a cannon for my game. It's given a target Vector, where the cannon ball should be fired at. I want a realistic calaculation of the trajectory path, the formula is included in ...
0
votes
2answers
96 views

2D - Need help understanding how to resolve multiple collisions in a simple physics engine

I am trying to create a small game engine in Java using only basic openGL functions and implementing everything else from scratch. I am trying to get a basic physics engine working (similar to box2D ...
0
votes
0answers
44 views

How to make it so that character hurts enemy with its body (Javascript)?

I'm fairly new to this. Been in the middle of making my first game for a few weeks now and I'm a bit stuck when it comes to making it so that my character destroys enemies when touched. I read ...
0
votes
1answer
49 views

How can I prevent my bullet from influencing other players when colliding with them?

So when my bullet which is a Rigidbody is hitting another player which is also a Rigidbody, the bullet is getting destroyed immediately. But it seems that this isn't enough to prevent the physics to ...
0
votes
1answer
63 views

Bullet physics C# script Is imparting force on rigidbody objects

I have recently made the simplest gun and bullet script that I could and it works amazingly, except for one problem that I've found. When I attach it to a game object with a rigid body the force of ...
0
votes
0answers
36 views

Gravity without collision doesn't work on small distances

I'm programming a gravity system, based on this answer. Everything is working fine, but I want the objects to pass through each other without any collision. To see what I mean, try placing two ...
0
votes
0answers
31 views

How to detect if an object has been effected by AddExplosionForce?

I have a bunch of animated AI characters and I want to disable the animator and NavMeshAgent when a bomb has gone off. For each bomb I have used AddExplosionForce to create an explosion. How can I ...
3
votes
2answers
61 views

Creating proper jump mechanics in LibGDX with Box2D?

I'm trying to create a proper jumping system for a 2D platformer with box2D, however, I'm not exactly sure how to make a good jumping system. Right now, I'm just doing public void jump(float delta) { ...
0
votes
0answers
36 views

Problem with farm tractor physics on Unity 5

I have added tractor mesh and physics for it. The objects inspectors and tree are: When I start "game" the result is strange: GIF Why? Hinge joints are working like spring joints and tractor is ...
0
votes
2answers
33 views

Convert linear velocity to angular velocity for a ball / sphere (Rolling Ball Maths)

I have a ball moving on a flat plane. I cannot use RigidBody physics, so my object in Kinematic and I am manually handling speed/acceleration. The linear movement of the ball is fine, however as the ...
0
votes
2answers
24 views

How to work out the height of a point on a tilted surface?

I have a plane which gets tilted on the X and Z axis (y+ is the normal). Given an X and Z coordinate and the X and Z rotation of the plane, how do I find out the height (Y) at that point? I assume ...
0
votes
0answers
12 views

Calculation of momentum and angular momentum after a kinetic impulse at a certain location

In a space game, how does one calculate the rotation and velocity of a craft, after it got affected by a kinetic impulse. I've drawn a sketch to illustrate my problem. The kinetic impulse could be a ...
8
votes
1answer
197 views

Why does physics not behave consistently in Unity?

I'm making a game in which AI players throw a ball. In the screenshot, you can see the arena which is separated by a net in the middle. Each side of the arena has 6 players belonging to one of 2 ...
-1
votes
1answer
46 views

How to prevent corner slipping with a shortest axis collision solver

Currently I use AABB's to represent objects in my game engine, I resolve collisions between them by finding the shallowest axis, but this leads to a problem if an object is approaching another in a ...
1
vote
1answer
56 views

C# XNA colliders, physics, inclined plane/terrain/colliders

Currently I'm working on a project to learn game programming. But I'm not sure if I have the right approach on several things, and that's what I'm here for. What I'm trying to create is a small world ...
0
votes
0answers
27 views

How to set a maximum velocity of gravity? (Box2d)

I'm making a game in Java and I'm using libGDX and Box2d. I have a world with this gravity: (0, -10). So I want to set a maximum and minimum body velocity (10 as maximum and -10 as minimum) in the y ...
0
votes
1answer
58 views

Best practices for simple physics?

looking for most optimized ways of handling simple physics. By "simple" I mean not more than 1-2 actions per object, and most algorithms are linear. For example, I have an UI element that implements ...
1
vote
1answer
40 views

How to design Client-server hybrid hit detection with projectile weapons?

Hybrid hit detection here refers to a architecture where client sends a hit claim to server and server verifies it with a tolerable error limit to confirm the hit or deny it. This technique may work ...
0
votes
0answers
50 views

How to apply friction on the car so that car slow down

I am working on a driving game. I am able to move the car using arrow key.I am accelerating the car by applying a force in what ever direction that car is.But I need to apply friction to the car so ...
0
votes
1answer
19 views

Sliding loose dirt shader/material/effect

Im sure there is some sort of technique with a name I don't know or didn't think to search, but how would I go about making an effect similar to loose dirt sliding down the face of a slope when ...
0
votes
2answers
54 views

Rigidbody or Character Controller for a momentum based sidescrolling shooter/platformer?

I'm working on a side scrolling game where among other movement options the player can perform a "bullet jump". The bullet jump fills a similar role to a double jump, but instead of just jumping in ...
0
votes
1answer
85 views

SFML with Box2D

I'm using SFML and Box2D to create an application that spawns circles, triangles and rectangles at the current mouse point when the user presses the C, T, and R keys. The problem is that the shapes ...
0
votes
0answers
19 views

GRB GPU Acclerated Rigid Bodies 255mb limit

So I have been using UDK for years now and developing a game solely based off of very nice physics. This physics is the Nvidia Apex GRB graphics processing unit accelerated rigid body solver, but i ...
0
votes
0answers
47 views

How can I make an interactable physics-based ragdoll in Gamemaker: Studio?

I want to be able to make an interactable ragdoll in Gamemaker than can be dragged with the mouse, have detachable limbs if too much force is exerted on the ragdoll, and to be able to collide with ...
0
votes
0answers
61 views

How to slow down snake without making it collide with itself?

I just finished writing my first game ever, snake, in lua using Love2D. The entire source is here: https://github.com/AriaFallah/snake. Here is the problem: My snake is made of 10px by 10px segments, ...