Have you considered giving the torus walls thickness?
Hi folks, I’m new to UE4, although I’m very experienced with Unity and native game development.
I’ve imported a static mesh from Blender. The mesh is essentially a torus with inward-facing normals – it’s supposed to be a tunnel. Using this in the flying vehicle sample, my vehicle doesn’t collide with the tunnel walls, even if it starts inside. It does however collide with the blocks and other sample geometry.
As far as I can see, the only difference between the blocks that work correctly and my static mesh is that my mesh has no mass, and has inward-facing normals.
Any hints on how to get the vehicle colliding with the tunnel wall?
Thanks!
That’s a reasonable suggestion, but it didn’t work for me. It turns out I had not set up any collisions. I just assumed that on import, UE4 would generate some default collisions automatically.
I solved the problem after watching this tutorial video: Unreal Engine 4 Tutorial: Collision (english) - YouTube
Basically, I hadn’t set up any collisions. Here’s what I did:
- Created a new test object in Blender: a boolean difference of an outer torus (scaled along normals) minus an inner torus, creating a hollow torus-tube with non-zero wall thickness.
- Exported to FBX
- Ran it through the FBX 2013 converter
- Dragged the resulting file into the Content Browser
- Double-clicked the imported object in the content browser
- In the object editor, in the details pane, under Static Mesh settings, set “Collision Complexity” to “Use Complex Collisions as Simple”
- From the Collision menu, chose Auto Convex Collision
- In the Convex Decomposition Panel, set Max Hulls to 24 and Max Hull Verts to 32
- Apply
- Tested object in the simulator, and can collide with the outside shell (starting outside), and the inside wall (starting inside).
Just a reminder you can create custom collision meshes and define it by naming convention.