Click here to Skip to main content
15,885,537 members
Everything / Collisions

Collisions

collisions

Great Reads

by tugrulGtx
A walkthrough for a grid implementation of "particle in cell" problem to improve performance of axis-aligned bounding-box (AABB) collision checking in various scenarios
by Andreas Michael Kreuzer
This article is about collision detection for convex polytopes using the simplex method.
by Mike Oberberger
Compute a velocity vector which allows a first moving object to intercept a second moving object given known positions and current velocities within a game or simulation environment

Latest Articles

by tugrulGtx
A walkthrough for a grid implementation of "particle in cell" problem to improve performance of axis-aligned bounding-box (AABB) collision checking in various scenarios
by Andreas Michael Kreuzer
This article is about collision detection for convex polytopes using the simplex method.
by Mike Oberberger
Compute a velocity vector which allows a first moving object to intercept a second moving object given known positions and current velocities within a game or simulation environment

All Articles

Sort by Score

Collisions 

16 Apr 2022 by tugrulGtx
A walkthrough for a grid implementation of "particle in cell" problem to improve performance of axis-aligned bounding-box (AABB) collision checking in various scenarios
3 Sep 2013 by pasztorpisti
Collision detection is a very huge topic. Probably you would be okay with a very small and simple collision detector but currently it seems you can't write one for yourself and I doubt that you want to read a book on collision detection or want to learn the difficult math to solve your problem....
21 Mar 2018 by CPallini
Yes, direction is affected. You should compute the horizontal and vertical components of the particle speed in the frame where the hit wall is the horizontal axys, invert the vertical speed component and then transform back to original axys.
11 May 2022 by CPallini
You missed the semicolon at the end of the class declaration. I assumed it was C++, my bad. Please note: Quote: currentScore + normalEnemy; has no effect. Possibly you meant currentScore += normalEnemy;
13 Sep 2012 by Philip Stuyck
It is actually pretty simple.Your code is already wrong in the sense that it is not detecting a collision upon the movement itself but on a timer that elapses.If you just want to prevent the movement to a certain position, you calculate the new position first without changing the controls...
25 Oct 2012 by haitrieu749
I want to check the collision of one model with another model.I use collision check function as follows://Built Bouding Sphere private void builtBoudingSphere() { BoundingSphere sphere = new BoundingSphere(Vector3.Zero, 0); foreach (ModelMesh mesh in...
9 Nov 2012 by haitrieu749
Plan to split into smaller pieces to review collision.It can be a solution acceptable. Use BoudingSphere to check that pieces.Example: the airplane, split: head airplane, tail airplane, wing airplane. And check each part for collision.
8 Oct 2014 by lukaszbl
Hi,What do you say about making your code more object oriented?Separating different entities into classes should do the trick, code will be easier to read and more open to new features:)I would base your game on something more or less like: class Ball{ Point Location; Point...
13 Sep 2012 by Sergey Alexandrovich Kryukov
Please see my comment to the question. First of all, you need to understand some basic principles of Physics Engines. Even it you want something highly simplified, you need to know the matter to be able to specify it correctly. You can start...
3 Sep 2013 by Gigabyte Giant
Hello everyone,So I am learning Java by choice, and I am following the Official Java Tutorials on the Oracle site, but as a side project I am developing a top down game.I have 2 sprites programmed into the game so far, and I want to be able to detect a collision between the 2.I am...
3 Sep 2013 by petrostherock
Check this outhttp://devmag.org.za/2009/04/13/basic-collision-detection-in-2d-part-1/[^]
13 Jul 2014 by Francisco T. Chavez
I've been building a small racing game in C#, and I've hit a bit of a block when it comes to the impulse resolution of the car to car collisions. At the moment, the cars are able to hit and push each-other, but there's no resulting rotation from these collisions. The problem I'm having is...
16 Nov 2013 by Francisco T. Chavez
I ended up using the point of minimum extent along the normal axis, from CarB. It's the possible solution I mentioned in the question. Things are a little bouncy, but I think that has more to do with the constants I'm using. Besides, most people that have tried the game out tend to get a bit of...
21 Sep 2014 by Sergey Alexandrovich Kryukov
Some more of a hint:This is a simple 2D problem. I assume this is a cone based on a circle. Dissect the cone with the plane passing through its axis. Consider the problem in this plane. You will get two symmetric rectangles formed by this axis and intersection with the cone surface, with the...
7 Oct 2014 by log988
I'm making a game (Breakout) and I have a question,The question is how can I remove the barriers after they get hit by the ball? Of course, the ball must be able to go through the track after that (like Breakout game in general)the next question is that can I make the barriers in run...
8 Dec 2014 by Member 11296203
I am working on a 4 Way Pong Program. I have it to the point where my paddles will move with mouse movement, and the ball will bounce around the screen.I am stuck when it comes to figuring out how to check for collisions between the ball and the paddles (which will increase the score) and...
8 Dec 2014 by _Maxxx_
caveat - I haven't looked at your code:Normally you would deal with a bounding box for each item you want to test for collision - assuming your paddles are relatively rectangular, then the bounding box for each should be simple to determine.For the ball, presumably circular, the bounding...
21 Mar 2018 by Shortground
(a,b)inside the triangle: a>0 b>0 4a+3b
10 Jan 2019 by istudent
I have list of Students which looks like below List results= new List{ new Student{Id = 1, Name = "John", CourseName = "Math", CourseStatus ="Complete"}, new Student{Id = 1, Name = "John", CourseName = "Science", CourseStatus ="In Complete"}, new Student{Id = 1,...
10 Jan 2019 by OriginalGriff
Have a look at this: Using Linq to create a Dictionary of sub-Lists by grouping from a collection.[^] - it doesn't do exactly what you want, but it shows the hard bit, which is generating the collection. Passing that to a Student constructor shouldn't be too difficult.
10 Jan 2019 by Maciej Los
Take a look at below example: void Main() { List StudentData= new List{ new Student(){Id = 1, Name = "John", CourseName = "Math", CourseStatus ="Complete"}, new Student(){Id = 1, Name = "John", CourseName = "Science", CourseStatus ="In Complete"}, new Student(){Id = 1,...
4 Apr 2020 by Jeremy Maldonado
I am creating a program to simulate an outbreak. The program will have a number of circles bouncing around the screen. I have a class for the window and a class for the entities. I create instances of the class and add them to an ArrayList. I...
4 Apr 2020 by Gerry Schmitz
During each frame, move each circle, then loop through each circle, calling a method on the circle, called "IsInContact" and does whatever it needs to detect "contact". "Collision" implies an event, whereas "in contact" is a state, which is more...
17 Oct 2021 by Member 14335464
In a WPF scene, I have 2 Model3D in a GroupModel3D: one Model3D is a tool, the other is a workpiece and I want to test when they touch. To test when they touch, I need to inspect every coordinate of Model 1 to determine if they intersect the...
11 May 2022 by Soraaaaaaa
It keeps giving me the semicolon error but I have every statement ended with a semicolon. using System.Collections; using System.Collections.Generic; using UnityEngine; public class Bullet : MonoBehaviour { void OnCollisionEnter2D...
9 Oct 2023 by HughJass24
As suggested by the title, I'm working on an exercise where I'm given a hash function H that takes in an input string x. I'm supposed to construct a distinguisher that proves H isn't collision-resistant. I'm given a block cipher F, F^-1 as well....
6 Jan 2024 by Member 11400059
Hi I want check collision between Div and Img tag with java Script. I have Div with id name is MainDiv. in this div there is too many img tag with position absolute and deferent width and height. aslo there is div id name selection. the scenario...
7 Jun 2016 by Andreas Michael Kreuzer
This article is about collision detection for convex polytopes using the simplex method.
13 May 2015 by Mike Oberberger
Compute a velocity vector which allows a first moving object to intercept a second moving object given known positions and current velocities within a game or simulation environment
13 Sep 2012 by MR. AngelMendez
Hi, I need help with object collisions. I have two picture boxes, I control the blue one and the red is an object. I have it so that when I collide with the red picturebox the blue picturebox changes to black showing a collision. But for a game how can I prevent the blue picturebox from going...
21 Sep 2014 by Member 8753410
I have to write down a program that takes a point in 3d as input and tells if the point is inside a 3d cone ?
5 Apr 2015 by Member 11581941
I am trying to see when my two divs are going to overlap and touch each other. The two yellow divs on this example.Why is it that the collision returns true at a stage when the divs aren't even overlapping or touching each other ?http://jsfiddle.net/abc123/HWfMt/162var degree =...