Ninja Bear Studio Plugins Help

Physical Materials

In Ninja Combat, weapons and projectiles can react differently, depending on the surface that they hit. Configuring these reactions will be covered in the Weapon Actor configuration page but before that, we should configure all Physical Materials used in the project.

You can find more information about Physical Surfaces and Materials in the official Unreal Engine documentation

Physical Surfaces

Physical Surfaces are used to identify unique Physical Materials.

Creating Physical Surfaces

  1. Open the Physical Surface list, located in EditProject SettingsPhysics.

  2. In the Physical Surface section, add all entries required by your project.

    Configuring Physical Surfaces

Alternatively, you can add the surfaces above as a starting point, by adding the following lines to the DefaultEngine.ini file, located in the project's Config folder. Make sure to add them under the [/Script/Engine.PhysicsSettings] section.

[/Script/Engine.PhysicsSettings] +PhysicalSurfaces=(Type=SurfaceType1,Name="Asphalt") +PhysicalSurfaces=(Type=SurfaceType2,Name="Blood") +PhysicalSurfaces=(Type=SurfaceType3,Name="Brick") +PhysicalSurfaces=(Type=SurfaceType4,Name="Ceramic") +PhysicalSurfaces=(Type=SurfaceType5,Name="Dirt") +PhysicalSurfaces=(Type=SurfaceType6,Name="Flesh") +PhysicalSurfaces=(Type=SurfaceType7,Name="Grass") +PhysicalSurfaces=(Type=SurfaceType8,Name="Gravel") +PhysicalSurfaces=(Type=SurfaceType9,Name="Ice") +PhysicalSurfaces=(Type=SurfaceType10,Name="Lava") +PhysicalSurfaces=(Type=SurfaceType11,Name="Metal") +PhysicalSurfaces=(Type=SurfaceType12,Name="Mud") +PhysicalSurfaces=(Type=SurfaceType13,Name="Snow") +PhysicalSurfaces=(Type=SurfaceType14,Name="Stone") +PhysicalSurfaces=(Type=SurfaceType15,Name="Water") +PhysicalSurfaces=(Type=SurfaceType16,Name="Wood")

C++ Physical Surfaces

It might be useful to have access to your Physical Surfaces in C++. To do so, you can create a simple header file (.h), with the following contents. They are matching the sample above, so make sure to adjust this example to your needs.

#pragma once #define SURFACE_DEFAULT SurfaceType_Default #define SURFACE_ASPHALT SurfaceType1 #define SURFACE_BLOOD SurfaceType2 #define SURFACE_BRICK SurfaceType3 #define SURFACE_CERAMIC SurfaceType4 #define SURFACE_DIRT SurfaceType5 #define SURFACE_FLESH SurfaceType6 #define SURFACE_GRASS SurfaceType7 #define SURFACE_GRAVEL SurfaceType8 #define SURFACE_ICE SurfaceType9 #define SURFACE_LAVA SurfaceType10 #define SURFACE_METAL SurfaceType11 #define SURFACE_MUD SurfaceType12 #define SURFACE_SNOW SurfaceType13 #define SURFACE_STONE SurfaceType14 #define SURFACE_WATER SurfaceType15 #define SURFACE_WOOD SurfaceType16

Physical Materials

Once your Physical Surfaces are configured, you can create Physical Materials.

Creating Physical Materials

  1. Create a new Physical Material from the Content Browser. They are in the Physics category.

  2. In your Physical Material set the Physical Surface that correctly matches it.

    Configuring Physical Materials
  3. Repeat these steps for all Physical Surfaces in your project.

    Physical Materials Collection

You can assign these Physical Materials in a few different ways:

Source

Assignment

Skeletal Meshes

In each collider in the Physics Asset, or in the PhysMat Override in the Skeletal Mesh Component settings.

Static Meshes

In the Collision Settings for the asset, or in the PhysMat Override in the Static Mesh Component settings.

Pawns or Characters

Either in their Skeletal/Static meshes, or dedicated Collision Components attached to bones in the Skeleton.

Last modified: 05 April 2025