Tycoon C++ dynamic rebuild
20 Apr 2019Horizontal atttachments
Added a method that builds a cube shape procedural mesh component.
UProceduralMeshComponent* ATycoonAttachment::AddDynamicComponent(
FVector Start,
FVector End,
FVector StartDirection,
FVector EndDirection,
int32 Column
)
{
// create procedural mesh component vertices using start / end
// Using start and end direction to create the correct orientation in corners -> |-| -> /-\
NewVertices.Add(Start + (StartDirection * AttachmentHorizontalWidth));
}
I’m generating a grid with all the points required to build the attachments. (Rows, columns).