Not logged inOpenClonk Forum
Up Topic General / Feedback and Ideas / Anim_XY()
- - By Apfelclonk [de] Date 2013-12-04 20:01 Edited 2013-12-04 20:56
I thought it would be pretty usefull in some cases to have AVP which works like Anim_X/Anim_Y but counts them both together (for sure with pythagoras). Beside my personal use Zapper mentioned: "Imagine the fishes who can look into an arbitrary direction and swim there."
Is there some time do implement it? I think someone who knows how the others work could implement it with ease.

EDIT: Anim_RDir would be awesome too =3
Reply
Parent - - By Clonk-Karl [ch] Date 2013-12-04 22:08
It should be very easy to implement. Anim_RDir() exists already, by the way.
Reply
Parent - - By Apfelclonk [de] Date 2013-12-04 22:53 Edited 2013-12-04 22:57
What I've done is an animation which has at frame = 0 the extreme I want to reach by maximum negative rotation dir. The same thing with maximum positive rotation dir and the end of my animation. Is that possibly with that? Because Ecplise says something about iBegin, iEnd, iMax. I miss is the iValue param according to Anim_Linear().

PS: Could you mention here when the Anim_XY is implemented in the DevSnapshot? I would be really appreciated.
Reply
Parent - - By Clonk-Karl [de] Date 2013-12-06 22:02
Hm, okay, that is probably not possible with the current version of Anim_RDir, it would go from 0 to max_rdir, instead of -max_rdir to +max_rdir. I think this could be changed, and the current behaviour be renamed to Anim_AbsRDir. Your call would then be Anim_RDir(0, GetAnimationLength("bla"), max_rdir);.
Reply
Parent - - By Newton [th] Date 2013-12-07 06:58
What would be the use cases for Anim_AbsRDir and Anim_RDir?
Parent - - By Sven2 [de] Date 2013-12-07 12:59
Anim_RDir would be for any object that bends towards its rotation direction (like Aofelclonk's example: Fishes that look where they swim).

Anim_AbsRDir seems more difficult. Maybe an object could have a generic rotation animation (E.g., a bird may fold its wings whenever it turns). Or rotating objects like the wind generator wings could look different when they rotate fast in either direction.
Parent - - By Clonk-Karl [de] Date 2013-12-08 13:20 Edited 2013-12-08 13:24

> Anim_RDir would be for any object that bends towards its rotation direction (like Aofelclonk's example: Fishes that look where they swim).


But wouldn't that be Anim_R instead of Anim_RDir? Anim_R is for the object's current rotation angle ("r" in Clonk parlance), Anim_RDir is for the angular velocity ("rdir" in Clonk). To make an example, Anim_RDir could be used for the pointer of a speed-o-meter kind of device, where the pointer would go negative for rotating counterclockwise, whereas Anim_AbsRDir would always go in positive direction, no matter whether rotating clockwise or counter-clockwise (this is like the tachometer in a car, where the pointer goes in the same direction no matter whether you drive forwards or backwards).

By the way, Anim_RDir is still undocumented because I was still waiting for use cases and so I have an excuse when changing its behaviour later (which might be a good idea now given Apfelclonk's use case...)
Reply
Parent - By Sven2 [de] Date 2013-12-08 14:24

> > Anim_RDir would be for any object that bends towards its rotation direction (like Aofelclonk's example: Fishes that look where they swim).
> But wouldn't that be Anim_R instead of Anim_RDir? Anim_R is for the object's current rotation angle ("r" in Clonk parlance), Anim_RDir is for the angular velocity ("rdir" in Clonk)


No, by "bends towards its rotation direction" I mean RDir: If a fish swims a very sharp circle, it would bend its head to the side more than it would when it swims a wide circle. Regular rotation would be solved using SetR() in this case.
Parent - By Apfelclonk Date 2014-04-17 14:37
Is there still some interest in fixing this? Since its called to be easily implemented maybe someone could do me and hopefully further generations the pleasure.
Reply
Up Topic General / Feedback and Ideas / Anim_XY()

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill