Hello Guest

Author Topic: FEATURE REQUEST - Multiple custom anchor points  (Read 6283 times)

Disastercake

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Disastercake
FEATURE REQUEST - Multiple custom anchor points
« on: May 14, 2012, 12:58:56 am »
I'm not sure if this is the right place to put this, but here it goes! =D

I think it would be very awesome to have multiple anchor points function.

  • There can be a section that asks how many anchor points you want to have.
  • The anchor points can (or have to) be named.
  • If an anchor point is named the same thing through different images, then it persists throughout them (but position can be changed).
  • The API should allow you to pull the V3 position (though only giving a local v3 X, Y position) for use in scripting.  Maybe the world position would also be good for easier scripting to attach things to these points?
  • The vector points can be physically placed by clicking, or the number can be typed in.

This feature would bring a lot of power to 2D Toolkit.  It would make things like attachable armor, weapons, special effects ,etc much easier to handle.

However if there's already a way to do this I'd really like to know! =D
Working on Soul Saga, an upcoming anime adventure RPG game by Disastercake.
www.disastercake.com

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: FEATURE REQUEST - Multiple custom anchor points
« Reply #1 on: May 14, 2012, 09:07:33 am »
There isn't a way to do this right now (except doing it yourself using prefabs). We would like to add something like this for a future release, so thanks for your suggestion.

Adding something like this is really simple, the problem is supporting all the different cases. Eg. what happens when the sprite is swapped and the 2nd part doesn't have the same anchor point? What happens to the children which are attached to these anchor points? Also how to handle dynamically adding and removing these is an issue when an animation is playing.

There will be an update with something like this in the future, just don't know when yet!

Juice

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: FEATURE REQUEST - Multiple custom anchor points
« Reply #2 on: June 16, 2012, 06:05:55 pm »
I'm actually requiring this right now, as I"m making a 2D shooter, where the head and arm rotates towards your mouse. I need multiple anchor points to properly attach the head and arm onto the animating sprite.

I can't imagine how this would be done using prefabs, as the anchor points are contained within the editor. I'll be happy to make all the modifications myself, if I could be pointed in the right direction.

Could you please give me some tips on how I could setup an additional 2 points unikron? :)
(I can't seem to find where to edit in the code, spent way too much time on this)
« Last Edit: June 16, 2012, 06:09:32 pm by Juice »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: FEATURE REQUEST - Multiple custom anchor points
« Reply #3 on: June 18, 2012, 04:44:37 pm »
I think we should move this one to email until we get something resolved. Drop me an email and we'll discuss this further. support at unikronsoftware dot com.