Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Resize SplinePathMeshBuilder from bottom
#1
Hi Jake, I'm trying to scale the shape Height (CapHeight var from the SplinePathMeshBuilder script) from the bottom.

Because for now, it scales from the center :
[Image: Capheight_Effect.jpg]

What I would like :
[Image: Capheight_Effect_i_want.jpg]

(I thought by changing the pivot point it would have worked... but no).

Is there any tips I can use to achieve this ?

Thank you so much for your time Smile
Seb

I suspect the answer is in the CuryUtility and CreateRectangleMesh function.
But it is chinese to me haha

Hum well it seems to work like that. Is it allright ?

Changing


Code:
mesh.vertices = new Vector3[4] { new Vector3(-w2, h2, 0), new Vector3(w2, h2, 0),
                                new Vector3(w2, -h2, 0), new Vector3(-w2, -h2, 0) };
By :


Code:
mesh.vertices = new Vector3[4] { new Vector3(-w2, h2*2, 0), new Vector3(w2, h2*2, 0),
                                new Vector3(w2, 0, 0), new Vector3(-w2, 0, 0) };


 
Reply
#2
Exactly!
Reply
#3
Thank you Smile
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  SplinePathMeshBuilder to Curvy Generator AnneAtLukkien 1 4,119 09-11-2016, 04:41 PM
Last Post: Jake
  Create a collider ( SplinePathMeshBuilder) rattle-snake 8 13,810 07-25-2014, 08:24 AM
Last Post: Jake
  Question about calling the SplinePathMeshBuilder Detach Method from code Yog-Shoggoth 1 4,653 06-28-2014, 04:21 PM
Last Post: Yog-Shoggoth
  complete UVs for rectangular shape in SplinePathMeshBuilder rattle-snake 4 8,473 04-03-2014, 07:03 AM
Last Post: rattle-snake

Forum Jump: