This will give you a list/array of Vector3 points along the Bezier path.ģ.) Create a helper class to convert the Vector3 Bezier path data from step 2. This can be done via the Interp method on the class provided above. There is one in C# here that you can port to c++.Ģ.) Once you have a Bezier Path created, data points from this path are sampled. This will give you the source data for your mesh extrusion. Listed below is an example of how I'm doing it:ġ.) Build/Find and Implement a Bezier Path Class. It would be like a level editor in the case of your game, in my case, it's designing pinball tables. I'll give you an overview of how I create my rail extrusion based on a Cubic Bezier path so although the rail's mesh is procedurally generated, it's based on the Bezier path that I define ahead of time in an editor. I'm working on a game that uses a procedural extruded rail system like the one you are starting but it's in C# in Unit圓d. I'm sure you could look at the code and rework it for your situation. I'm not sure what language you are working in but there is a procedural mesh extrusion example for Unit圓D located here:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |