Change mesh vertex at runtime (Apply custom Transformation on mesh)
Hello everyone, I'm working on a game system that allow the player to transform certain object . Translataion, Rotation and Scale are pretty straighforward, but the tricky part is the player must be able to Shear and Reflect the object.
Beleive me, if I could avoid these transformations I would, but it's a boss's request :( .
I know how to access the vertices with that
I do my calculus stuffs without problem, but how could I force the mesh reconstruction ???? (the problem)
I know several persons says "it's impossible to change vertices at runtime", but there's certainly a solution.
I know even if it works, it will be slow, but I don't care at this point because it won't happen often.
I digged the core mesh/render code for several days without success.
Any suggestions/solutions or anything else will be appreciate.
If you need more details let me know.
asked Sep 17 '15 at 01:01 PM in C++ Programming
Hey again Gamer08, moving over here since it will easier for other people to find relevant information. I'm currently at work and I'm not tasked with vertices manipulation so I'll have to refresh my memory once I get home but have you checked out the FDynamicRHI::RHICreateVertexBuffer function?
If you have the vertex buffer you want then this should apply it to the mesh. According to the API you can even call it at runtime. Here's an example (written by Epic in the 4.7 engine) of how to use it to create a unit cube:
Hope it helps!
The solution would be to generate a new static mesh from the old one, modify the vertex data and then finally replace the selected actor's mesh.
answered Oct 21 '16 at 10:15 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here