- Home /
Question by
DevMerlin · Aug 28, 2016 at 08:02 PM ·
meshproceduralprocedural mesh
Placing objects in world at vertices position?
I have a mesh I have generators running through and building for a dynamic terrain function. However, now I've gotten to the point I need to stitch the terrain together. I've settled on using a transform to change the last X vertice point to world space, however it's still off a bit.
This:
public Vector3 GetMeshVerticePosition()
{
Vector3 worldPt = transform.localToWorldMatrix.MultiplyPoint3x4(vertices[440]);
GameController.Instance.nextPosition = worldPt;
return worldPt;
}
produces this:
Strangely, the next mesh hovers slightly above the actual position. Is there anything I can add to the transformation to correct this - or a better method?
9968d4da65a1e671bd823f0e5b68ebef.jpg
(125.9 kB)
Comment