I was following the first tutorial called “Side scroller tutorial”. I ran into an issue, the bonus_stars objects are invisible - They are correctly spawning and I am collecting them but they are not visible.
I checked that I added a sprite to bonus_star.go, set the image to stars.atlas and set the animation to bonus_star. No luck.
I added the particle effects from star.go and they show up correctly.
@ryanscottlandry
Sprite Z Position is set to 0. I’m guessing GO means .go file - which I don’t know how to check the Z position of. The properties section of bonus_star.go doesn’t have a position.
I found main.collection it references factory.go. It’s z value is .5 (Changing to 0 changes nothing).
It contains both bonus_factory and star_factory.
Since this factory contains both star and bonus_star.go, and star.go is visible, I don’t believe this should be an issue.
Check the z-value of the bonus star sprite and make sure that final z-value it doesn’t fall outside of the visible range (or possible behind the background graphics). Read more here:
It’s not that the star is invisible, it’s just off the screen. If you look at those numbers, the X position is not changing, it’s the Y position that is slowly going down. To be honest I have no idea…Ah! Nevermind I found it. The collisionobject on the bonus star is still set to Dynamic, so it’s physically simulated and set_position doesn’t work on it, it just slowly falls because of gravity. Just set that to Kinematic and it’s all good.