Questions tagged [collider]

A Websocket signalling server written in the [go] language for WebRTC. For particle/object collision detection in simulations or games, please use [collision-detection] instead.

285 questions
11
votes
5 answers

Collision detection not working unity

First, I know that this question has been asked a lot, but I cant find a solution, so mi problem is, Im making an educational game, and I have a vein and the blood flow (with many box colliders) and a single blood cell (also with a box collider)…
user145708
  • 121
  • 1
  • 1
  • 5
5
votes
2 answers

Circle Collider 2D or Box Collider 2D

I've done some research but can't find the answer to which is most efficient, the box collider 2D or the circle collider 2D? There's this question that got a great answer quickly which says the fastest is a sphere collider, followed by the capsule…
Alox
  • 651
  • 12
  • 24
3
votes
3 answers

Unity does not show collider

Unity does not show collider, i can only see it if i press the edit collider button.
I-Rey
  • 63
  • 1
  • 1
  • 6
3
votes
2 answers

Blender import in Unity, how to generate correct mesh collider?

How to get/generate a proper mesh collider in Unity using a model exported from Blender (.obj/.fbx)? This is my second day using Blender and I'm hitting a roadblock. I've tried fiddling with the Rigid Body Collisions, i.e., setting "Shape" to…
jtth
  • 876
  • 1
  • 12
  • 40
3
votes
1 answer

Unity 2D - Destructible Terrain or Ignore Poly Collider over Spritemask

I'm trying to make a worms-like terrain, but I'm a little confused on how to accomplish that. I'm trying to add a new Spritemask based on my collision point, but I need to re-draw or ignore my Polygon Collider 2D Under the spritemask. Is there any…
Lucas Freitas
  • 1,016
  • 4
  • 16
  • 37
3
votes
4 answers

Unity 2D: How to collide with side of screen

I'm working currently at a 2D Game for Android. There is a player in my scene and if the user tilts his device the player Object is moving on the ground. But he is just moving out of the screen at the left and the right side. I tried to make a…
Jul
  • 79
  • 1
  • 1
  • 9
3
votes
1 answer

Why Collider2D.Raycast & Collider.Raycast are so different?

Collider.Raycast -> Casts a Ray that ignores all Colliders except this one. Collider2D.Raycast -> Casts a ray into the scene starting at the collider position ignoring the collider itself. I want to use it like Collider.Raycast where it "ignore all…
FunFair
  • 191
  • 1
  • 12
3
votes
4 answers

Wheel Collider has different rotation with the wheel GameObject

I want to add a wheel collider in my car wheel but it comes with 90-degree rotation. This is the image: How can I adjust the collider to the car wheel?
3
votes
1 answer

Differentiating between player and other objects colliders during collision detection

I have a safe zone with colliders detecting if my player is inside or not by sending an event message. But there are a lot of other objects inside the safe zone. To detect if my player is inside, I use: void Start() { if (player == null) { …
mad_mask
  • 776
  • 2
  • 10
  • 31
3
votes
1 answer

Unity: Raycast in Editor Mode does not work

I am trying to render the trajectory path of the movement of the ball in my game, all in Editor mode. I believe that this will help my team in creating levels, as it will require less testing while prototyping. Here is my code: using…
2
votes
2 answers

The weapon is not colliding with the AI

private void OnTriggerEnter2D(Collider2D collider) { Debug.Log(collider.gameObject.tag); } When it collides with the weapon (or anything) it should print the tag. The problem is that it doesn't print anything. Here you can see…
Arya Akhavein
  • 343
  • 1
  • 7
2
votes
1 answer

Unity Mash Collider Convex

I wanted to turn on is Trigger by putting C-shaped mash in Unity Mash Collider. enter image description here But this mash collider doesn't activate is Trigger unless Convex is turned on When you turn on Convex, the C-shaped collider decreases the…
snrnsrk5
  • 21
  • 2
2
votes
1 answer

Is it possible to have ui images collide with one another?

So I'm in the middle of making a drag and drop game and want to add collision or at least a way to stop the player from dragging an image out of the canvas. The only problem is I have to make them UI Images. I tried using a box collider on both the…
2
votes
4 answers

Get closest point between GameObject (inside the cube collider) and 3D cube collider

How do I calculate the distance of a game object (inside a cube collider) from the cube collider surface? The existing calculations were made from the cube surface outwards so I got 0 when I used the collider.closestpoint or…
Yunus Emre
  • 61
  • 10
2
votes
1 answer

Collision Detection in Child Colliders, From Parent Object (Unity3D)

I'm trying to make a script that allows the head hitbox, and the chest hitbox which are children to the main game object, to be detected by the main script so that damage can take place. For example, the main script knows when the head collider is…
1
2 3
18 19