Try to create sphere at runtime

i found this in the api section math : FSphere | Unreal Engine Documentation
how i can use at or get the triangles so i can render at (build a method do that thu A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums)

basically my question how i can make a sphere

I can’t help you with procedural mesh generation, but I can tell you that the FSphere type is merely the mathematical representation of a sphere, i.e. a center point plus a radius. Beyond that it holds no geometry information, such as a triangulation into polygons.

That being said, you can use an FSphere instance as the basis for creating your own spherical meshes. There are many ways to triangulate a sphere, and I’m pretty sure we already have code for that. Perhaps take a look at the BSP code for sphere brushes until someone else can provide a better answer :slight_smile:

#PrimitiveDrawingUtils.CPP

has the sphere drawing algorithms that you want, literally creating a DynamicMesh

:slight_smile:

DrawSphere (Mesh, not wireframe, actual triangles)

void DrawSphere(FPrimitiveDrawInterface* PDI,const FVector& Center,const FVector& Radii,int32 NumSides,int32 NumRings,const FMaterialRenderProxy* MaterialRenderProxy,uint8 DepthPriority,bool bDisableBackfaceCulling)
{
//see the .cpp for the rest for legal reasons

I don’t find any of this in the documentation. In fact, FSphere is not a graphical representation. And PrimitiveDrawingUtils is not mentioned in the docs. Not very easy how to do this when you are a beginner, really…

watch this. How To Do Line Tracing Using C++ In Unreal Engine - YouTube