" To be clear are you saying there is a way to do it as described via Mecanim and it's still a better option than a code-based solution (in C#)?" However, there is an option called "has exit time" if this is ticked, then the animation clip plays until its exit moment, before transitioning to next state. If you have a link, I'm interested reading about this, but I haven't heard about such issue. "from my week of research I hit upon posts where people were saying that there's a known issue with getting the animations to cut off without playing the whole sequence" But you don't even need blend trees, if you just try to use animator first, you'll see that you have several options to create this. "for my sprite to involve things like blend trees" Overkill, when you only require 3-5 states? And 2-3 animation clips? I'm unashamedly influenced by one of my favourite vertical scrolling shootemups of all time, Raiden, which you can check out have checked out how the animator works, and it seemed like overkill" Reference for type of behaviour I'm looking for: If anyone can help me find a solution to this I would be extremely grateful! I can make basic frame-by-frame animation sequences in Unity but the in-build animation system I would prefer to avoid if possible. I'm already OK with importing the sprite sheet, slicing it up, and with putting basic movement controls in via C# script and a 2D rigid body to the sprite. It has the ship in its 7 positions and also has thruster (idling and flaring) and shot sprites (basic and powered-up). I do not want the game to have analogue controls, I want it to be kinematic.Īn example of the sprite sheet I made is attached. I don't want to set up the left sequence and mirror it for the right because then the highlights and shadows on the sprite graphics will flip sides very unnaturally, that's why I made 7 states alrogether). Also no sprite mirroring can be used (i.e.be able to start reversing at whatever frame it's currently on because it will look weird if the player just momentarily taps a direction key and the whole animation plays through. The animation has to be able to be interrupted, i.e.The animation needs to pingpong back to the default position once the player stops pulling left or right (the ship levels out again when not being steered left or right - it doesn't just jolt right back to default as that would look weird).the player is holding the left or right arrow key) the 3-frame animation for tilting the ship to that side occurs, and it holds the last frame until the player lets go of that direction input - this will create the illusion that the ship is banking to that side. I've already drawn the graphics (7 states of tilt including a default non-tilted state - that's 3 frames per side) but no method of animation I've come across allows for this simple sprite-swapping (that I imagine) to occur when the directions are input. What I'm trying to do is animate a 2D spaceship, so when you pull to the side it appears to tilt (like a flying object not like a mouse pointer that always stays the same). I can only find instructions for platform games which don't apply to this and one forum thread that refers to buying a third party plugin to do it - surely that's excessive, and this is actually something that can be done in Unity or with C#, right? And this is after a week of scouring the internet and Unity forums for clues. sorting out the player ship's animations has me stumped. So I decided to make a vertical scrolling shootemup. I'm new to Unity and thought it might be a good idea to start a simple project so I can learn my way around the editor and get started on some basic C# scripting skills.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |