Solved Enable Collision in Unity

Ghostwalden

Invaluable member
Messages
387
Reactions
4,087
Points
123
When i import a 3D Model to Unity, save it as asset and import it into VAM it works perfectly.
But there is no collision in VAM for this object.

Is there an option in unity for activating collision, so that i have collision in VAM?
 
Solution
You need to add a collider to the object in the inspector window in unity before you pack the assetbundle. For complex shapes it is best to make a low poly version of the object you are using and add it when making the game object.

Click add component in the inspector window, and add a mesh collider. If you look at the options in the mesh collider component you want to make sure "convex" is ticked, and where it says "mesh", select a mesh that fits the shape of your model.

You can either use built in collider shapes (cube/capsule/sphere), or add a mesh collider that forms to the shape of the model, the collision mesh will appear as a light green wireframe in unity. For models with loads of geometry it's not a good idea to use the...
You need to add a collider to the object in the inspector window in unity before you pack the assetbundle. For complex shapes it is best to make a low poly version of the object you are using and add it when making the game object.

Click add component in the inspector window, and add a mesh collider. If you look at the options in the mesh collider component you want to make sure "convex" is ticked, and where it says "mesh", select a mesh that fits the shape of your model.

You can either use built in collider shapes (cube/capsule/sphere), or add a mesh collider that forms to the shape of the model, the collision mesh will appear as a light green wireframe in unity. For models with loads of geometry it's not a good idea to use the same model as the main object, as it will use a lot of resources and slow down your scenes, make a low poly mesh that covers the same shape by subdividing/decimating a duplicate model in blender and add that to your model.)
 
Upvote 0
Solution
You need to add a collider to the object in the inspector window in unity before you pack the assetbundle. For complex shapes it is best to make a low poly version of the object you are using and add it when making the game object.

Click add component in the inspector window, and add a mesh collider. If you look at the options in the mesh collider component you want to make sure "convex" is ticked, and where it says "mesh", select a mesh that fits the shape of your model.

You can either use built in collider shapes (cube/capsule/sphere), or add a mesh collider that forms to the shape of the model, the collision mesh will appear as a light green wireframe in unity. For models with loads of geometry it's not a good idea to use the same model as the main object, as it will use a lot of resources and slow down your scenes, make a low poly mesh that covers the same shape by subdividing/decimating a duplicate model in blender and add that to your model.)
Hi Origin69

Thanks for your reply.

I got a tip from VamTastic to add colliders really easy.
For that i just select the model in assets, then i go to the Model Tab on the right side, then tick Generate Colliders, then Aplly.
When i then make an assetbundle and import it to vam, collision works.
 
Upvote 0
Back
Top Bottom