In my program I try to get a neuronal network to drive a car on the road. The neuronal network calculates the acceleration and the rotation of my car. For that I have 7 distance vectors and the velocity as input for my neuronal network. These vectors go from the center of the car 10 ..

#### Category : collision-detection

Detecting stuff in 3d is not as easy as in 2d. I have managed to detect the collision but I am stuck trying to get the correct collision response. It seems that there is no good information online, so I might aswell ask it here. Note im trying to check collision against a voxel. Here ..

I have trouble figuring out a way to detect collision between a circle and a rotated rectangle. My approach was to first rotate the circle and the rectangle by -angle, where angle is the amount of radians the rectangle is rotated. Therefore, the rectangle and the circle are aligned with the axes, so I can ..

I’m trying to handle Sphere->OBB Resolution in 3D space and it all seems works however I seem to have an issue where the velocity after collision is higher than before, the sphere will never come to a complete stop and continue bouncing everywhere. I’ve tried implementing elastic collision where my first object is the moving ..

So I am making a game in C++ and I have ran into error regarding collision detection. I have two objects, Object1 and Object2. Now I want to collide Object1 with Object2, if Object1 is moving too fast, I does not work. I guess this is because, in one frame, it is on the left ..

I want to do collision detection in 3d opengl in C++. I have created bounding box and calculated the centre of objects. Now I wanted to apply same transformations for this centre point, same as for whole models. I created functions which return transformed point based on article Matrix-vector multiplication. For example, when I have: ..

Help! I’m losing my mind trying to get collision detection to work for my Breakout clone. If anyone knows how to work with Allegro 5, be sure to pitch in with some help. This snippet is the bad code: for (POS i = 0; i < layout[0].getBrickSize(); i++) { // Loop over bricks if (b.getYPos() ..

If have the following code which simulates a ball to Ball collision. My problem is, that the balls bounce against each other. I want to have the balls stick together like snow particles. Does anyone know how to do that? /** * Rotates coordinate system for velocities * * Takes velocities and alters them as ..

I am trying to make my moving rectangle bounce off the window borders when it collides with them, however the rectangle is rotating. I’m not sure how to define my collision functions, this is what I came up with: //left border collision if(rectangle.getPosition().y<0){ rectangle.setPosition(rectangle.getPosition().x,0); //top border collision }; if(rectangle.getPosition().x<0){ rectangle.setPosition(0,rectangle.getPosition().y); }; //right border collision if(rectangle.getPosition().y+rectangle.getGlobalBounds().width>WINDOW_W){ ..

I am trying to make boids simulation. Currently, I have a world where they can roam around and have to avoid Obstacles. My obstacles are defined as lines and I am using line intersection to see if there are any walls in front of it and if there are, I steer away from it. In ..

## Recent Comments