Skip to main content

Questions tagged [physics]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

Need help controlling a 2d rocket to reach target positions at velocity vector constraints

The problem: I have a rocket in a 2D space game that can apply force forwards and apply torque to turn. Now I want this rocket to reach a target point in the x,y coordinate system with a certain ...
Unsaga's user avatar
  • 1
0 votes
0 answers
14 views

Breaking Ragdoll into pieces

HI to everyone how can i do this that when the ragdoll triggers the gameobject then break the ragdoll into pieces. i want it like this that when the player triggers that gameobject that on which ...
Jano Wazir's user avatar
0 votes
1 answer
29 views

How make a rigidbody not to change its trajectory by any external collsion?

I am trying to make a platformer game in which the player is able to run on the platforms. I have the platforms moving from the right to the left direction and the player is standing on top of the ...
Divyansh undley's user avatar
0 votes
0 answers
30 views

Collision detection with CapsuleCast

I'm attempting to detect when a gameObject with a Capsule Collider and RigidBody attached it lands on the floor, which is a Mesh with a Mesh Collider attached it to it. Adding a tag to the Floor ...
wrappingduke's user avatar
2 votes
1 answer
56 views

Hard dropping blocks isn't instant and doesn't put it in the correct spot

Godot Version: v4.3.stable.official [77dcf97d8] I'm trying to add the ability for blocks (frozen RigidBody2Ds) to be hard-dropped instantly (they get placed on the closest surface directly below them) ...
DragonAero's user avatar
0 votes
2 answers
168 views

What does "Solid" mean in game development?

I was reading this article about physics in Celeste and Towerfall, and came across the use of the term "solid": All of our physics are handled by two classes: Solids and Actors. Solids are, ...
shingo.nakanishi's user avatar
1 vote
1 answer
53 views

Holographic principle applied to 3D rendering in video games

When reading about the usual methods of rendering 3D models in game programming one encounters ideas such as the Perspective Projection Matrix (rasterization), Ray tracing and Ray marching. On the ...
Felipe Dilho's user avatar
0 votes
1 answer
23 views

CharacterBody2D knockback not being applied in the correct direction

I'm having a problem with CharacterBody2D knockback in Godot 4.3 stable. I'm creating a game where enemies (CharacterBody2D) can ...
buzzbuzz20xx's user avatar
0 votes
0 answers
45 views

Wheel collider for skateboard falls through the floor in Unity?

Problem: Why are the wheel colliders not colliding with the floor? Here's a video that shows how the skateboard just falls through the ground: https://imgur.com/a/Vx7QraF I have this kind of hierachy: ...
kyopa's user avatar
  • 133
0 votes
1 answer
79 views

Ball not bouncing infinitely with perfect elastic collision settings

I'm trying to create a ball that exhibits perfect elastic collisions, meaning it should bounce infinitely without losing energy. Here's what I've done so far: Set the ball's restitution to 1 Set ...
B.G.'s user avatar
  • 1
0 votes
1 answer
120 views

How to calculate the center of mass of a irregular polygon in Godot?

Or to calculate the centroid of a 2D polygon assuming uniform mass density, which is my case. The polygon can be either concave or convex.
Alejandro Garcia's user avatar
1 vote
2 answers
44 views

Bullet Physics stopping model from going through static object

Bullet physics tunneling problem: yellow box(dimensions: 2f, 2f, 2f) that falls under gravity. Its Bullet Physics are set as such: ...
i_o's user avatar
  • 121
0 votes
0 answers
33 views

Setting a meshcollider's sharedmesh to a mesh which has been generated directly on the GPU gives "Failed extracting collision mesh"

I've been attempting to modify this example project https://github.com/keijiro/ComputeMarchingCubes I'm trying to repurpose it to build terrain. After the Update() ...
Jimmy Diddler's user avatar
1 vote
0 answers
46 views

Fixed timestep graphics jitter

I'm trying to implement the https://gafferongames.com/post/fix_your_timestep article but I have jitter on the position interpolation. video of the problem I have the following PhysX manager class ...
Mike F's user avatar
  • 103
1 vote
1 answer
53 views

Powertrain modeling for video games

I have been working on a driving game in Unity for some time now, mostly working on the tyre model. I have essentially "completed" the tyre model and I have a relatively realistic model that ...
YaBoyShredderson's user avatar
1 vote
1 answer
56 views

Help me understand magic numbers in Chaos Vehicle plugin's torque calculation

I'm trying to understand the logic implemented in the Chaos Vehicle plugin. I need your help with following points: 1. Torque conversion If I’m not wrong then the brake torque unit is Nm, and ...
Yumyum's user avatar
  • 11
0 votes
0 answers
58 views

