Collisions
How to set up a collision model.
How to troubleshoot a collision model.
How to create models in Blender.
How to bring models into the game.
Collisions for entities in Space Engineers are created in Blender and then exported to a .hkt
-file format to be integrated into the final .mwm
-files the physics engine of the game (Havok) uses. There are a number of requirements for how those collisions are set up, which this tutorial aims to cover.
Create Collision Models
Create a Collision
-collection and assign it to either the Main
-collection of your scene or one of the BSx
(Build Stage) collections. Build Stages will default to use the Main
-collection’s collisions if none are defined for them.
SEUT creates a default Collision
-collection and assigns it to the Main
-collection.
Main
-collection and each BS
-collection, there is currently a bug in Space Engineers that prevents more than one collision model per block from working correctly (collisions are only updated on a reload of the world). As such, it is not recommended to use this feature at the moment. A fix is somewhat unlikely, as vanilla Space Engineers does not use this mechanic in any of its blocks.Create objects and place them inside the Collision
-collection. These objects should generally be simple geometric shapes and your aim is to use as little separate objects as possible. However, make sure that your objects are all convex - never concave - as Havok does not support concave objects.
Select the first of your collision objects and in its Properties
under Physics Properties
, assign it a Rigid Body
. Then, select a shape which can reasonably represent your collision. If at all possible, you’ll want to use anything but Convex Hull
, as they are more performant, though often Convex Hull
is the only viable option. You cannot use Cone
, Mesh
or Compound Parent
as Havok does not recognize them. Repeat this for all your collision objects inside the Collision
-collection.
Convex Hull
> Box
> Cylinder
> Capsule
> Sphere
Cylinder
, you might find that it actually cannot be used.After you’ve exported your block, it’s time to test the collisions ingame. Make sure to do so in a Singleplayer world set to Offline
, as some dev tools might not be available otherwise. Once loaded into a savegame, place your item or block and then hit F11
. In the menu, enable Debug Draw
and then Physics Primitives
. Note that you might have to toggle Physics Primitives
on and off a couple times for it to start working.
Convex Hull
, blue Box
, white Sphere
, orange Cylinder
and yellow Capsule
. Use these to verify the shapes and as a guide to make adjustments in Blender.Troubleshooting
Collisions are not accurate ingame
There are several different reasons why this may be the case:
- Is your collision shape concave? Remember: Concave shapes will have their “holes” filled in. You have to replicate the shape using several convex collision objects instead.
- Does your collision go outside the Bounding Box of your block? Space Engineers does not allow this and may revert your collision back to a box collision.
- Is the collision ingame just slightly larger than what you have in Blender? This seems to be a weird particularity about the conversion process into
.hkt
. You’ll have to make your collision shapes slightly too small in Blender to compensate. (This is also what Keen has done when they adjusted armor collisions to not clang out so much in Spring 2021.) - Do you use individual collisions for your BS and Main models? While SEUT supports assigning individual collision collections to the
Main
-collection and eachBS
-collection, there is currently a bug in Space Engineers that prevents more than one collision model per block from working correctly (collisions are only updated on a reload of the world). As such, it is not recommended to use this feature at the moment. A fix is somewhat unlikely, as vanilla Space Engineers does not use this mechanic in any of its blocks.
Changing collisions has no effect ingame
That issue is commonly caused by either of these two:
- Did you apply transformations, then remove and re-add the Rigid Body to your collision object after editing it? Rigid Bodies are not updated properly with the change in the collision object they’re attached to. As a result, you have to make sure to apply transformations and re-add the Rigid Body.
- Did you completely restart (not reload) the game after changing the collision? Space Engineers only loads collision information on game start. If you don’t restart the game and only reload (or not even that), the collision will not be updated ingame.
Special Note: Collisions on Subparts
Unless the vanilla Space Engineers blocks of the same type also have subparts and collisions on their subparts, subparts do not support collisions at all. That being said, here are some notes on collisions in specific block types:
- Hangar Doors Hangar Doors commonly have two issues: First, when opening and closing with a small grid touching them, they can cause that small grid to be catapulted away. Second, when the collisions on the moving subparts are being shot, or interacted with otherwise, there is a chance that they start drifting away from the visual position of the subpart. This problem can be solved by doing the following:
- Use
Convex Hull
for the collider of the base block. - Rotate the empty for the first hangar door subpart by 180° on the
Z Axis
. - Use the same collider type for all hangar door subpart collisions.
- Use
- Community
- Modding
- Modding Tutorial
- Space Engineers Utilities