Anyway to fold meshes? i wanna be able to fold a paper air plane in my game

I want to be able for the player to fold a mesh into what they want, meshes can cross each other as i’m looking for a simple solution.

hoping for a basic solution i can build off of
there isn’t anything about this online, just looking for ideas and suggestions

Should i use a 2d mesh? something about skeletal meshes?

a 3d mesh with physics and stuff is best, because i wanna make paper air planes that can fly. also the mesh not might be rectangular.

(The folding process i’m thinking of is: the player will plan out lines and how much of an angle the paper will fold across the line. all before the folding starts, and when the player decides to start folding, the paper will fold its self.)

Hi WumpusPlushie,

It would probably be easier to create meshes for each section of the paper plane and set their pivots to the edges that are the folds.

Then you could build a blueprint from them and animate their rotations…

You could do the whole thing procedurally but it seems like a lot more work…

ok thanks i’ll look into that, and post here if i find a solution

1 Like

hm you can slice procedural meshes, might be useful

2 Likes

Or that there are generative/procedural meshes at all, which suggests he could map out folds/seams, in order, to create a plane-shape?

Never tried this, dont’ take my word for it but from what I have seen, functionally, this might be readily-do-able.

2023-07-15 14-26-43.mkv (20.3 MB)
Made a crappy example but it works. code is pretty simple just slice a procedural mesh and rotate it using a timeline so it rotates smoothly. there are tutorials about slicing meshes if anyone is wondering

also thing about this is , you can only slice A mesh, so if you slice a mesh two times you will only get 3 meshes. because you can’t slice 2 meshes at the same time.(this will be a “feature” in my game, as i am too lazy to find a good solution)(just realized it might be really easy to implement but anyways)


a piece of code

tldr
1.make the paper a procedural mesh
2.slice the procedural mesh where you want to fold it.
3.and rotate the slice to actually fold it

3 Likes

to anybody that actually wants to try this: when you cut a procedural mesh, the center of that procedural mesh is the same as the mesh you cut, making the paper fold realisticly (around a line) is kinda hard, will need to use cross products and stuff

other un-important stuff:
rotating the mesh is kinda hard, and for reason it doesn’t work, rotation is kinda weird, this is a realistic origami simulator, but in java script and stuff : GitHub - amandaghassaei/OrigamiSimulator: Realtime WebGL origami simulator
it has a web version where you can play with
i will try to get this working in ue5, i’m not familiar with c++ in ue5, and i’m not sure how i’ll actually do this, but i think if i have a week, i probably will make this possible, also i can’t read java script but i’m sure things will be fine…right…

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.