Two Rotation Traits

I am trying to use two rotation traits in my module, one for arbitrary rotations and another one for 22.5° steps, but when I use them both during a game and then hit the move fixed distance button, the unit moves sideways instead of forward. Is there a way to fix this or can you have just one rotation trait in a game?

The Move Fixed Distance trait only changes its direction based on the angle of the first Rotate trait above it. So it won’t work if there’s more than one. I’ll check if this is an easy fix for the upcoming version.

rk

Post generated using Mail2Forum (mail2forum.com)

sorry for being late here, I had a similar trace into this with my custom rotation code. I traced my problem down to counters/translate.moveTarget. It does a lookup to the next piece (Decorator.getDecorator()), so I changed the order of my counters instead of the code at this point, where I thought about changing the code from Decorator.getDecorator(this,… into Decorator.getDecorator(Decorator.getOutermost(this), … would it do this, or brake some behavior? or am I totally wrong?

If you have two rotation traits on the same piece, you can change the angle for each trait separately and the piece will be drawn correctly. However, other traits will be confused as to what is the “actual” angle of the piece, because they’ll read the angle of one trait or the other. You would have to change the code to search all traits and add the angles together.

rk

Post generated using Mail2Forum (mail2forum.com)