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.

0 votes
0 answers
22 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
72 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
21 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
50 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
1 vote
0 answers
35 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
40 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
47 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
52 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
17 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
52 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
0 answers
28 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
0 votes
1 answer
46 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
51 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

15 30 50 per page
1
2 3 4 5
161