Click here to Skip to main content
15,891,787 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I guess that the title make no sense, but I had some problems. I used Matrix and a vector2 for making a camera and then I replaced spritebatch.Begin() with spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, camera.transform); And then the player just desepeared!

What I have tried:

I tried to make a new spritebatch.Begin() under the other and wrote the Player sprite there. But then the Player was to fast and ran out of the screen.
Posted
Updated 26-Mar-16 6:08am
v2
Comments
Patrice T 27-Mar-16 2:08am    
Can't do something to prevent player from running out of screen ?
Member 12417426 27-Mar-16 5:59am    
Well, the point is that the camera is going to follow the player in equal speed! I have done it before, but I didnt have a sprite sheet animation back then!
Member 12417426 27-Mar-16 7:13am    
I can make the player not able to run of the screen, but the camera movement is too slow!
Member 12417426 25-Apr-16 15:00pm    
Well, it looks like I have solved the problem! By scaling the images did I see that I had used the image width, not the rectangle width. Thanks for every1 that has commented and Good Bye!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900