Box2d into opengl/opengl es?

I recently learned a little bit of OpenGL through learnopengl.com. I've got through the window, gone through the triangle, then shaders along with interpolation, textures, and now transform. When I ...
Bobby Neal's user avatar
1 vote
1 answer
77 views

How to implement proportional guidance in 2D

I would like to preface this by saying I am not a dedicated game developer. I am trying to implement proportional navigation in order to create a missile class that receives the target location every ...
Stephan's user avatar
  • 21
1 vote
1 answer
113 views

Do server reconciliation and rollback refer to the same thing in multiplayer game networking?

I'm trying to understand the distinction between server reconciliation and rollback networking in games. From what I understand, both involve receiving snapshots from the server and replaying player ...
vicg's user avatar
  • 113
0 votes
0 answers
110 views

3D AABB vs AABB discrete collision - How to choose resolution axis?

I'm working on a simple 3D collision system that only needs to handle dynamic AABB vs static AABB. It needs a sliding collision response, but it doesn't need to sweep (i.e. doesn't need continuous, ...
Archduke's user avatar
0 votes
0 answers
38 views

Dynamic Knock Back Force Based on Collider Velocity

I'm making a game prototype in Godot. My player character is a ship that moves around in 3D space without gravity. I have some simple code that adds a knock back force to the player on collisions ...
Zoford's user avatar
  • 1
0 votes
1 answer
117 views

Adding 1 million torque to a normal cube won't make it rotate extremely fast?

In Unity, I have a normal cube with a rigidbody component. I'm listening to keyboard input and calling AddTorque with extremely high values when a key is pressed. ...
kyopa's user avatar
  • 133
0 votes
0 answers
46 views

2d top down movement physics: speed, max speed, acceleration, friction, velocity, delta

I am creating a 2d top down game and am trying to implement movement. My current approach is very simple and looks like this ...
Aeon's user avatar
  • 1
2 votes
1 answer
58 views

Rigidbody Simulated vs Static vs none

I am confused about the usage of static / not simulated rigidbodies. I get that it is better to disable simulated to temporarily stop a rigidbody rather than deleting and recreating it, especially ...
CheckerT's user avatar
  • 109
1 vote
0 answers
48 views

Predictive Aim to shoot a moving target with a constant velocity while the projectile is affected by gravity (2D/Platformer view)

I've been working on creating stationary gun turrets that can shoot down missiles in my game. The bullets are affected by gravity while the missile moves in a linear path at a constant rate as if it ...
TheFactoryIndustry's user avatar
0 votes
0 answers
45 views

How to make an object keep same relative position and orientation using only velocity

I have object A, I can get any information I want from object A (global position, velocity, etc) I have object B, which is positioned and oriented in a certain way relative to object B. There is no ...
Frédéric Bélanger's user avatar
0 votes
2 answers
54 views

2D drag and drop dynamic rigid body spinning out of control in Unity

I'm trying to make a 2d game that involves dragging and dropping certain dynamic physics objects (like squares) and I am a beginner. I need it to look like the rest of the object holds a weight when ...
Kareem Shamma's user avatar
0 votes
0 answers
49 views

Why do my entities have jittery movement, where their velocities fluctuate wildly between frames?

I'm writing my own simulation for some robots. I want to utilize friction, acceleration, velocity calculations. Currently, my code looks like this: ...
NeomerArcana's user avatar
1 vote
1 answer
63 views

How can I constrain a RigidBody ball to move along a path, but only apply forces to keep the ball on the path without adding velocity?

I'm currently working on a game and I'm hung up on this particular issue. I have a ball that is a RigidBody. The RigidBody is ...
Lewis Cianci's user avatar
0 votes
0 answers
29 views

Inconsistent results from ApplyCentralImpulse with RigidBody2D

I'm working on a 2D top-down game using RigidBody2D for the player and enemies. They're bouncing and moving (using ApplyCentralForce) and detecting collisions just fine, however now I want to add a ...
Bryan Johnson's user avatar
1 vote
0 answers
23 views

Applying impulses simultaneously at each contact point or sequentially?

I'm coding a 2d physics engine in python, and I'm struggling to understand the right way to implement collision resolution when there are multiple contact points. Consider a very simple collision case ...
snickerdoodles777's user avatar
0 votes
2 answers
61 views

How can I implement actor velocity / acceleration with fluid changes if direction changes are small, and abrupt if the direction changes are large?

I hope the question title makes sense. I haven't been able to google for an answer because I don't know what the correct terminology I'm looking for is. Basically, I have an actor / enemy / game ...
NeomerArcana's user avatar
0 votes
1 answer
55 views

2D Physics inconsistent across platforms

I want to create a black hole like gravity pull effect in Unity2D, and used that code for this: ...
CheckerT's user avatar
  • 109
0 votes
1 answer
61 views

Is it possible to design character movement system with Bezier Curves?

For context, I'm trying to create a really dynamic and fast character. That can suddenly move slow, fast, zap into places, dash, and hover in place. Say that I want to make a character accelerate a ...
curiousCprogrammer1231's user avatar
0 votes
1 answer
55 views

Moment of inertia of an arbitrary grid of squares with different masses

I'm making a game where the player can create a 2D spaceship, one square "tile" at a time. In order to simulate the kinematics of the ship I need : To compute the CoM vector. That's easy ...
user29223's user avatar
0 votes
0 answers
77 views

Discretised Physics in Voxel Space

In most physics-based voxel games (like Teardown), there is usually an object-space voxel grid for each object, but no corresponding world-space grid. This means that a voxelized object can be ...
marked-off-topic's user avatar
0 votes
0 answers
60 views

How to make this soft sphere with Unity?

What methods should be used to create such a sphere in UNITY? This collider seems to deform in real-time, squeezing and monitoring collision information when the sphere collides. I cannot achieve this ...
asd's user avatar
  • 1
0 votes
0 answers
31 views

Springy / Stretchy rope

I have a 2D rope cutting game similar to cut the rope, and I want to add ropes that can be extended further than if it laid flat. Easy said: I want to stretch the rope. Currently I have a parent game ...
CheckerT's user avatar
  • 109
0 votes
0 answers
28 views

Friction effect occasionally not applied

I'm developing a racket-ball behavior, the expected behavior is similar to a realistic tennis racket and ball, meaning both velocity and ang. velocity should be precisely applied when the ball "...
Omer Simchoni's user avatar
1 vote
1 answer
69 views

How can I simulate locking or limited-slip differentials in Unity?

I have been developing a racing game in Unity for a few months and I can't find any information on how to simulate a car differential. Right now I just split the torque generated by the engine 50-50 ...
Jorge Cambero Mogena's user avatar
0 votes
0 answers
72 views

AABB Collision Resolution Per Face

I have this function that detect the collision of two AABBs: ...
Scollier's user avatar
  • 124
1 vote
2 answers
80 views

Representing a concave polygon as a hull "minus" convex cavities

I am implementing 2D collision detection, and trying to tackle the problem of concave polygon vs. shape. The SAT works only for convex shapes. I was wondering if the following approach is a viable ...
Eilan Laken's user avatar
0 votes
1 answer
69 views

Circle to Polygon & Circle to Circle Velocity Resolution

I am working a 2d physics engine. Polygon to polygon collision and velocity resolution works without issue, but I am struggling to get working circle to circle and circle to polygon velocity working ...
TrippR's user avatar
  • 3
3 votes
1 answer
99 views

Automated playtesting in a 2D platformer

For a hard 2D platformer I'm working on, I want to make an automated playtesting system. The goal is to allow every level to be tested in parallel as part of an automated test suite. These tests would ...
crass_sandwich's user avatar
0 votes
0 answers
28 views

How to implement flexible, deformable shapes?

I'm making a top-down, 2D wargame that simulates large numbers of troops fighting. Instead of taking the Total war approach and modelling each soldier individually, I represent them as 1000-man ...
DeeCeptor's user avatar
  • 255
0 votes
0 answers
129 views

Suspension vector direction of a raycast vehicle

I'm working on a raycast-based vehicle in a 3D world using a physics engine. It's basically a chassis object that contains a transform (translation, rotation, scale), a dynamic rigid body (with mass, ...
Splo's user avatar
  • 736
2 votes
1 answer
92 views

Pin object to the end of a rope

I'm trying to make a cool simulation where a rope swings with an object attached to its end. I've set up the rope using Verlet integration and used Hooke's law to attach the object. But here's the ...
Ainsley Harriott's user avatar
0 votes
0 answers
46 views

How to move a Rigidbody forward using Bullet Physics

I'm currently developing a character controller for my game framework, and I'm utilizing the Bullet Physics engine for the physics simulation. In the process of adjusting the velocity, I aim to enable ...
Wagner Andreas's user avatar
0 votes
0 answers
61 views

How to calculate velocity based on force at an angle

I have a 2D top-down jetboat that is moving (has a x, y velocity). I apply the velocity by multiplying against the delta time <...
fresh's user avatar
  • 1
0 votes
1 answer
46 views

Game Physics Engine : Euler integration : why body under gravity is not covering 9.8 meters/second?

I am working on very basic physics engine and I used euler interation which works like below, ...
videogamechef's user avatar

1
2 3 4 5
49