XNA 2D Camera Engine That Follows Sprite

前端 未结 4 525
猫巷女王i
猫巷女王i 2020-12-12 11:56

What is the best way to create a parallax effect in an XNA game? I would like the camera to follow my sprite as it moves across the world, that way I can build in effects li

4条回答
  •  猫巷女王i
    2020-12-12 12:52

    I know it's an old question but i had the same one and i have found this great Monogame camera library so i thought i should share...

    https://github.com/aloisdeniel/Comora

    It is really easy to install and to follow sprite you only need to add

    this.camera.Position = position of your sprite;

提交回复
热议问题