# Creating fold able papers in android game

**URL:** <https://forums.unrealengine.com/t/creating-fold-able-papers-in-android-game/19885>\
**Category:** Mobile\
**Tags:** unreal-engine, Android\
**Created:** [January 29, 2015, 3:05pm UTC](https://forums.unrealengine.com/t/creating-fold-able-papers-in-android-game/19885 "2015-01-29T15:05:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_4cde3db1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4cde3db1](https://forums.unrealengine.com/u/anonymous_user_4cde3db1)\
**Post date:** [January 29, 2015, 3:05pm UTC](https://forums.unrealengine.com/t/creating-fold-able-papers-in-android-game/19885/1 "2015-01-29T15:05:48Z")

</div>

Hello my friends 🙂

i want to make a android game, I’m trying to make fold able paper in my game, for example i want to have a bitmap image in my sene, and be able to fold it with drags, see the idea:

![1.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/8/9/89f6d3660cf8b4e4845f68d87a06e66f4334fdb7.png)

 ![2.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/f/e/fe5ff41331dc75dc828a55a626126516aef21acc.png)

can anyone give me the trick of doing so?

dont forget that i dont want to replace some sprites! i want a sprite to be folded dynamically.  
thanks.

---

<div class="post-metadata">

**Author:** ![Nawrot](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nawrot/32/618260_2.png) [@Nawrot](https://forums.unrealengine.com/u/Nawrot)\
**Post date:** [January 29, 2015, 5:32pm UTC](https://forums.unrealengine.com/t/creating-fold-able-papers-in-android-game/19885/2 "2015-01-29T17:32:39Z")

</div>

Lets see, in red picture case, you have 4 triangles to display: upper left half of picture, flipped part of papre that is dragged by finger, and 2 triangles that make remaining quad.  
Because you probably want to drag that folder paper at any angle, premade shapes and animations will not work.

You either can create meshes in runtime, or use square meshes with clever and tricky masking.

For squares and masking:  
First make algorithm that splits your paper in triangles. Calculate correct uvs for visible part of paper for current triangle.  
Then rotate and pan uvs for material. But this all will be hacky way and probably lots of unnecessary problems

So you are really left with making custom meshes. Those are just triangles, biggest problem will be giving them correct uv coordinates.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_4cde3db1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4cde3db1](https://forums.unrealengine.com/u/anonymous_user_4cde3db1)\
**Post date:** [January 30, 2015, 8:40am UTC](https://forums.unrealengine.com/t/creating-fold-able-papers-in-android-game/19885/3 "2015-01-30T08:40:00Z")

</div>

> [@;213113](#):
>
> Lets see, in red picture case, you have 4 triangles to display: upper left half of picture, flipped part of papre that is dragged by finger, and 2 triangles that make remaining quad.  
> Because you probably want to drag that folder paper at any angle, premade shapes and animations will not work.
> 
> You either can create meshes in runtime, or use square meshes with clever and tricky masking.
> 
> For squares and masking:  
> First make algorithm that splits your paper in triangles. Calculate correct uvs for visible part of paper for current triangle.  
> Then rotate and pan uvs for material. But this all will be hacky way and probably lots of unnecessary problems
> 
> So you are really left with making custom meshes. Those are just triangles, biggest problem will be giving them correct uv coordinates.

Thanks a lot for your reply, i get the idea, but i have no knowledge about meshes an making them, so can you please give me some documentation about it, which i be able to continue my way?

---

<div class="post-metadata">

**Author:** ![Nawrot](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nawrot/32/618260_2.png) [@Nawrot](https://forums.unrealengine.com/u/Nawrot)\
**Post date:** [January 30, 2015, 12:51pm UTC](https://forums.unrealengine.com/t/creating-fold-able-papers-in-android-game/19885/4 "2015-01-30T12:51:44Z")

</div>

here simple search gave this:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...
