Author Topic: One-sided sprites?  (Read 4197 times)

Cales

  • Guest
One-sided sprites?
« on: June 04, 2012, 06:06:13 AM »
Hi everybody,

I'm trying to create a GUI that behaves like a book with turnable pages and different sprites for the particular page.
The problem is that sprites are two-sided. So when a page rotates the sprite with the higher depth is shown until it's deactivated. And that looks odd.  :o

Is there a way to make a sprite only one-sided? Or any other ideas?

Thanks,
Cales

PhilipC

  • Guest
Re: One-sided sprites?
« Reply #1 on: June 04, 2012, 10:17:31 AM »
Inside the shader (pretty much all of them inside the Resources/Shaders) there are is a property "Cull Off" this is preventing any sort of culling to happen (why you see the mesh from both sides). If you turn this into "Cull Back" you will only see the object from the front.

As a note i'm not 100% sure why culling is turned off my guess is performance but just incase some things start to look strange.

Cales

  • Guest
Re: One-sided sprites?
« Reply #2 on: June 04, 2012, 11:48:14 AM »
Yay! That is exactly what I was looking for. :D
Thanks a lot, PhilipC!

Buey

  • Guest
Re: One-sided sprites?
« Reply #3 on: December 29, 2012, 01:55:37 AM »
This solved my issue as well, thank you.

helioxfilm

  • Guest
Re: One-sided sprites?
« Reply #4 on: December 29, 2012, 03:30:52 AM »
Hi everybody,

I'm trying to create a GUI that behaves like a book with turnable pages and different sprites for the particular page.
The problem is that sprites are two-sided. So when a page rotates the sprite with the higher depth is shown until it's deactivated. And that looks odd.  :o

Is there a way to make a sprite only one-sided? Or any other ideas?

Thanks,
Cales

And how do you implement this book-page turning GUI? I would be interested to hear that... If not confindential, of course :-)



Cales

  • Guest
Re: One-sided sprites?
« Reply #5 on: January 04, 2013, 04:55:52 AM »
And how do you implement this book-page turning GUI? I would be interested to hear that... If not confindential, of course :-)

Hi, thanks for your interest.  :)
I took an empty game object as parent and added two sprites to it, one of it rotated by 180° so it acts as backside. Then I just animate the parent. The turning page isn't perfect as it doesn't bend, but sufficient enough.

Meanwhile our game is actually finished. It's called "Reperfection". There's also a demo (at tinnitus-games.de) if you want to take a look at how I implemented the sprites as a book.

Best regards,
Cales