Not logged inOpenClonk Forum
Up Topic How to disable the rotation animation?

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Clonkonaut
It very much depends on how you want to go about creating that 2D character. You might need to modify the turning code or replace with other logic.

However, familiarising yourself with the code a bit is at some point a must when creating something as complex as a whole character.

The code handling the turning of the clonk are the first few functions in Objects.ocd\Clonk.ocd\Animations.ocd and are controlled by the "IntTurn" effect the clonk applies in Construction (Objects.ocd\Clonk.ocd\Script.c).
So you could either have Construction overload in your character and not apply the effect or remove the effect again. This will, however, only fix the issue of visually turning. If you want to instantly change direction (speed) as well, you will have to modify the Walk action and use appropiate values for Accel and Decel (see ActMap).

But, with your character, unless the 2D graphics is symmetrical, you'll have to think on how to turn it. If it is symmetrical, you can ignore the rest!

If you really must have a 3D mesh showing a 2D thing, you'd be better off modifying that turning effect to instantly apply a mesh transformation.

But, creating a 2D thing is also possible with using a spritesheet and sprite animation. If you look at objects like rocks, firestone or other small items, you can see that those use .png files, so static spritesheets. Sprite animation is handled through the ActMap (see above for documentation link) and the interesting things would be Directions=2 and FlipDir=1 because then the character will automatically flip when running in a different direction.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill