Tag Info

Hot answers tagged

2

Instead of using LookAt, you can have the shader force the object to be rendered facing the camera. Thus, no script needs to be added to the tree, and the extra work the shader does is very little. Here's an example: Billboard Shader Also, since they don't actually move or rotate (as far as the CPU is concerned) and share the same material, you can turn on ...


2

When you rotate the transform object, rotate the velocity vector by the same amount.


2

Sprite Sheets with a Uniform Grid The easiest form of sprite sheets, are sheets that use a uniform grid to lay out the individual sprites of your object. Your sheet is essentially a grid with a certain number of rows and columns of cells. Each cell contains a single sprite. Using a uniform grid, means that all cells have the exact same dimensions. ...


1

Using an atlas: You can pack the left and right versions into a single texture for each sprite, and only swap UV's based on the player's direction. Although you may put only left/right images into the textures, will your modders? A few descriptors to think about: bool AutoFlip; //Swap UV's based on L/R? bool ReverseTextures; //Reverse standard ...


1

You don't want to actually resize the sprite. What you want to do is resize the texture this sprite is being rendered on. Once you get the texture you can call Texture2D.Resize(Screen.width * 0.2f, Screen.width * 0.2f) If you're not sure which texture you are using, you can call Sprite.texture to get the texture used. If you wanted to, you could even do ...


1

Please consider this first-party library; it is from MS, so if it is not-third-party enough for you, it will make your life considerably easier. It provides an interface to DX11 that is very similar to XNA. Specifically, SpriteBatch, SpriteFont, etc.. Rastertek and Reimer's are generally helpful. For Rastertek, I linked directly to their DX11 2D tutorial, ...


1

I don't think it is a good idea to mix logic and art; or more precisely, base your logic on your art. In simpler terms, don't do what you're doing. Separate logic from art. The idea behind this is that the person who draws the sprites should be able to do any kind of drawings and change them at will, without having to worry that artistic changes will have ...



Only top voted, non community-wiki answers of a minimum length are eligible