Hello Guest

Author Topic: Rotation Posing from an Isometric View  (Read 6851 times)

AdamWaters

  • Newbie
  • *
  • Posts: 4
    • View Profile
Rotation Posing from an Isometric View
« on: April 20, 2012, 04:29:04 pm »
I am trying to figure out if this tool would be good for a game with an isometric view, were the sprites would have to appear to rotate.  They would need to save their frame index when changing to other animations.

I'm not sure of the exact term for this, and I can't find any documentation or examples for using 2D toolkit in this way.

Does anyone have experience or guidance they can offer?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Rotation Posing from an Isometric View
« Reply #1 on: April 20, 2012, 05:32:14 pm »
Hi,

Currently one of the functions is private, so you'll need to modify the source slightly. The changes needed in tk2dAnimatedSprite.cs -

   public float ClipTimeSeconds
   {
      get { return clipTime / currentClip.fps; }   
   }

Just add it somewhere in the file and you'll be good to go.


Once you do that, when switching animation, all you'll need to do is
animatedSprite.Play("animationSW", animatedSprite.ClipTimeSeconds);

This will start the other animation at the current offset into the animation. Assuming both of them have the same FPS it means it'll end up on the same frame.

Hope that helps.

That change above will be in the next 2D toolkit release.

AdamWaters

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Rotation Posing from an Isometric View
« Reply #2 on: June 27, 2012, 03:56:00 pm »
As our isometric sprites have grown I'm running into some new problems.

We are hitting the maximum size for a Sprite Collection and I can't find any documents describing ways to get around this.

Can a single animated sprite use multiple collections?
Is there a way to build multiple atlases out of one collection? 

Any guidance is appreciated

-Adam

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Rotation Posing from an Isometric View
« Reply #3 on: June 27, 2012, 04:45:17 pm »
Hi,

You can increase the max atlas size (keep in mind the platform you're working on and know the limits). This setting is in the "Settings" overlay in the sprite collection editor.

A single animated sprite can source frames from any number of sprite collections. There isn't any enforced limit on this.

You can also get the sprite collection to generate multiple atlases, though we generally discourage this unless you're using it for animations - thats usually fine.


AdamWaters

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Rotation Posing from an Isometric View
« Reply #4 on: July 03, 2012, 01:22:26 am »
A single animated sprite can source frames from any number of sprite collections. There isn't any enforced limit on this.
I can't find any documentation on how to do this.

The Collection field on the animated sprite only seems to allow one collection to be selected.  So how would I make this an array or add another?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Rotation Posing from an Isometric View
« Reply #5 on: July 03, 2012, 01:37:39 am »
You can select a different collection for every frame. The collection field is always visible.