Hi All, I am in the process of building one demo using a Meshing feature in that I need some help for the following scenario:
Scenario: I have added Mesh Collider to a Mesh Prefab due to this the Mesh collider is blocking the GameObject and I am not able to throw the GameObject towards the target. In my case, the Mesh Collider is required for the Mesh Prefab.
I have tried with the IsTrigger option and Layer based collision but still, the mesh is blocking the GameObject.
Can anyone please provide some assistance for this issue?
It sounds like you are interested in having game objects pass through a mesh? Or, is it that your object launcher is not launching your object prefab? It seems that the meshing is working as intended since it’s designed to determine surfaces and block them out like physical materials. That way they can be interacted with by virtual game objects. There is an awesome Intermediate Alternative Meshing Tutorial available on the Lightship YouTube page that goes over a similar project design in greater detail. If you are seeking to have multiple meshes registered with different collision properties in the same scene, that isn’t something Lightship offers by default. So while it may be possible, it would need to be implemented on the developer’s side. As would the projectile launcher used in this example tutorial. More information on meshing in Unity, creating a projectile launcher, and more Lightship tutorials can be found through the links below.
Hi @Erik_Brown, Yes I have to pass the game objects through a mesh. My case is I am Instantiating balloons by scanning the environment using the Meshing feature. I have to
shoot those balloons by using a knife. I am attaching a screenshot of the knife position, please check:
The problem that I am facing is sometimes I am not able to throw the knife towards the target balloon because the Mesh Prefab Mesh Collider is blocking the knife due to collision. In my case, the Mesh Collider is required for the Mesh Prefab.
I have tried with the IsTrigger option and Layer-based collision but still, the Mesh Prefab Mesh collider is blocking the Knife.
Can anyone please provide some help for this problem?
From what you are describing, it seems that the meshing is working correctly. Unfortunately, from the screenshot you provided, it’s not easy to tell what’s going on. A couple things to check would be whether your meshes are Convex, set to isTrigger, contain any extra non-mesh colliders, and the settings for the mesh and object spawning. Also, please refer to the The Garden Mesh tutorial. It covers adjusting the instantiation tolerances for object prefabs (balloons in this case), and can assist with spawning them on the correct side of the mesh. I hope this helps.