Corrosive-Games / bevy-parallax

Parallax background plugin for Bevy
MIT License
114 stars 17 forks source link

Repeat direction should be set separately from speed #26

Closed FishHawk closed 1 year ago

FishHawk commented 1 year ago

I want the background to repeat only in the x-direction, and scroll in the xy-direction. But if I set LayerSpeed::Bidirectional, the image also repeats in the y-direction.

Like this:

image
ettoreleandrotognoli commented 1 year ago

I'm not sure if I get it, do you want something like the left screen of the split example?

https://github.com/Corrosive-Games/bevy-parallax/assets/4960560/4fed5b5d-1d00-4cff-a75f-824f211e8e7d

FishHawk commented 1 year ago

Plus Y-axis parallax scrolling. When moving up and down, different layers should have different y offset.

Like this:

https://github.com/Corrosive-Games/bevy-parallax/assets/46566858/e297ec11-8dfc-4e1e-bf0f-d81065b413ed

By the way, I have already reimplemented the parallax scrolling system.

ettoreleandrotognoli commented 1 year ago

Hello @FishHawk I updated the cyberpunk example with the new feature, hope that it is what you expect:

https://github.com/Corrosive-Games/bevy-parallax/assets/4960560/2ddd7ed0-526d-4966-98c5-bc17000c0c13

FishHawk commented 1 year ago

That's exactly what I wanted. Thanks.