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
4
votes
1 answer

UE4 Mesh several collision points detecting

I need to find all hit points (vertices) when my meshes collide since with OnHit there is only one Impact point in the structure and there is only one (red debug sphere). Is there any way to do this? (for example in Unity collision struct has an…
4
votes
1 answer

how to snap two objects in runtime in unity?

this is the 3d model i wanted to connect another model like this to its silver connectors on top side and also another model to right side(so do help me to snap it)I want to know how to snap two 3D objects together in runtime. i.e during "play"…
Aishu
  • 51
  • 2
  • 2
  • 7
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

OntriggerEnter not called playerController

I have a script that is a attached to a box, the box has two colliders on for physics and one (slightly bigger) for detecting OntriggerEnters when my player walks over it. I have a script attached to the box that does the following: public class…
FutureCake
  • 2,614
  • 3
  • 27
  • 70
3
votes
1 answer

Calculate distance between Mesh Edges

I've the point of origin readily available where my mouse is on screen like so, ray = Camera.main.ScreenPointToRay(Input.mousePosition); Now imagine a cube. Anywhere you click on this cube, a line is drawn from the edge clicked on,…
2
votes
3 answers

Unity3D Player walking through and on the Stone

Hello guys my Player is walking on the Stone and through the Stone. The Player called Champ has a Box Collider and the Stone has a Mesh Collider. Also the Player has Rigidbody. I tried everthing i found but nothing helped me with my…
2
votes
1 answer

Fixing ghost collisions on a plane made of multiple Colliders?

Basic Problem: Unity's physics engine produces weird collisions when a player is moving over a flat surface made of more than one Collider. The ghost collisions occur at the joints between Colliders, and express as two behaviors: This seems to be…
user14934791
2
votes
1 answer

Unity : can I change the shape of a mesh collider at runtime?

I have a mesh that updates it's shape according to the user's input, how can I get the collider to match the new shape of the mesh ? As an important note : the mesh is always always convex ( no exceptions ). I saw that it is important in order for…
2
votes
4 answers

Unity3D Collider Passing Through Other Colliders

The Problem: Mesh colliders on some rigidbody objects are passing through colliders on other objects. Things I have tried: With the assumption A is a GameObject with a RigidBody attached and B is a normal GameObject with a collider. Give A a convex…
Jacob H
  • 864
  • 1
  • 10
  • 25
2
votes
1 answer

How do i make objects that are attracted to each other not bounce into oblivion in Unity3D?

so I'm trying to make a program that allows asteroids in a field to be attracted to each other like this: https://www.youtube.com/watch?v=iAWZwTWJmhM I have two programs to do this, one randomly generates asteroids, the other applies gravitational…
2
votes
1 answer

How to create your own Raycast component, which doesn't need colliders, but supports Skinned Mesh Renderer in C# Unity3D?

I am making a First Person Shooter and I have a player model(3D), rigged, with animations and a Skinned Mesh Render component on it. I tried the Mesh Collider component, but it has a large negative impact on the game performance (animations, frames…
Je moder
  • 83
  • 1
  • 1
  • 11
1
vote
0 answers

how do i update a gameobjects mesh collider to the new mesh filter

so i made a few sword models and i want that when i change the sword mesh filter the mesh collider also updates altough i didnt understand how to refrence it. here is my cuurent code for making it. also if possible i would much prefer to use a box…
1
vote
1 answer

Continuous collision detection (CCD) in particle system in Unity, is that possible?

According to this article is possible to solve collision problems with fast moving objects in unity. If you have particle system firing 1 sphere particle (ball throw for example) with collider and gravity modifier. And another moving collider with…
1
vote
1 answer

Different ways to detect size of image on mesh versus size of mesh

I'm creating a puzzle game that generates random sized pieces with 2D meshes. The images contain transparent portions and sometimes a piece is completely transparent. I need to detect what percentage of a piece is transparent. One way I found to…
Cassova
  • 530
  • 1
  • 3
  • 20
1
vote
1 answer

Get Mesh of particle collider

How would I go about getting the mesh filter of a particle collision and than assign that mesh to the particle. So I have a OnParticleCollision. I hit the object take this object I get its Mesh Filter. I than want to assign this to that of my…
user12957455
1
2 3 4