2D Toolkit Forum

2D Toolkit => Support => Topic started by: Roamer on March 11, 2014, 09:04:55 pm

Title: Question concerning attach points
Post by: Roamer on March 11, 2014, 09:04:55 pm
Example:

I have a characters body, and his arm is attached to it, which rotates according to the mouse position.
If each frame of the walk animation has the attachpoint, and you move, the attachpoint's rotation "overrides" the current rotation of the transform, causing it to "flicker" between 2 positions, which doesn't look very nice.

TLDR: Any way to set attachpoints up so no rotation is associated with it?

Thanks in advance for any help!
Title: Re: Question concerning attach points
Post by: unikronsoftware on March 12, 2014, 11:35:34 am
You will need to customise the code for that. You can simply change the tk2dSpriteAttachPoint (comment out line 58, t.localEulerAngles) or duplicate the class and modify the copy.
Title: Re: Question concerning attach points
Post by: Roamer on March 12, 2014, 05:52:33 pm
Alrighty, thanks for the quick answer! As always excellent support from unikron! <3