Tails icon indicating copy to clipboard operation
Tails copied to clipboard

Change tail sizes

Open KitsuneDev opened this issue 7 years ago • 11 comments

Hey Guys, I just was thinking: Why don't we add an slider to change tail sizes?? I think it would be something really nice. I'm trying to do it myself, but I don't think I will be able to do it.

KitsuneDev avatar May 13 '17 23:05 KitsuneDev

My modifications until now:
uk.kihira.tails.client.model.tail:

    public ModelFluffyTail() {
        int tailLenght = 6;
        this.tailBase = new ModelRenderer(this);
        this.tailBase.addBox(-1, -1, 0, 2, 2, 3+tailLenght);
        this.tailBase.setRotationPoint(0, 0, 0);
        this.setRotationDegrees(this.tailBase, -15F, 0, 0);

        this.tail1 = new ModelRenderer(this, 10, 0);
        this.tail1.addBox(-1.5F, -1.5F, 0, 3, 3, 2+tailLenght);
        this.tail1.setRotationPoint(0, 0, 1.5F);
        this.setRotationDegrees(this.tail1, -15F, 0, 0);

        this.tail2 = new ModelRenderer(this, 0, 5);
        this.tail2.addBox(-2, -2, 0, 4, 4, 4+tailLenght);
        this.tail2.setRotationPoint(0, 0, 1.5F);
        this.setRotationDegrees(this.tail2, -15F, 0, 0);

        this.tail3 = new ModelRenderer(this, 0, 13);
        //20=8
        //                   ?,   ?,      side, back, down
        this.tail3.addBox(-2.5F, -2.5F, 0, 5, 5,15+tailLenght);
        this.tail3.setRotationPoint(0, 0, 3F);
        this.setRotationDegrees(this.tail3, -25F, 0, 0);

        this.tail4 = new ModelRenderer(this, 0, 26);
        this.tail4.addBox(-2, -2, 0, 4, 4, 2+tailLenght);
        this.tail4.setRotationPoint(0, 0, 7.4F);
        this.setRotationDegrees(this.tail4, 15F, 0, 0);

        this.tail5 = new ModelRenderer(this, 12, 26);
        this.tail5.addBox(-1.5F, -1.5F, 0, 3, 3, 2+tailLenght);
        this.tail5.setRotationPoint(0, 0, 1.4F);
        this.setRotationDegrees(this.tail5, 15F, 0, 0);

        this.tail4.addChild(this.tail5);
        this.tail3.addChild(this.tail4);
        this.tail2.addChild(this.tail3);
        this.tail1.addChild(this.tail2);
        this.tailBase.addChild(this.tail1);
    }

Generates some crazy tail rendering problems, but seems to be going the right way.

(EDIT: Rewording, my english back when I wrote this issue was quite messy)

KitsuneDev avatar May 26 '17 19:05 KitsuneDev

Heya, sorry for not replying to this issue earlier.

It is something I'm considering and I might be able to throw it in the next release which should be within a few days :)

kihira avatar May 26 '17 19:05 kihira

Ok, thank you very much. My code was a mess, since I Just discovered ForgeGradle and IntelliJ Idea aren't friends.

KitsuneDev avatar May 26 '17 20:05 KitsuneDev

Is there any branch or something so we can try to help you with the next release??

KitsuneDev avatar May 26 '17 20:05 KitsuneDev

Done Something which works +/-. Spacing between the parts is still too big and I don't know how to get the value from the GUI. Still trying (But wont give up :D). @kihira Do you mind if I reopen this so we can track progress? EDIT: Think I understood the spacing

KitsuneDev avatar Jun 26 '17 19:06 KitsuneDev

My progress: https://github.com/GabrielTK/Tails ATM: Trying to find out how to read from the slider.

KitsuneDev avatar Jun 26 '17 19:06 KitsuneDev

@kihira My fork is almost working, except because of the spacement problem. (HardCoded int values work as a multiplier, but on GUI, even if round, the spacement problem happens). Could you take a look at it pls?? I'll check the code and try again. INFO

KitsuneDev avatar Jun 26 '17 20:06 KitsuneDev

Apologies, I've been rather busy so only had time to focus on bug fixes recently.

Your approach to doing the scale is close but wrong. What you're doing currently is enlarging each box size however its not really taking into account offsets of parts from each other. What would be the most ideal to do a Gl.scale call after all the transformations are complete but before the boxes are rendered, that should provide the results you want.

I do still hope to work on this and I actually have a system in place for Tails 2.0 to allow scaling parts

kihira avatar Jun 27 '17 14:06 kihira

Ok, so I'm going to reset my fork and try this, even if it is not merged now, just for experience :D EDIT: Not sure if I know how to do it

KitsuneDev avatar Jun 29 '17 10:06 KitsuneDev

Sorry @kihira to disturb you again, but do you plan to create a branch for 2.0 so we can see how things are going and help you to do it??

KitsuneDev avatar Jun 29 '17 13:06 KitsuneDev

There isn't a specific branch but you can see the two latest feature branches have stuff related to it

kihira avatar Jun 29 '17 13:06 kihira