Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Shapes for the spline not working.
#1
Hi

I am trying to create a custom shaped geo for my spline however no matter what I do it seems to come out wrong.

I cant find any documentation on how you are supposed to set it up and I cant seem to find the geometry assets that are used as Curvy's defaults in the unity project folder for some reason.

Can somone either point me in the direction of information on how to do it or give me a breif step by step including exactly how the geometry should be made?
Im assuming at this point that for example if I wanted to create an arch I would create an arch in maya but only use the front face (like a quad in the shape of an arch) not a complete box modeled 3D geometry as Curvy seems to extrude everything.

However when I try to do this the geometry is seems not to act corretly.

I have attached several images.

The first one is the strange result I am getting when i attach my custom geometry to the spine. (it works fine when i use any of the default curvy shapes)
   
The second is the shape that I assume is put into Curvy as my geometry to be extruded. Behind it you will se the kind of result that I am after as my final product.

   

 

 

 

 

 
Reply
#2
I have the same issue/question. The flat/planer meshes I created and brought into Unity wouldn't drag into the inspector. And testing it with various meshes in the projet gave me similar results as you. I setteled on the rectangle for now as a placeholder.  I am hoping I will be able to use a mesh with 3 parts combined, see attached.

 

 


Attached Files Thumbnail(s)
   
Reply
#3
Hi,

I've made a official post about it here!

I apologize for any inconvenience this issue causes,
Jake
Reply
#4
Can you provide the mesh generation code you use to create the included shapes? I am looking to create a simple 'U' shape. It doesn't need to be dynamic, so my alternative would be to use a rectangle, export it, modify it, and reimport it. 

is there a way to suscribe or get reply notification on posts? 

Thanks. 
Reply
#5
Just have a look into the Curvy.Utils.MeshHelper class.

Jake

PS: As far as I know you can subscribe to the forum only (in the forum's view).
Reply
#6
(07-18-2014, 05:19 PM)'Jake' Wrote: Just have a look into the Curvy.Utils.MeshHelper class.

Jake

PS: As far as I know you can subscribe to the forum only (in the forum's view).

 



Hi Mate,
I know this is going to seem dumb, but I am using playmaker to make my game and don't have a propper grasp on code. Where would I be able to find this, I have had a look in the folder curvy/editor/CurvyEditoryUtility.cs but couldnt find any classes called MeshHelper in there.
Reply
#7
Hi Jake,
I have found and taken a look at your scripts to create meshes.

What I am trying to do is use the Rectangle Mesh however have its pivot be at its upper most point, at the center of the top two vertices.
The reason being that I want the mesh to scale downards from the slpine with the height attribute, rather than scale equal parts upwards and downards.

Is this something that is easily solvable or something that creates a lot of issues?
Reply
#8
This is easy. The rectangle is created at the four points generated by half-width/height off the center, so you'd have to shift the vertices by heigth/2, so


Code:
new Vector3(-w2,h2,0)

becomes


Code:
new Vector3(-w2,0,0)

or in general:

Code:
var offset=new Vector3(0,h2,0);
new Vector3(-w2,h2,0)-offset
...
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
  GO can't fit end of the spline GameDeveloperek4123 3 13 03-04-2024, 11:06 AM
Last Post: _Aka_
Bug Issues when working with in-place prefabs Sacryn 4 6 02-27-2024, 04:08 PM
Last Post: _Aka_
Question How to attach custom components to output Sacryn 3 6 02-23-2024, 09:42 AM
Last Post: _Aka_

Forum Jump: