Question Import CUA - Unity how to add coliders

rabbit1qaz

Active member
Messages
367
Reactions
47
Points
28
Hi, i try to import some objects from models. I watched tutorial :
but have some problems with mesh colliders. Sometimes they work when i import it into vam and sometimes not (especialy when object is more complex). EG i try on object below. Ive tried to add it to core object MindFlier and nothing. then i remove it and add to 4_HeadShape and additional for 4_upperBodyShape and still nothing. I import it to vam but colliders do not work. then i try to add to Armature (is it skeleton of object ? ) and with it i cant even import to vam. Where should i add component Mesh Colider?:
mindlflier.png
 
Without exactly knowing your mesh, I bet it could have something to do with your file hierarchy (left side on your screen).
In more simple situations you will for instance have a room with a bed and some other furniture in it. If you want to add collision to the bed, you will have to maybe add a mesh collider to the mattress mesh, the cushions meshes and to the blankets. Then you will go ahead and add colliders to the floor and the chair(s) and so on.
Keep in mind that you can only add mesh colliders to a single mesh. If you have collected several objects into a Unity hierarchy, you can't add (working) colliders to that, but you have to add the colliders to the included multiple single meshes.
In your case, if the tentacles are several single meshes, add a mesh collider to every one of them... but keep in mind that mesh colliders on very complex meshes will eat some performance later, so keep it simple.
By the way, If your asset is composed of different meshes, then you maybe want to have an eye on the object hierarchy, too. If you have two (or more) objects that have the same hierarchy in the top level, it might run into some different issues if used in VaM (like issues with colliders or only one part of your asset is moving with the "move" menue while other parts will be static...). To play safe, move everything to a single top hierarchy object.
I hope this will maybe help a bit. Most of the time with complex structures you will need to do some try and error.
 
Upvote 0
If you select either 4_headshape_0.1_16_16 it should in the inspector window. if it doesn't select the 4_headshape_0.1_16_16 and add componetn/ physics/ mesh collider. Then select the collider box and find the headshape. Do the same for the body. If you want it animated that another process.
 
Upvote 0
Without exactly knowing your mesh, I bet it could have something to do with your file hierarchy (left side on your screen).
In more simple situations you will for instance have a room with a bed and some other furniture in it. If you want to add collision to the bed, you will have to maybe add a mesh collider to the mattress mesh, the cushions meshes and to the blankets. Then you will go ahead and add colliders to the floor and the chair(s) and so on.
Keep in mind that you can only add mesh colliders to a single mesh. If you have collected several objects into a Unity hierarchy, you can't add (working) colliders to that, but you have to add the colliders to the included multiple single meshes.
In your case, if the tentacles are several single meshes, add a mesh collider to every one of them... but keep in mind that mesh colliders on very complex meshes will eat some performance later, so keep it simple.
By the way, If your asset is composed of different meshes, then you maybe want to have an eye on the object hierarchy, too. If you have two (or more) objects that have the same hierarchy in the top level, it might run into some different issues if used in VaM (like issues with colliders or only one part of your asset is moving with the "move" menue while other parts will be static...). To play safe, move everything to a single top hierarchy object.
I hope this will maybe help a bit. Most of the time with complex structures you will need to do some try and error.

Thank you for detailed answer. Im completely new in 3D but like to learn here and there to be able to import some things to VAM :) . So how you define mesh in case of my picture. ?
If im right Main object is MindFlier and is compsed of 1 ) and 3) HeadShape and Upperbodyshape and that are meshes right ? Armature seem is some kind of skeleton for whole object. So i select 1) and add to it component Mesh Collider (set cooking option to everthing or mixed) then select 3) and add to it same mesh collider. Then add it to Asset browser and build. Now i can import it to VAM but still no collisions( but all other seems ok) . What i do wrong ? is it possible that i cant add collision on such more complex object ? but in VAM persons are more compliated and collision work on them .

mindlflier2.png


its free object from here:


Could you please help me with that more.

Ive tested wit adding Box collider and it works ok. but i need collider that is very precise and that Mesh collider work very vice. I try it with some other simplier object and it work good. but with this it cannot. Could you guys try if its even possible ? and if so point me further what i do wrong.
 
Upvote 0
Gratulation!
Seems like you found it out successfully yourself.
 
Upvote 0
What if i want to change model rig and eg move some joints, then mesh is not updated and if i export it 1) do not collide at all 2) collide with default position mesh. How to change default model parts/limbs position and generate new mesh for it ? or is it maybe somhow possible to generete dynamic mesh collider and pass it to VAM so if i change limbs position in VAM (with eg ZHFX plugin SuperMode) then mesh collider is updated in VAM ?
 
Upvote 0
I don't know if I have understand your question right, but there is a plugin to edit the colliders of the VaM default figure. What was the name? ColliderEditor? Don't ask me for help with that plugin please, because I am too dumb to understand it. I like girls with smaller breasts, so maybe that is the cause why I have never needed it that desperately... ;)

For the default VaM figures, the colliders are from invisible geometric shapes... sphere collider for head, several box colliders for upper body, 2 spheres for the breasts, aso... They are not mesh colliders from the figure's mesh.

In most of the cases the VaM figure's colliders will automatically follow the bones, if you edit the joint position. So there is no need to edit the colliders. But there wil be issues when the deformations are too extreme.

I really don't know if or how you can do things like dynamic generated mesh colliders in Unity/VaM, or for what purpose you would need them.
 
Upvote 0
I don't know if I have understand your question right, but there is a plugin to edit the colliders of the VaM default figure. What was the name? ColliderEditor? Don't ask me for help with that plugin please, because I am too dumb to understand it. I like girls with smaller breasts, so maybe that is the cause why I have never needed it that desperately... ;)

For the default VaM figures, the colliders are from invisible geometric shapes... sphere collider for head, several box colliders for upper body, 2 spheres for the breasts, aso... They are not mesh colliders from the figure's mesh.

In most of the cases the VaM figure's colliders will automatically follow the bones, if you edit the joint position. So there is no need to edit the colliders. But there wil be issues when the deformations are too extreme.

I really don't know if or how you can do things like dynamic generated mesh colliders in Unity/VaM, or for what purpose you would need them.


No no, my post is continuation of previous messages not about Person i VAM but about Custom Unity Asset , and importing it with collider from Unity 3d :)
 
Upvote 0
Sorry, my English is most likely not that good. I must have completely misunderstood your question.
So the SuperMode plugin is quite new to me, I didn't have known till now that moving an asset's sub-part with that plugin (like open a door in a room, for instance), maybe doesn't move the object's mesh collision, too. This would be indeed a bit of an turnoff, but I am unfortunately not enough into Unity to solve that issue. Maybe it is only a small issue like being a matter of the asset's object hierarchy in Unity, maybe it is impossible... or maybe you might better ask the creator of the SuperMode plugin directly, as he seems to have a superior insight into those functions. This is no trivial every-day question.

I hope I have understood your question right, this time?
 
Last edited:
Upvote 0
SuperMode is awesome addition , couse of possibility of importing assets from Unity(im totaly not into 3d graphic, but for VAM i just learn basic to be able to import things to VAM , amazing thing for many fetishes ;) ) . The only thing is now to allow somhowe use it with timeline, and i have ideas for it but ZHFX is key for it :D
 
Upvote 0
Back
Top Bottom