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
1
vote
0 answers

Unity C# - Collision sphere with cylinder - Not trigger sides of cylinder

I have a sphere collider on a stick and a cylinder. The cylinder has to detect a collision with the sphere collider of the stick and fire up a "OnTriggerEnter" script. Just imagine it like a drum stick hitting a drum in virtual reality. Is there a…
1
vote
1 answer

How to detect mesh collision in Unity3d?

Can we detect mesh collision in unity3d? I want to show some texture on collision, currently I am using box colliders, that's why its surface/edge do not match with the object body mesh, Also even if I get the hit point on the surface of mesh, I…
Ashok Damani
  • 3,896
  • 4
  • 30
  • 48
1
vote
3 answers

Collider for blender pot model inside Unity

i've made a simple pot model inside blender: So the idea is that after importing to unity, generating mesh collider, adding ridgin body i would like to be able to put smothing inside the pot. Now it's generating collider but without a "hole"…
1
vote
1 answer

Collider does not always detect OnTriggerEnter

I stumbled across a problem while working with the book "Unity in Action". At the end of chapter 3 you'd end up with the basics for a simple fps game. It's basically a player (camera attached to it) in a simple and small level which only exists out…
marvinb89
  • 83
  • 9
1
vote
0 answers

Unity3D - Deleted Object in Editor Still Blocks Raycast Shooting

I have made a model of a building in blender and imported the .blend it to Unity. There are multiple objects within this building model including windows, a door and floors/ceilings. I have added mesh colliders for each individual object and marked…
user3362828
1
vote
2 answers

Detect trigger with mesh collider but without convex check

I want a precise mesh collider for trigger but the problem is i can't do trigger without making the mesh collider convex. is there any way available to detect trigger without making mesh collider convex.? or can i make mesh collider precise with…
Muhammad Faizan Khan
  • 10,013
  • 18
  • 97
  • 186
0
votes
0 answers

How to make two non-convex Kinematic Rigidbody Colliders detect eachother?

Essentially I'm making a 3d inventory system where you can drag and drop objects, and i'm trying to make it so it detects when you are overlapping two objects. The objects require a rigidbody to work at all, and can't be kinematic since they are…
TheWIzard
  • 29
  • 3
0
votes
2 answers

Collisions only on specific objects, or alternate solution

Working in unity, trying to find a good way to make a collider only work for a specific object. Layer-matrix collision wont work here and Im also hesitant to manipulate the physics engine to ignore all other colliders. The layer matrix wont work…
CThomas
  • 61
  • 5
0
votes
0 answers

RaycastHit does not detect anything despite clearly hitting mesh collider

I have been stuck on this for hours. My movement code uses raycasting since it is a grid based. I started working with probuilder and it seems that the collider detection is quite unreliable and the mesh collider is not detected most of the…
Nush
  • 55
  • 1
  • 7
0
votes
0 answers

Mesh Collider performance

I've read all the information available on mesh collider optimisation, but I still can't answer my main question. How much of an impact on performance do STATIC mesh colliders have? For example, when making an environment for a game (shooter),…
0
votes
0 answers

Ray Cast do not intercept Concave objects

I am making a game with Unity, the project model is 2D. What I have to do is a wheel divided into segments, each segment is an individual object, this wheel turns on itself with a certain speed, here is an imamgine for better understanding: I have…
0
votes
2 answers

Why does my custom mesh turns into a box collider when put in a meshCollider mesh?

I basically want to be able to select many things in my game by projecting a UI selection box (hold right click) into a corresponding meshcollider in world space that would detect anything in it. So I have my main script that takes care of turning…
MathMith
  • 39
  • 7
0
votes
1 answer

Create a Collider on a Procedural Mesh with Data Provided by UDP Source

I created a project that uses data from MediaPipe via a UDP source to capture points of the palm of the hand and finally create a procedural mesh to create a palm surface. This surface is meant to interact with objects in the scene, but even though…
0
votes
1 answer

Do a Raycast after Raycast-positioned object

I have a code that allows to position an object onto the other object by Raycast. Obviously, I am using Mesh Collider so everything works fine. Ray ray = new Ray(transform.position, transform.forward); RaycastHit hit; if (Physics.Raycast(ray,…
0
votes
3 answers

Box collider dont recognize rigidbody in unity

Why is my person walking through trees? How can my character go through a tree when my character has a rigidbody/mesh collider and my tree prefab has a box collider? I want the tree to act like a barrier colliders don't detect each other, I want the…
user17743270