Open-GD / OpenGD

Open source implementation of Geometry Dash powered by a fork of cocos2dx 4.0.
GNU General Public License v3.0
180 stars 26 forks source link

Fix Particle Rotation not working #39

Closed FireMario211 closed 1 year ago

FireMario211 commented 1 year ago

This change fixes particles (portals, pads, etc) from not rotating based on the sprite.

This changes the files: GameObject.cpp and PlayLayer.cpp.

The changes that may have to be looked into, is with PlayLayer.cpp, as the notable change I've made was to have the particle added to the layer instead of _particleBatchNode, as it seems to fix the issue.

The change I've made with PlayLayer.cpp is setting the scale properly for the particles. (By surrounding the ternary operator with parenthesis)

The following screenshots show the result of the fix. Theory of Everything 2 The Nightmare

Let me know if there needs to be any changes.