Forum rules - please read before posting.

[Weak Request] Diagonal Sprites ONLY

In my previous 2d AC games I've used character sprites rendered in just 4 "flat" directions, U D L & R (mainly because I was too lazy to create them in the full eight directions)

However, as mentioned elsewhere, I'm currently working on a 2d forced perspective game. I'm using the same cast of characters as before, and although their movement in the game world using just UDLR looks a little odd, it's not a deal breaker

But, while working on the idea of dynamic outfits (also mentioned elsewhere) I decided to run a test using a new character rendered in the four directions corresponding to UR, DR, DL & UL. Theoretically that should look better in the forced perspective game world

But, there's currently no option in AC for using ONLY Diagonal Sprites. Soooo, I tried setting up animations that effectively mapped U to UR, R to DR, D to DL and L to UL

If I have Multiple Directions selected and Diagonal Sprites unselected, that only works some of the time, the other times the character moves in one direction while facing in a different direction

If I have Multiple Directions selected and Diagonal Sprites selected, it seems to work all of the time, but unsurprisingly floods the console with warnings about missing animations (because I'm still only using four directional animations)

Soooo, what I'd really like is the ability to select Diagonal Sprites ONLY

No biggee if you don't feel there would be enough call for the feature to make it worthwhile implementing, I'll just go back to rendering all my characters in just the UDL&R directions

Comments

  • For anything other than the bog-standard 2D character animation provided by the base Sprites Unity settings, you should rely on Sprites Unity Complex for your character's "Animation engine".

    This causes your animations to play according to Animator parameter values, which you can make use of however you like to control which animations get played. This is also more in-line with "Unity best practices".

    Defining a "Body angle float" parameter, for example, will set itself from 0-359 at runtime according to the direction the character is facing (starting downward-facing and increasing as the character rotates clockwise). You could then use e.g. a Blend Tree to change the character's facing direction when this value changes from e.g. 45->46.

    For more, see the Manual's "Character animation (Sprites Unity Complex)" chapter, as well as the example character provided in the 2D Demo's Resources folder.

  • for this particular use case sprites unity suits me better. it's simple, straightfoward and intuitive, even if it may not be "best practice"

    in this game the characters only need to go in four cardinal directions, old school style, but instead of travelling N,S,E & W they simply need to travel NW, NE, SE & SW instead

    but, like i said, no biggee if you don't feel it would be a feature worth implementing. it's unlikely that anybody else would ever want to do this, and to be honest i rather think that doing the same exercise in real 3d, rather than in 2d pretending to be 3d, would have been SO much easier...

  • Understood. If this is a one-off project, then you could always just hack the code to only output diagonals (it's fairly simple, but you'd have to re-apply the change with each AC update).

    The directional suffix string (e.g. "_DL") is calculated in the Char script's CalcSpriteDirection function.

  • edited December 2018

    thanks for the suggestion chris

    i think the minor inconvenience of having to remember to reapply the change whenever i update the project to a new version of AC will be more than offset by its usefulness to me in this instance

    as you say, it's a fairly simple hack, which i've already got working, and the big advantage for me is that it means i can mix existing characters, who are set up to only move UDL&R, with newer characters who will be only animated along the diagonals

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.