Questions tagged [collision]

The intersection of one or more objects or concepts, such as communications packets or function names. For questions about collision detection (in computer graphics) use the [collision-detection] tag instead.

May be used to describe graphical elements (as in a game setting), networking (when multiple packets arrive at the same location simultaneously), RF communication when transmissions overlap and interrupt one another or in programming when disparate functions have similar naming conventions (see also namespace).

For questions about collision detection (in computer graphics) use instead.


Related tags

3094 questions
0
votes
0 answers

Checking for collision between two turtles not working when positions overlap

I'm trying to check if the chaser turtle collides with the runner turtle, but every time the chaser turtle get's close to the runner turtle, the print("Collision") never executes. # import relevant modules from cProfile import run from secrets…
0
votes
1 answer

How to detect a collision in godot (c#)

I've been trying to make it so when a KinematicBody2D enters an Area2d, the Area2D disappears, what should I do? I have absolutely zero clue how to do this
0
votes
1 answer

unity onCollisionEnter2D is not working, how can I get it to work?

my bird is colliding with the clouds but it only moves them and doesn't trigger it my character public float jumpForce = 5f; public float gravity = -9.81f; public GameObject gus; public Transform rotation_checker; public Transform…
Kortay
  • 9
  • 1
0
votes
0 answers

2D box collision if the box rotates

I'll keep the question short. I'm making a 2D game. I have an object, but since it has many pieces, I just out it in a box to have it's hitbox. If it's going up/down/left/right at perfect angles, I can check for collision because it's just about the…
0
votes
0 answers

Kotlin Collisione Imageview and a button

val rc_img1 = Rect() Imageview1.getDrawingRect(rc_img1) val rc_img2 = Rect() buotton1.getDrawingRect(rc_img2) if (Rect.intersects(rc_img1, rc_img2)) { ...move <- else ...move -> make me collesion detection always! I try collide Imageview1 with…
0
votes
0 answers

Algorithm to 3D routing of multiple agents, no obstacles

I have n objects in 3D space and the same amount of target locations. I need to find a way to assign targets to each object and route them without collisions. It doesn't matter, which object goes to which target, just that there is only one for each…
escobar
  • 1
  • 2
0
votes
1 answer

Collision correction pushing player in the wrong direction

I'm currently working on a 2D game using an ECS with a character that's able to move left and right and make a small jump. I'm using a velocity component to control the player's movement, which is updated like this during every game tick: private…
RyanJK5
  • 1
  • 1
0
votes
1 answer

Node.js write object propertys in same time via socket.io

In Node.js, can it happen that when different properties of a global object are written at the same time (with a socket.io request), one of the properties retains its original value? ` var rooms = { a: { move: 1 }, b: { move:…
HU TanKy
  • 19
  • 1
  • 5
0
votes
2 answers

How to prevent 2 python turtles in "movement" from flickering when coliding

For a school projet that wants us to use python turtle but no external libraries (that you have to install from command line), I firstly made a car that can move following a few tutorials. The car worked perfectly. I then tried to add multiple cars.…
0
votes
0 answers

Javascript game collision not working with more than one platform in the array

Hey I am trying to make a game , so my collisions aren't working with more than one platform , please help this is the code: main: const platforms = [new Platform(100,300) , new Platform(500,300)] function update() { …
0
votes
1 answer

Is 16 X 16 the maximum coordinates for minimap array in python pygame? I need a bigger map but collision system not working

mini_map = [ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, 1, _, 1, 1, _, _, _, _, _, 1, 1, _, _, _, 1], [1, _, _, _, _, 1, 1, _, _,…
sam60420
  • 1
  • 1
0
votes
2 answers

Unity 3D: Cube crashes into non existing edges of automatically generated slippery plane (endless runner)

I have made an endless runner game. There, a cube is sliding on a slippery plane. Therefore I created multiple prefabs of planes with obstacles on it which are random placed one after another. Now, when I start the game and my player (a cube) slides…
Fabian T
  • 1
  • 1
0
votes
1 answer

When I include a sprite in a collision the sprite loses interactive property?

I want the 'kiwi' sprite to collide with the spikes group to trigger a game reset, but when this collision this.physics.add.collider(spikes, kiwi); was created, the kiwi could no longer be controlled with arrow keys when it could previously -…
Sarah
  • 1
0
votes
0 answers

Skip AudioSource sound on start

Hello I have sound which is playing on collision with layer "ground" of my object. But my object is standing on layer "Ground" from the beggining so it is triggerig my sound. How can I prevent it? private void OnCollisionEnter2D(Collision2D…
Golden
  • 1
0
votes
1 answer

Collision Detection in a Vector Based 2D Platformer

like many others before, I'm coding a 2D platformer at the moment, or more precise on an Engine for that. My question is about collision detection and especially the reactions to collision. It's vital to me to have surfaces that are NOT tile based,…
Ephiarsis
  • 1
  • 1