-
Notifications
You must be signed in to change notification settings - Fork 346
SpriteRenderer DrawSprites issue #96
Comments
I use quads all the time as sprites and render them in a 3d space and use 3d camera's (either with perspective or orthographic projections). It simply allows me to work in a space that seems very natural with camera's. I haven't yet seen anything about 2d camera's as such though. However, although my matrix math is not good for this stuff, I'm pretty confident you can use the camera matrices to transform your sprite locations manually (as in, perform the matrix / vector multiplications yourself). You can do some pretty crazy stuff with matrices and linear algebra. |
I'd rather not have to set the matrix on every single sprite in my game for the camera, its much more efficient to set it 1 time on the SpriteBatch. SpriteBatch is built to take in a matrix in the begin call, but unfortunately the current implementation of SpriteRenderer does not allow you to use it :( |
Hello, Sorry what do you mean exactly by 2D camera ? What do you want to do more precisely? |
Well as an example. In XNA to do a 2d camera you would do something like this https://adambruenderman.wordpress.com/2011/04/05/create-a-2d-camera-in-xna-gs-4-0/ In Paradox3d the ability exists in spritebatch to pass the same matrix in the begin call, and it works perfectly fine if I were to write all the rendering code myself. But if I want to take advantage of the APIs provided by Paradox3d and use the SpriteRenderer already supplied for me I cannot figure out a way to do something like the above example. Here is the draw sprites code from Paradox3d's SpriteRenderer
This begin call does not use the overload to supply a matrix in the fashion I've shown above. So, I'm looking for a work around, or, for a way to be provided to do this in a future release. Please let me know if its just something I've overlooked. |
Any update on this? |
beta04 unified SpriteRenderer & CameraComponent for both 2D and 3D. |
…Rename to master-renaming * commit '754cf28b103301ca0cc99ba9156533cda4b16f43': [Core] Changed url prefix for object id references. (PDX-2431)
I'm wondering if there is a way to use the built in Entity rendering but to somehow allow us to pass in a transform that is used by SpriteRenderer.DrawSprites in the Begin call to the SpriteBatch. This would be very handy for doing things like 2d cameras.
If there is already a way to do something like this, please let me know.
The text was updated successfully, but these errors were encountered: