All Questions
18
questions
0
votes
1
answer
60
views
How does bullet physics filter 4+ contacts in GJK?
If the bullet GJK (Convex vs convex) collision algorithm has more than four penetrating points, then how is it filtering that down to the four it needs?
What I've tried
Staring at the code, but I get ...
0
votes
0
answers
18
views
How can I halt a check for intersections of sets in python when it discovers one member of the intersection?
How can I halt a check for intersections of sets in python when it discovers one member of the intersection? I want to do this so that when checking for collisions the moment an intersecting point is ...
0
votes
1
answer
229
views
Converting physics example to Velocity Verlet / Leapfrog method
I'm looking at the impressive video about verlet integration.
I managed to implement a sphere falling, exactly like the video up to the minute mark 2:19 in the video.
I want to use velocity verlet ...
1
vote
1
answer
51
views
Is it a good idea to solve movement of solid bodies with restrictions (e.g. connections) by shifting tangentially and projecting normally in phase sp?
I am trying to code my first 2d game with physics (in python), and so far my physics simulation works with solid bodies. I want to add connections, for example, so the player can rotate an arm and ...
1
vote
1
answer
134
views
Model path of bullet to hit future position of balloon
I am coding a Bloons Tower Defense Game and one of the problems I have is how to shoot a projectile from a tower and have it hit a balloon that is moving along a certain path. The way I am currently ...
-1
votes
1
answer
45
views
The vector aiming to enemy is in wrong direction
In a 2d game, I am trying to shoot at a moving enemy and the vehicle that is shooting is also moving. However, the velocity of the bullet is not in the same direction as the position of the enemy. The ...
1
vote
0
answers
2k
views
Circle and circle collision (with physics), but when lots of circles pile up things go wrong [closed]
I'm trying to make an as realistic as possible ball physics simulator. Currently, I worked out all the collisions between balls, and it works really well when there are few balls. But once you create ...
0
votes
1
answer
309
views
Top-Down Tank Physics with Pygame
I am trying to make a top-down tank shooter game in Python and pygame, but I can't get the tank movement right. My objective is to make it move forward in the direction it is pointing in which would ...
0
votes
2
answers
170
views
How to make planets "stay together" on collision
I working on a 2D planetary orbit simulator and I've encountered a problem regarding the collision of planets. Currently, here is what I have
...
-1
votes
1
answer
272
views
Collision detection / physics for simple game
I am currently working on a mini game for class (first time doing something like this) and I don't really know how to start with collision detection at all. The game I'm creating is a top down sumo ...
1
vote
1
answer
63
views
Unexpected behavior of bodies affected by gravity in 2D
I have a simple code that calculates the acceleration of a body every update of my simulation using the Newton's law of universal gravitation and the second law of motion.
...
1
vote
0
answers
156
views
Rolling a circle around a square
I am stuck on a simple Box2D task. I have a box and a ball (in top-down view so no gravity), and I would like the ball to roll around the box.
Here is my code. Basically now I am trying to detect ...
-1
votes
1
answer
590
views
how to move object in a circle around point?
There are two controllable objects orbiting around a centre block. Unfortunately, I don't really know how to stick them so they can only move around the block (left/a sends them clockwise, right/a ...
0
votes
1
answer
183
views
How to Prevent Sticking to Overhead Slopes
I am having an issue with overhead slopes in my 2D platformer.
I implement slopes using a LineSegment class. My player sprite has a spine attribute which is just a line segment from the midtop of his ...
1
vote
0
answers
156
views
How can I simulate physics on my curved LED strip?
I have a LED strip with 300 LEDs that I can control one by one:
https://github.com/cipold/pyledstrip
You can think of them as Adafruit NeoPixels:
https://www.adafruit.com/category/168
I have code ...