Fully working afterimages and tail!
This was a fun technical challenge. Previously, my after image script worked by just saving the current sprite of the player, and putting that onto another object... but since I split the character sprite up in multiple parts (fore-sprite, back leg, and tail) this method no longer worked properly.. or rather, produced these results:
The solution was.. *takes a deep breath*
Dedicated render texture camera on the player 256x256
RenderTexture plugged into a shader to isolate everything on the 'Player' layer
shader outputs to a material
material is then mapped to a Texture2D
Texture2D is used in Sprite.Create to create a new sprite
which is then thrown to the after image object to be used as its Sprite!
phew.
Took a few more steps than I anticipated, but the result is exactly what I wanted!
I have a few more things to clean up, but afterwards I may put out a new build so you can try out the new sprite!
Many animations are still using the old sprite (all attacks, and taking damage)
but its getting there!
Get Project Kobold's Tale
Project Kobold's Tale
A kobold based metroidvania
Status | In development |
Author | NonEuclideanOtter |
Genre | Platformer, Action |
Tags | 2D, Dragons, kobolds, Magic, melee, Metroidvania, Pixel Art, Prototype, work-in-progress |
More posts
- small visual update!Feb 16, 2024
- Autosaves, Havens and CheckpointsOct 14, 2023
- 7/12/23 update Time DilationJul 12, 2023
- 7/9/23 updateJul 09, 2023
- dev update : scrapping my weapon workflowApr 11, 2023
- Shiny Rocks updateMar 16, 2023
- Rapid fire updatesMar 12, 2023
- Boss update and gamepad controls fixedFeb 27, 2023
- Magic, mana, melee, and tutorials!Feb 25, 2023
- Of poise and magic!Feb 21, 2023
Leave a comment
Log in with itch.io to leave a comment.