- Home /
Bend a cube
Hello guys!
This is my first entry and i am not that good in english - please excuse me.
I want to bend a cube that is transformed into a "railroad" to create a curve. But i am not able to do it.
I think a picture shows more:
I hope you know what i mean.
Thank you for all answers!
Best regards
The second picture shows two cuboids connected by a series of planes that together make a track.
You want to bend the track along the x/z axis to make a curve. Is this correct?
Answer by Owen-Reynolds · Nov 28, 2014 at 05:29 PM
Single models can't be bent, even ones with extra verts that look like they could be. They just don't work that way.
You can add bones in the modelling program. You don't have to animate them. You can then bend the bones either by hand or by code in Unity. If you've never added bones, it takes a while to learn. For example, looks like you'd have to add vert support to the long rails.
You could write code to make a new single-curve track section by moving over the verts. I've gotten good results that way, but you have to look up old HS trig, and know how Unity's Mesh class works. And still need vert support.
I think most people just make the rails out of a lot of short parts. The ends won't join perfectly, like a real bent model would, but close enough.
Your answer
Follow this Question
Related Questions
Move around bends in racing game. 1 Answer
tree bend unity 3.0 1 Answer
manipulate objects in game 2 Answers
triangles look like they are breaking when character bends 0 Answers
Cubic rigid bends? 0 Answers