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
2
votes
2 answers

Moving a object randomly without it being inside a wall - Unity 5

i am trying to make some types of pickups spawn inside a given area, although some usually get stuck within the walls, how would i fix this? Code in question for moving objects for (int x = 0; x < garbage.Length; x++) { if (x < 5) { …
Ruben
  • 27
  • 2
  • 7
2
votes
0 answers

Detection of two collider in the same object

I have a problem, I have a 3D animation and I added two colliders I did this because I want to detect when the user touch the head, the chest or the abs zone. And as the picture shows, in the chestUpper zone I add a sphere collider, in the hip and…
2
votes
1 answer

NonCollider Click Event

I have such a question. I have some objects on the screen. These objects contain box collider. When I click on them something happens, it does not matter. Now I do not know how to do when I click somewhere on the screen but not on one of the…
2
votes
3 answers

Unity - using enum properties to detect objects colliding

Last night I was working on a C-Sharp project trying to code around GameObjects hitting each other. I wanted different gate types (e.g. wood, stone, metal) that could be broken down by different weapons (e.g. club, sword, axe). For detecting the…
Charlie S
  • 4,366
  • 6
  • 59
  • 97
2
votes
1 answer

Unity: Collider.bounds.extends.x returns radius since latest update - why?

today I updated my project to version 2017.2.0f3 (was working on 2017.1.1f1 before). This... offsetX = objectCollider.bounds.extents.x; ...used to return the bounds in world space of my SphereCollider, but now it only returns the radius of the…
Pft
  • 23
  • 3
2
votes
1 answer

Unity 5 : Non-convex mesh collider & Is Trigger

I'm having some troubles checking the "Is Trigger" option on a non-convex mesh collider. I looked for an answer on the internet and found something like : Unity 5 does not support that because the updated PhysX does not allow…
Axel Samyn
  • 103
  • 2
  • 10
2
votes
4 answers

How to make a highlight around a PolygonCollider2D in unity?

My question is as titled. I'm playing around with unity to get back into it to return to school, and I've decided to make a little risk type game. Basically I have my map, and when I click one of my territories (which I have a polygon collider…
harrisoncrazy
  • 31
  • 1
  • 7
2
votes
1 answer

Set appropriate Collider type for each Mesh that gets created

I'm generating a bunch of basic sphere and capsule mesh objects at runtime in a 3D fractal-based piece I'm working on, and I'm stuck on how to apply the appropriate Collider type when each object gets created. My script randomly selects from either…
greyBow
  • 1,298
  • 3
  • 28
  • 62
2
votes
1 answer

Unity 5.2 - Moving character bumps between 2D edge colliders

I'm creating a fast-paced, 2D side-scrolling game on Unity 5.2, building my terrain out of discrete "blocks", each with its own EdgeCollider2D component. Having a problem where my character gets bumped upward as it crosses from one block to…
1
vote
1 answer

Can't get contacts

I'm trying to get contacts through the collider but I'm only getting a contact with one object, although the collider in the unit shows two contacts with two objects. As I noted in the tests, GetContacts can only return contacts with one object. All…
1
vote
1 answer

2D unity platform game, conflict with Tilemap colliders

I'm trying to create a platform game, watching videos and tutorials I see that they use the Tile Palette option very frequently. When creating the 2D Tilemap Collider, each square has its collider, and I guess that makes it consume a lot of…
adriaqf
  • 13
  • 2
1
vote
2 answers

Unity mesh collider isn't colliding with other objects, 2D game

I've made a mesh from an SVG in Blender and converted it to a mesh. I then put it into Unity, to put a collider on it, the mesh does not collide with anything, even with convex ticked. Here is my collider: And here is my mesh in Blender (blue is…
Jerry
  • 101
  • 1
  • 10
1
vote
0 answers

How to do OnCollisionExit in Character Controller - Unity 3D

I am a beginner in unity and I am having a problem with how to do the OnCollisionExit in OnControllerColliderHit. What I want to do is to detect the collision and make the object appear by setting the SetActive to true and then setting the SetActive…
Richard Johnson
  • 309
  • 4
  • 17
1
vote
1 answer

Am I understanding something incorrectly about Physics.CheckBox?

Basically on my map I'm trying to use Physics.CheckBox detect when the player is in certain areas to determine where my enemies will spawn at. I am using a layer mask to detect when its colliding with the player and Gizmos to visualize this box in…
The702Guy
  • 31
  • 2
1
vote
1 answer

Unity trigger not triggering

I'm having one of the most basic issue but I really can't get it work on my project. I even tried to re-create a blank project and create a similar situation, in this new project, the trigger is working well but not in my old one and I can't figure…
Pierre Marsaa
  • 346
  • 2
  • 10
1 2
3
18 19