Relating to the motion of objects through space and time. Including concepts such as acceleration (thrust and gravity), mass, collision response, friction and more.
0
votes
0answers
4 views
Make Kinematic P2 Body collide with world bounds
I have a P2 object( A) with a custom bound that detects collision with another P2 object(B ). However, object A is set to be kinematic rather than dynamic as I do not want object A to react to ...
0
votes
1answer
12 views
AS3/Flashdevelop - Controlling a 2D character to move around a planet with gravity
With a little help I have managed to create a 2D planet with working gravity that constantly pulls a character towards its center. The only problem now is that I am completely stumped on how to make ...
0
votes
2answers
31 views
Collider not working
I have a 2D object (without a parent) with a 2d box collider (dimensions are not small) added to it and set as trigger when I place it in the scene it works just fine however when I instantiate its ...
0
votes
0answers
16 views
What technique to use for fast pixel physics [on hold]
What proven design patterns or techniques are ideal for implementing physics and collision detection, with speed, on a per-pixel basis. Below are some examples. C++ is what I plan on using and any ...
0
votes
0answers
13 views
Move ball through a direction angle in android canvas [duplicate]
I am building a simple game in android.
I am successful in first step where I draw a ball in canvas in touch point.
Now I am trying to move it from an initial point A (center) through the touch point ...
0
votes
0answers
8 views
Phaser P2 RevoluteConstraint motor not working
The following code produces a flipper and four balls that seem to interact as they should. They all collide with each other and the game world bounds. The problem is that the motor isn't working, nor ...
0
votes
0answers
10 views
Limit rotation of flipper joint?
I have a working RevoluteConstraint using Phaser.P2.Body, and the motor enabled with the speed of 1, the flipper appears as it should, but only rotates around slowly. I'd like to set the normal ...
3
votes
2answers
59 views
Stopping 3D object in place
I am at 1.2 stage (moving the player) at Unity course "Roll-a-ball" and have question:
I want to add feature that stops a player and sets his new position on 0, 0, 0.
I can reset the position, but I ...
0
votes
1answer
69 views
Simple 2.5D flight movement
I'm building a simple 2.5D Dogfighting game, kinda similar like this one: https://gfycat.com/PleasantDeterminedArcherfish for the moment my movement works like this:
if (Input.GetKey("left"))
...
0
votes
2answers
47 views
need to make a ball travel in the angle it was hit from
self.hitBall = function (ball, x, y){
var angle = Math.atan2((x - ball.centerX), (y - ball.centerY));
ball.velocityY = (Math.sin(angle) * 10);
ball.velocityX = ...
0
votes
1answer
25 views
Bounce with multiple collisions
Here's the problem: I'm writing arkanoid-like game in Unity 5.3. I'm using 3d physics and simply ignoring z-axis in computations. No gravity, 0 drag and velocity reset every bounce by script. My ball ...
0
votes
0answers
26 views
Rigidbody2d and square steps
Well, I am developing small game based on Rigidbody2D character. He should go horizontally, jump and automatically climb on rectangular stairs when walking on them. I know slopes is a possible ...
2
votes
3answers
113 views
Accelerated movement in a specific time to a specific point
I am trying to move my sprite in a specific time to a specific position while using frame-independent or time-dependent movement. My sprite is also accelerated every frame to simulate gravity. I know ...
0
votes
0answers
9 views
3D Physics in Marmalade SDK
I am trying to make an 3d game in Marmalade. I am completely new to Marmalade.
How to add 3d physics, gravity, dynamic object, sensors, colliders in Marmalade.
I was going through the API and did ...
0
votes
0answers
18 views
Detecting collision between 2 convex meshes in 3D
For the past couple of weeks I've been trying to implement physics in my engine, and I am currently stuck on the collision detection phase.
In short, I can perform a triangle-triangle intersection ...
0
votes
2answers
53 views
How do I stop the player from rotating when they collide with a tile?
I use Touch movement and if I jump and hit a corner with the feet of my player, my player rotates but I don't want this. Can anyone help me jumping without rotating if I hit anything ?
here is my ...
0
votes
0answers
27 views
Phaser - Tween scale with physics (push other sprites)
I have an immovable sprite. I'm scaling this sprite up with tween but I don't know how to make it push other sprites (with physics) on it's way. Any help would be appreciated.
See the gif to better ...
2
votes
1answer
61 views
How to replicate Unity's Rigidbody.AddForceAtPosition in C++?
I am trying to replicate the function Rigidbody.AddForceAtPosition of Unity in C++, it means, to apply force to a body offset from its center.
How could I achieve that in C++?
0
votes
1answer
19 views
Oscillating an object left and right based on it's current orientation
I'm currently implementing a fire animation in HTML5 Canvas using the phone's accelerometer.
Regardless of the phones orientation, the triangles for the fire move upward. So you can spin your phone ...
0
votes
1answer
34 views
BulletPhysics ship rotation
First of all, I'm a beginner in game physics, and I think this is a relatively easy problem that I'm not grasping.
Short Version:
I have a box(representing a ship on water) going forward with a ...
3
votes
0answers
53 views
How to do an anti sway bar for a car in Unity 5?
I have researched some examples of anti roll bars for Unity but they are all for unity 4 and bellow so they do not work in unity 5. Can someone please assist me in making an anti roll bar script in C# ...
1
vote
1answer
105 views
Collisions being detected before objects are intersecting
I'm making space invaders (in OpenGL/SDL) and I'm currently having issues with getting the collisions (box collisions) between the bullets and the enemies to be properly detected. In my update() ...
0
votes
0answers
41 views
My Movement Function is working good but called only once
I have a function, It's working but not getting called every frame if It's in canMoveDown function but !canMoveDown its not.
if (!canMoveDown && UpdateTilePhysics(currentBoardPiece)) like ...
0
votes
0answers
33 views
`setVelocity` allows body to pass through bodies
In my game, I'm using cocos2d-x and I wanted to have an object that changes direction immediately, so I used setVelocity() on the physics body to do that.
However, when I do that it can run through ...
1
vote
0answers
36 views
Implementation of a quaternion based hinge constraint
I'm trying to implement a hinge joint between two rigid bodies based on Lagnange multipliers, s.t. constraint functions to be constraints on quaternions, which describe bodies orientation, itself. ...
0
votes
2answers
96 views
How to fix my tile-based game's tile movement code ? (like a CandyCrush Style)
I'm currently creating a tile-based game like a CandyCrush style direction movement (no problem on only down movement) trying to smooth, not laggy tile movement with a board piece, and I'm writing a ...
0
votes
4answers
78 views
Issue translating objects by one unit in the y direction
I'm currently making space invaders (in OpenGL/SDL) and I'm running into an issue with the movement of the aliens. I have a 2-d vector of aliens (5 rows of 11) and I'm translating each in the x ...
2
votes
1answer
37 views
Unity rigidbody exhibits a premature max speed
In effort to build a racing simulator, I have been working on a working model for the pistons in the engine, and have come to a bit of a stand still.
I have gone through extensive testing, through ...
0
votes
0answers
13 views
Farseer 3.5 RevoluteJoint Breaking
I think I'm missing something completely and the solution is unbelievably simple, but I'm at a loss at the moment.
I'm trying to build a stylized car, with a rectangle as car body with two circles as ...
2
votes
2answers
57 views
Rigidbody2D Circular Orbiting
I am trying to create a basic solar system in 2D. All space objects has CircleCollider2D on them (which are required for raycasting in another script). Currently planets are childs of stars, and ...
4
votes
1answer
123 views
How to resolve push block physics in a 2D side scroller puzzle
I've been working on a 2D tile-based side scroller puzzle game in Unity with obstacles such as doors, keys, fans, portals, etc., but one type of obstacle, push blocks, is giving me some issues. Here ...
0
votes
1answer
41 views
How to calculate/detect the force of a collision? (Game-Maker Studio)
How can I use game-maker to detect the force in a collision between two mobile (not fixed) objects?
This is used for damage calculation and possibly compression calculation.
My problem is this: ...
1
vote
0answers
34 views
Lateral Slip of car
I have been following this Gaming Institute tutorial and tried to make that car physics system in Blender Game Engine.
...
0
votes
0answers
44 views
HingeJoint shaking, Unity3D 5
I have player with CharacterController and door with HingeJoint, I also have enemies with NavMeshAgent. When someone gets inside this door, it starts shake, jitter, rotating etc. For player I use this ...
0
votes
1answer
56 views
How to calculate acceleration and deceleration
I have a car with speed x, and can accelerate at a rate of 0.5 m/s^2, and can decelerate at a rate of -0.1 m/s^2. Maximum speed is 20 m/s.
To accelerate the car speed, at each frame I need to do:
...
0
votes
0answers
37 views
When are Lagrangian Mechanics useful in a game?
I have not used or heavily studied Lagrangian Mechanics before and I have not built a physics engine modeled with constraints yet.
I understand that Lagrangian Mechanics are an alternative way to ...
1
vote
1answer
55 views
How to calculate distance of travel needed get achieve speed x?
I have a boat traveling at 20 meters/second approaching destination x. Destination x has a range radius of 10 meters. What I would like to do is make sure by the time the boat arrives within 10 meters ...
0
votes
1answer
35 views
How can I handle multiple force in Unity?
I'm trying to get my character to perform a "dash" where their x velocity increases rapidly and then falls over time. However, I'm also maintaining a constant x velocity so the character appears to be ...
0
votes
1answer
71 views
Keep gravity velocity the same all the time
I have 2D rigidbodies that fall to the ground, however they speed up while falling. Also, when they freeze in the air and then unfreeze, the velocity is set to 0 and they gradually start speeding up ...
1
vote
0answers
49 views
How do I simulate vehicle movement in a non-gravity environment (e.g., space)?
As a series of small experiments, I've began to tinker with game development, specifically using SpriteKit and Swift. I'm looking to simulate a body moving through a non-gravity environment, ...
3
votes
1answer
226 views
Player keeps bumping when walking over to another sprite
So, my problem is that my play when he walks over to another sprite he will stop.
I fixed that by adding a physics material with 0 density and 0 friction to the player
and adding a circle collider ...
1
vote
1answer
77 views
2D sunrise in Unity
I see a lot of guides on how to create sunrise in 3D space, but I can't find much information on how to do it in 2D. In 3D, you rotate a lightsource around itself, but in 2D, I need to move the object ...
0
votes
1answer
54 views
Issue with detecting collisions in Pong
I've been working on making Pong in OpenGL and SDL and currently have both paddles and the game ball set up properly. I have an Object (or Entity) class which is used to instantiate each of the ...
0
votes
0answers
58 views
UE4 - Physics Body Character Movement
'Ello folks!
I'm looking for some advice on how to implement a certain system in UE4 - I've been trying to develop this system for a few weeks but it's been a buggy and largely ineffective attempt. ...
0
votes
1answer
68 views
Libgdx Fine Tune Megaman Movement
With help from my last question, I was able to fix the issue of having a stuttering effect if you keep hitting jump, while jumping.
I believe I have managed to match moving on the X axis and the ...
0
votes
0answers
32 views
What Is Vector Math? [duplicate]
Okay so I was wondering, what exactly is "Vector Math"? I was wondering if I needed to know physics for game development, and most people said you just need to understand the basics, but they said ...
0
votes
4answers
121 views
Lunar Lander calculating gravity, acceleration and collision in GameMaker
I've already asked this on the GameMaker forums but had no response so far.
I'm making a little Lunar Lander game as my first foray in to GameMaker, I'm wanting to have the ship land and take off ...
0
votes
1answer
73 views
How often should I calculate the position of a bullet?
In game's like Battlefield or Arma, how many times per second is the position of a bullet calculated?
0
votes
1answer
38 views
Should a transform class store a matrix or seperate position/rotation/scale values?
I'm creating a transform class to make storing the transform of individual objects in a scene easier, but I'm unsure on how to do it.
I could create one like this:
class Transform
{
public:
...
4
votes
4answers
414 views
Should the bullet trajectory calculated by server or by client? [duplicate]
In a FPS game like Battlefield or Arma, when playing online, should the bullet trajectory be calculated by the server or by the client?