What is spline Mesh?
Unreal 4 engine and unity3d A major difference is: Unreal 4 engine provides a very very many kinds of functions. This is because epic also develops games and is a very successful masterpiece. They will integrate some of the features that have been validated in the game project and can be reused by other developers to the engine layer. So the Unreal 4 engine has a lot to learn, but if you get the most out of it, it's probably easier to start a project. :)
This article describes a fun component of the Unreal 4 engine: spline and spline Mesh. Spline is a curve that you can add to the editor, move the control point, set the tangent of the point, and so on, while the spline mesh binds a static mesh to the specified spline curve and distorts the mesh based on the curve. This feature can be used to quickly make racing lanes, rivers, pipes, ropes/chains, etc. as shown.
The yellow pipes in the demo are built dynamically by the spline Mesh component, and the original footage is just this section of the tube.
Demo Project code Resources download
See CSDN Code Project: Https://code.csdn.net/neil3d/unrealcookbook
After you open this project, see the "Splinemeshdemo" directory.
Functional implementation of the detailed
This magical feature is implemented through a simple blueprint.
First, we need to create a base class for the actor blueprint class, and then add a spline component. This component is used to edit the curve in the editor.
Then, in construction script, we detected a few paragraphs of this spline, adding a Splinemesh component dynamically for each section. As shown in blueprint below. The newly added spline mesh needs to be attach to the parent node and is subject to information such as its start point, end point, tangent, and so on.
Unreal Cook Book: The Magical Spline Mesh