jrouwe / JoltPhysics

A multi core friendly rigid body physics and collision detection library. Written in C++. Suitable for games and VR applications. Used by Horizon Forbidden West.
MIT License
6k stars 374 forks source link

[Question] How do I create a custom mesh from a list/array of vertices? #1111

Closed Mahmoud1205 closed 1 month ago

Mahmoud1205 commented 1 month ago

This is my Vertex struct

struct Vertex {
    glm::vec3 Position;
    glm::vec3 Normal;
    glm::vec2 TexCoords
}

I have a list of indices too

jrouwe commented 1 month ago

Here's an example:

https://github.com/jrouwe/JoltPhysics/blob/6370b0f0873c612dd2c8f0b3ea3d085d0e6a4bdb/Samples/Tests/Character/CharacterBaseTest.cpp#L413-L455