Questions tagged [mesh-collider]

A Mesh Collider allows you to perform collision detection between meshes and primitives.

A Mesh Collider allows you to perform collision detection between meshes and primitives.

The Mesh Collider takes a Mesh Asset and builds its Collider based on that Mesh. It is far more accurate for collision detection than using primitives for complicated Meshes. Mesh Colliders that are marked as Convex can collide with other Mesh Colliders.

53 questions
0
votes
2 answers

Change public Transforms based on collision. Change line renderer points based on public transforms

I'm pretty new and I can't seem to get this to work. Players have a long pole and if they poke certain objects it starts a string-like connection to the next one they poke. These objects are tagged as "PokableObjects", and to poke players will…
user285259
  • 40
  • 1
  • 3
0
votes
1 answer

Solid plane in Unity

So I created a plane to be my floor in my unity project. I also assigned that with a mesh collider and a box collider and set it with convex but not as trigger. I then created an item with also a mesh and sphere collider and set it to use gravity,…
0
votes
1 answer

How can I get the spatial mesh collider in unity correctly?

I'm trying to get the closest point on the spatial mesh obtained from MS Hololens. I could get the SpatialAwarenessMeshObject collider and gameObject easily with this reference…
BINN
  • 1
0
votes
1 answer

Unity3d CharacterController Collider is not moving with the Player Mesh

i added a charactercontroller to my Player Mesh but for some reason the CharacterController is not moving with the Player Mesh. here's the code for character movements // Vars [SerializeField] private float moveSpeed; [SerializeField]…
0
votes
1 answer

Physics.Raycast doesnt seem to work consistently

I'm working on a raycast based pathfinding system. Basically what I'm trying to do is generate points around an object/check if that object can reach those points, and check if those points can reach the target. The target is the green cylinder in…
0
votes
1 answer

Mesh collider problem with two models next to each other

As you can check from video link I have a mesh created from two models, for some reason sometimes ball collides with middle part between two models, in the test I've run seen in video I've combine two models in Blender and merged vertices by…
Berk Can
  • 163
  • 2
  • 8
0
votes
0 answers

How do I spawn a prefab randomly with it not colliding with the terrain of my game in Unity

I am working on a 3D game wherein which if the bird goes through a pipe successfully it scores a point or else it is dead.I am able to implement this very much. Also I am spawning the pipe (which is a pre-fab)through a script. The position of the…
Chethan CV
  • 547
  • 1
  • 7
  • 23
0
votes
2 answers

How do I add a collider to a flying 3D bird in Unity?

Hi I have made a bird model in Blender which looks like this (I have recorded the video on my smartphone) https://youtu.be/9oa-h_EG228 . I was successfully able to import that into Unity .Now I want to add a collider for that. When I added mesh…
0
votes
2 answers

Message not being disabled when not in collider

I am trying to display a message saying 'Press E to talk to NPC' when the player is collided with the NPC collider and when the player is not collided with the NPC the message is disabled. The message does appear upon collision but it does not…
Z.Mizzi
  • 13
  • 2
0
votes
1 answer

Detection of 2d collision side behaving weird

I am making a basic Breakout game and using the following code to detect if the collision between the Capsule Collider 2d and circle collider 2d has happened on the top: bool FindIfTopCol(Collision2D other) { print("collider.y " + collidersize.y…
jongla
  • 113
  • 1
  • 5
0
votes
1 answer

Why Mesh Collider is not following 3D object's mesh exactly?

I am new to Unity and having trouble with 3D physics. I imported a basic 3D "U" bar shape and applied Rigidbody and Mesh Collider. When I drop another object let's say a ball, it does not go into the shape. When I select the shape, I realized a…
Vetuka
  • 1,523
  • 1
  • 24
  • 40
0
votes
2 answers

Unity 2D On Collision (Do Something) not working?

I know this question has probably been asked many times, but I'm going to ask again.For some reason, my colliders won't work. I have one on my block sprite, and another on my 'miner' sprite. When I hit play, the two start on top of each other. (I'm…
HelpMeGame
  • 57
  • 1
  • 2
  • 12
0
votes
0 answers

Unity Convex Mesh Collider acting Incorrectly with Box that has Flipped Normals

I have a box with reversed normals, so you can view the inside of it from the outside. I want this box to work as a room, with collision detections and what not, and this works fine when its mesh collider is not convex. The problem is I need to make…
0
votes
3 answers

Unity player collision with horizontal small colliders

I know the title isnt very explanatory, but here's my problem: I have a player (merely a cube with a rigidbody, a collider and a movement script), and I have a floor made of small 1 by 1 by 1 cubes (cubes with box colliders). For some reason…
0
votes
0 answers

In Unity, is it possible to mark all colliders in a compound collider as static relative to eachother?

If I make a compound collider out of 20 sphere colliders, and I know that none of the spheres are going to move relative to eachother (i.e. the parent is going to be doing all of the moving), does Unity still keep track of all of their positions…
user430481
  • 315
  • 1
  • 4
  • 14