• Hello tout le monde , voilà ca fait deux heures que je bosse sur Techne pour faire mon premier dinosaure , je me dit chouette ! Puis je me dit mince faut que j'annime ses déplacements j'ai donc suivi le tuto ici le problème est que je pense que le mouvement des pattes sont bonne c'est mon dinosaures qui fait des bétîses car quand par exemple il veut se déplacer à droite , il ne se retourne pas vers la droite mais il reste vers moi et ses pates elle vont vers la gauche , donc les pattes sont bonne , comment faire pour que quand mon mob va a droite il se tourne vers la droite ? Egalements pour toutes les autres direction ! Merci 🙂

    package mod.common;
    
    import net.minecraft.client.model.ModelBase;
    import net.minecraft.client.model.ModelRenderer;
    import net.minecraft.entity.Entity;
    import net.minecraft.util.MathHelper;
    
    public class ModelBrachiosaurus extends ModelBase
    {
    //fields
    ModelRenderer Shape1;
    ModelRenderer Shape2;
    ModelRenderer Shape3;
    ModelRenderer Shape4;
    ModelRenderer Shape5;
    ModelRenderer Shape6;
    ModelRenderer Shape7;
    ModelRenderer Shape8;
    ModelRenderer Shape9;
    ModelRenderer Shape10;
    ModelRenderer Shape11;
    ModelRenderer Shape12;
    ModelRenderer Shape13;
    ModelRenderer Shape14;
    ModelRenderer Shape15;
    ModelRenderer Shape16;
    ModelRenderer Shape17;
    ModelRenderer Shape18;
    ModelRenderer Shape19;
    ModelRenderer Shape20;
    ModelRenderer Shape21;
    ModelRenderer Shape22;
    ModelRenderer Shape23;
    
    public ModelBrachiosaurus()
    {
    textureWidth = 256;
    textureHeight = 128;
    
    Shape1 = new ModelRenderer(this, 0, 0);
    Shape1.addBox(0F, 0F, 0F, 10, 24, 10);
    Shape1.setRotationPoint(-8F, 0F, -15F);
    Shape1.setTextureSize(64, 32);
    Shape1.mirror = true;
    setRotation(Shape1, 0F, 0F, 0F);
    Shape2 = new ModelRenderer(this, 0, 0);
    Shape2.addBox(0F, 0F, 0F, 10, 9, 10);
    Shape2.setRotationPoint(-5.4F, -8.6F, -15F);
    Shape2.setTextureSize(64, 32);
    Shape2.mirror = true;
    setRotation(Shape2, 0F, 0F, 0.2974289F);
    Shape3 = new ModelRenderer(this, 0, 0);
    Shape3.addBox(0F, 0F, 0F, 10, 24, 10);
    Shape3.setRotationPoint(-8F, 0F, 13F);
    Shape3.setTextureSize(64, 32);
    Shape3.mirror = true;
    setRotation(Shape3, 0F, 0F, 0F);
    Shape4 = new ModelRenderer(this, 0, 0);
    Shape4.addBox(0F, 0F, 0F, 10, 9, 10);
    Shape4.setRotationPoint(-5.4F, -8.6F, 13F);
    Shape4.setTextureSize(64, 32);
    Shape4.mirror = true;
    setRotation(Shape4, 0F, 0F, 0.2974289F);
    Shape5 = new ModelRenderer(this, 0, 0);
    Shape5.addBox(0F, -1F, 0F, 10, 24, 10);
    Shape5.setRotationPoint(30F, 1F, -15F);
    Shape5.setTextureSize(64, 32);
    Shape5.mirror = true;
    setRotation(Shape5, 0F, 0F, 0F);
    Shape6 = new ModelRenderer(this, 0, 0);
    Shape6.addBox(0F, 0F, 0F, 10, 9, 10);
    Shape6.setRotationPoint(32.6F, -8.6F, -15F);
    Shape6.setTextureSize(64, 32);
    Shape6.mirror = true;
    setRotation(Shape6, 0F, 0F, 0.2974289F);
    Shape7 = new ModelRenderer(this, 0, 0);
    Shape7.addBox(0F, 0F, 0F, 10, 24, 10);
    Shape7.setRotationPoint(30F, 0F, 13F);
    Shape7.setTextureSize(64, 32);
    Shape7.mirror = true;
    setRotation(Shape7, 0F, 0F, 0F);
    Shape8 = new ModelRenderer(this, 0, 0);
    Shape8.addBox(0F, 0F, -1F, 10, 9, 10);
    Shape8.setRotationPoint(32.6F, -8.6F, 14F);
    Shape8.setTextureSize(64, 32);
    Shape8.mirror = true;
    setRotation(Shape8, 0F, 0F, 0.2974289F);
    Shape9 = new ModelRenderer(this, 0, 0);
    Shape9.addBox(0F, 0F, 0F, 52, 23, 32);
    Shape9.setRotationPoint(-8F, -25F, -12F);
    Shape9.setTextureSize(64, 32);
    Shape9.mirror = true;
    setRotation(Shape9, 0F, 0F, 0.0743572F);
    Shape10 = new ModelRenderer(this, 0, 0);
    Shape10.addBox(0F, 0F, 0F, 20, 43, 19);
    Shape10.setRotationPoint(-23F, -43.2F, -6F);
    Shape10.setTextureSize(64, 32);
    Shape10.mirror = true;
    setRotation(Shape10, 0F, 0F, -0.3346075F);
    Shape11 = new ModelRenderer(this, 0, 0);
    Shape11.addBox(0F, 0F, 0F, 15, 27, 15);
    Shape11.setRotationPoint(-26F, -70F, -4F);
    Shape11.setTextureSize(64, 32);
    Shape11.mirror = true;
    setRotation(Shape11, 0F, 0F, -0.2230717F);
    Shape12 = new ModelRenderer(this, 0, 0);
    Shape12.addBox(0F, 0F, 0F, 10, 20, 10);
    Shape12.setRotationPoint(-28F, -88F, -2F);
    Shape12.setTextureSize(64, 32);
    Shape12.mirror = true;
    setRotation(Shape12, 0F, 0F, -0.2602503F);
    Shape13 = new ModelRenderer(this, 0, 0);
    Shape13.addBox(0F, 0F, 0F, 6, 6, 6);
    Shape13.setRotationPoint(-27.7F, -93F, 0F);
    Shape13.setTextureSize(256, 128);
    Shape13.mirror = true;
    setRotation(Shape13, 0F, 0F, -0.4089647F);
    Shape14 = new ModelRenderer(this, 0, 0);
    Shape14.addBox(0F, 0F, 0F, 6, 6, 6);
    Shape14.setRotationPoint(-30.3F, -97.5F, 0F);
    Shape14.setTextureSize(256, 128);
    Shape14.mirror = true;
    setRotation(Shape14, 0F, 0F, -0.5205006F);
    Shape15 = new ModelRenderer(this, 0, 0);
    Shape15.addBox(0F, 0F, 0F, 6, 6, 6);
    Shape15.setRotationPoint(-33.5F, -100.8F, 0F);
    Shape15.setTextureSize(256, 128);
    Shape15.mirror = true;
    setRotation(Shape15, 0F, 0F, -0.7435722F);
    Shape16 = new ModelRenderer(this, 0, 0);
    Shape16.addBox(0F, 0F, 0F, 6, 6, 6);
    Shape16.setRotationPoint(-35.8F, -99.7F, 0F);
    Shape16.setTextureSize(256, 128);
    Shape16.mirror = true;
    setRotation(Shape16, 0F, 0F, -1.449966F);
    Shape17 = new ModelRenderer(this, 0, 0);
    Shape17.addBox(0F, 0F, 0F, 11, 8, 8);
    Shape17.setRotationPoint(-45F, -107F, -1F);
    Shape17.setTextureSize(256, 128);
    Shape17.mirror = true;
    setRotation(Shape17, 0F, 0F, 0F);
    Shape18 = new ModelRenderer(this, 0, 0);
    Shape18.addBox(0F, 0F, 0F, 9, 5, 4);
    Shape18.setRotationPoint(-44F, -109F, 1F);
    Shape18.setTextureSize(256, 128);
    Shape18.mirror = true;
    setRotation(Shape18, 0F, 0F, 0F);
    Shape19 = new ModelRenderer(this, 0, 0);
    Shape19.addBox(0F, 0F, 0F, 9, 5, 5);
    Shape19.setRotationPoint(-50F, -101F, 0.5F);
    Shape19.setTextureSize(256, 128);
    Shape19.mirror = true;
    setRotation(Shape19, 0F, 0F, -0.2974289F);
    Shape20 = new ModelRenderer(this, 0, 0);
    Shape20.addBox(0F, 0F, 0F, 24, 12, 22);
    Shape20.setRotationPoint(34F, -19F, -7F);
    Shape20.setTextureSize(256, 128);
    Shape20.mirror = true;
    setRotation(Shape20, 0F, 0F, 0.3346075F);
    Shape21 = new ModelRenderer(this, 0, 0);
    Shape21.addBox(0F, 0F, 0F, 21, 10, 17);
    Shape21.setRotationPoint(49F, -13F, -5F);
    Shape21.setTextureSize(256, 128);
    Shape21.mirror = true;
    setRotation(Shape21, 0F, 0F, 0.4833219F);
    Shape22 = new ModelRenderer(this, 0, 0);
    Shape22.addBox(0F, 0F, 0F, 12, 8, 14);
    Shape22.setRotationPoint(64.7F, -2.3F, -3.5F);
    Shape22.setTextureSize(256, 128);
    Shape22.mirror = true;
    setRotation(Shape22, 0F, 0F, 0.2185276F);
    Shape23 = new ModelRenderer(this, 0, 0);
    Shape23.addBox(0F, 0F, 0F, 11, 5, 9);
    Shape23.setRotationPoint(72.93333F, 2F, -1F);
    Shape23.setTextureSize(256, 128);
    Shape23.mirror = true;
    setRotation(Shape23, 0F, 0F, 0F);
    }
    
    public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
    {
    super.render(entity, f, f1, f2, f3, f4, f5);
    setRotationAngles(f, f1, f2, f3, f4, f5, entity);
    Shape1.render(f5);
    Shape2.render(f5);
    Shape3.render(f5);
    Shape4.render(f5);
    Shape5.render(f5);
    Shape6.render(f5);
    Shape7.render(f5);
    Shape8.render(f5);
    Shape9.render(f5);
    Shape10.render(f5);
    Shape11.render(f5);
    Shape12.render(f5);
    Shape13.render(f5);
    Shape14.render(f5);
    Shape15.render(f5);
    Shape16.render(f5);
    Shape17.render(f5);
    Shape18.render(f5);
    Shape19.render(f5);
    Shape20.render(f5);
    Shape21.render(f5);
    Shape22.render(f5);
    Shape23.render(f5);
    }
    
    private void setRotation(ModelRenderer model, float x, float y, float z)
    {
    model.rotateAngleX = x;
    model.rotateAngleY = y;
    model.rotateAngleZ = z;
    }
    
    public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
    {
    super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
    this.Shape1.rotateAngleX = MathHelper.cos((180F / (float)Math.PI)) * 3.8F * f1;
    this.Shape3.rotateAngleX = MathHelper.cos((180F / (float)Math.PI)) * 3.8F * f1;
    this.Shape5.rotateAngleX = MathHelper.cos((180F / (float)Math.PI)) * 3.8F * f1;
    this.Shape7.rotateAngleX = MathHelper.cos((180F / (float)Math.PI)) * 3.8F * f1;
    }
    
    }
    
  • Modérateurs

    Pour les codes JAVA, tu as la balise [java][/java] sans les *.
    Pour ton problème d'animation, essaye :

    this.Shape1.rotateAngleX = MathHelper.cos((f) * 0.63330555F + 1) * 1.0F * f1;
    this.Shape3.rotateAngleX = MathHelper.cos((f) * 0.63330555F + (float)Math.PI) * 1.0F * f1;
    this.Shape5.rotateAngleX = MathHelper.cos((f) * 0.63330555F + (float)Math.PI + 2) * 1.0F * f1;
    this.Shape7.rotateAngleX = MathHelper.cos((f) * 0.63330555F + 1) * 1.0F * f1;
    

    Et vire le super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
    Sur techne, la petite boule bleu/rouge est bien positionné?


  • Je n'ai pas vu de boule bleu/rouge ou est-elle ? Et sa ne fonctionne pas voici ce que sa donne , même si le mouvement des jambes est géniales !!

    Youtube Video

  • Modérateurs

    La vidéo est privée.


  • Oh désolé voila ! 🙂

  • Modérateurs

    Le problème est que je ne sais pas à quoi correspond Shape1, Shape3, Shape5 et Shape7. Il faudrait les renommer pour que je puisse t'aider.


  • Alors Shape 1 = Patte avant à gauche
    Shape 3 = Patte avant à droite
    Shape 5 = Patte arrière à gauche
    Shape 7 = Patte arrière à droite

    Quand tu regarde l'image que j'ai mis dans DinoCraft [En développement]

  • Modérateurs

    C'est bizarre, j'ai utilisé le code que je t'ai passé plus haut pour mon propre Brachiosaure et l'animation est correct.


  • Veux tu mon code complet ?


  • Voici mes codes

    EntityBrachiosaurus

    package mod.common;
    
    import net.minecraft.entity.SharedMonsterAttributes;
    import net.minecraft.entity.monster.EntityMob;
    import net.minecraft.world.World;
    
    public class EntityBrachiosaurus extends EntityMob
    {
    public EntityBrachiosaurus(World world)
    {
    super(world);
    }
    public void applyEntityAttributes()
    {
    super.applyEntityAttributes();
    this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(120D);
    this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(20D);
    this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(100D);;
    this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D);;
    this.setSize(15/5 ,8);
    }
    
    }
    
    

    RenderBrachiosaurus

    package mod.common;
    
    import net.minecraft.client.model.ModelBase;
    import net.minecraft.client.renderer.entity.RenderLiving;
    import net.minecraft.entity.Entity;
    import net.minecraft.util.ResourceLocation;
    
    public class RenderBrachiosaurus extends RenderLiving
    {
    public RenderBrachiosaurus(ModelBase par1ModelBase, float par2) {
    super(par1ModelBase, par2);
    }
    
    @Override
    protected ResourceLocation getEntityTexture(Entity var1) {
    return new ResourceLocation(ModMinecraft.MODID, "textures/entity/brachiosaurus.png");
    }
    }
    

    Le ModelBrachiosaurus

    package mod.common;
    
    import net.minecraft.client.model.ModelBase;
    import net.minecraft.client.model.ModelRenderer;
    import net.minecraft.entity.Entity;
    import net.minecraft.util.MathHelper;
    
    public class ModelBrachiosaurus extends ModelBase
    {
    //fields
    ModelRenderer Shape1;
    ModelRenderer Shape2;
    ModelRenderer Shape3;
    ModelRenderer Shape4;
    ModelRenderer Shape5;
    ModelRenderer Shape6;
    ModelRenderer Shape7;
    ModelRenderer Shape8;
    ModelRenderer Shape9;
    ModelRenderer Shape10;
    ModelRenderer Shape11;
    ModelRenderer Shape12;
    ModelRenderer Shape13;
    ModelRenderer Shape14;
    ModelRenderer Shape15;
    ModelRenderer Shape16;
    ModelRenderer Shape17;
    ModelRenderer Shape18;
    ModelRenderer Shape19;
    ModelRenderer Shape20;
    ModelRenderer Shape21;
    ModelRenderer Shape22;
    ModelRenderer Shape23;
    
    public ModelBrachiosaurus()
    {
    textureWidth = 512;
    textureHeight = 256;
    
    Shape1 = new ModelRenderer(this, 216, 0);
    Shape1.addBox(-5F, 0F, -5F, 10, 24, 10);
    Shape1.setRotationPoint(-3F, 0F, -10F);
    Shape1.setTextureSize(64, 32);
    Shape1.mirror = true;
    setRotation(Shape1, 0F, 0F, 0F);
    Shape2 = new ModelRenderer(this, 216, 34);
    Shape2.addBox(0F, 0F, 0F, 10, 9, 10);
    Shape2.setRotationPoint(-5.4F, -8.6F, -15F);
    Shape2.setTextureSize(64, 32);
    Shape2.mirror = true;
    setRotation(Shape2, 0F, 0F, 0.2974289F);
    Shape3 = new ModelRenderer(this, 176, 0);
    Shape3.addBox(0F, 0F, 0F, 10, 24, 10);
    Shape3.setRotationPoint(-8F, 0F, 13F);
    Shape3.setTextureSize(64, 32);
    Shape3.mirror = true;
    setRotation(Shape3, 0F, 0F, 0F);
    Shape4 = new ModelRenderer(this, 176, 34);
    Shape4.addBox(0F, 0F, 0F, 10, 9, 10);
    Shape4.setRotationPoint(-5.4F, -8.6F, 13F);
    Shape4.setTextureSize(64, 32);
    Shape4.mirror = true;
    setRotation(Shape4, 0F, 0F, 0.2974289F);
    Shape5 = new ModelRenderer(this, 136, 0);
    Shape5.addBox(0F, -1F, 0F, 10, 24, 10);
    Shape5.setRotationPoint(30F, 1F, -15F);
    Shape5.setTextureSize(64, 32);
    Shape5.mirror = true;
    setRotation(Shape5, 0F, 0F, 0F);
    Shape6 = new ModelRenderer(this, 136, 34);
    Shape6.addBox(0F, 0F, 0F, 10, 9, 10);
    Shape6.setRotationPoint(32.6F, -8.6F, -15F);
    Shape6.setTextureSize(64, 32);
    Shape6.mirror = true;
    setRotation(Shape6, 0F, 0F, 0.2974289F);
    Shape7 = new ModelRenderer(this, 96, 0);
    Shape7.addBox(0F, 0F, 0F, 10, 24, 10);
    Shape7.setRotationPoint(30F, 0F, 13F);
    Shape7.setTextureSize(64, 32);
    Shape7.mirror = true;
    setRotation(Shape7, 0F, 0F, 0F);
    Shape8 = new ModelRenderer(this, 96, 34);
    Shape8.addBox(0F, 0F, -1F, 10, 9, 10);
    Shape8.setRotationPoint(32.6F, -8.6F, 14F);
    Shape8.setTextureSize(64, 32);
    Shape8.mirror = true;
    setRotation(Shape8, 0F, 0F, 0.2974289F);
    Shape9 = new ModelRenderer(this, 88, 73);
    Shape9.addBox(0F, 0F, 0F, 52, 23, 32);
    Shape9.setRotationPoint(-8F, -25F, -12F);
    Shape9.setTextureSize(64, 32);
    Shape9.mirror = true;
    setRotation(Shape9, 0F, 0F, 0.0743572F);
    Shape10 = new ModelRenderer(this, 0, 66);
    Shape10.addBox(0F, 0F, 0F, 20, 43, 19);
    Shape10.setRotationPoint(-23F, -43.2F, -6F);
    Shape10.setTextureSize(64, 32);
    Shape10.mirror = true;
    setRotation(Shape10, 0F, 0F, -0.3346075F);
    Shape11 = new ModelRenderer(this, 0, 24);
    Shape11.addBox(0F, 0F, 0F, 15, 27, 15);
    Shape11.setRotationPoint(-26F, -70F, -4F);
    Shape11.setTextureSize(64, 32);
    Shape11.mirror = true;
    setRotation(Shape11, 0F, 0F, -0.2230717F);
    Shape12 = new ModelRenderer(this, 256, 0);
    Shape12.addBox(0F, 0F, 0F, 10, 20, 10);
    Shape12.setRotationPoint(-28F, -88F, -2F);
    Shape12.setTextureSize(64, 32);
    Shape12.mirror = true;
    setRotation(Shape12, 0F, 0F, -0.2602503F);
    Shape13 = new ModelRenderer(this, 296, 0);
    Shape13.addBox(0F, 0F, 0F, 6, 6, 6);
    Shape13.setRotationPoint(-27.7F, -93F, 0F);
    Shape13.setTextureSize(64, 32);
    Shape13.mirror = true;
    setRotation(Shape13, 0F, 0F, -0.4089647F);
    Shape14 = new ModelRenderer(this, 320, 0);
    Shape14.addBox(0F, 0F, 0F, 6, 6, 6);
    Shape14.setRotationPoint(-30.3F, -97.5F, 0F);
    Shape14.setTextureSize(64, 32);
    Shape14.mirror = true;
    setRotation(Shape14, 0F, 0F, -0.5205006F);
    Shape15 = new ModelRenderer(this, 296, 12);
    Shape15.addBox(0F, 0F, 0F, 6, 6, 6);
    Shape15.setRotationPoint(-33.5F, -100.8F, 0F);
    Shape15.setTextureSize(64, 32);
    Shape15.mirror = true;
    setRotation(Shape15, 0F, 0F, -0.7435722F);
    Shape16 = new ModelRenderer(this, 320, 12);
    Shape16.addBox(0F, 0F, 0F, 6, 6, 6);
    Shape16.setRotationPoint(-35.8F, -99.7F, 0F);
    Shape16.setTextureSize(64, 32);
    Shape16.mirror = true;
    setRotation(Shape16, 0F, 0F, -1.449966F);
    Shape17 = new ModelRenderer(this, 256, 30);
    Shape17.addBox(0F, 0F, 0F, 11, 8, 8);
    Shape17.setRotationPoint(-45F, -107F, -1F);
    Shape17.setTextureSize(64, 32);
    Shape17.mirror = true;
    setRotation(Shape17, 0F, 0F, 0F);
    Shape18 = new ModelRenderer(this, 60, 34);
    Shape18.addBox(0F, 0F, 0F, 9, 5, 4);
    Shape18.setRotationPoint(-44F, -109F, 1F);
    Shape18.setTextureSize(64, 32);
    Shape18.mirror = true;
    setRotation(Shape18, 0F, 0F, 0F);
    Shape19 = new ModelRenderer(this, 60, 43);
    Shape19.addBox(0F, 0F, 0F, 9, 5, 5);
    Shape19.setRotationPoint(-50F, -101F, 0.5F);
    Shape19.setTextureSize(64, 32);
    Shape19.mirror = true;
    setRotation(Shape19, 0F, 0F, -0.2974289F);
    Shape20 = new ModelRenderer(this, 256, 46);
    Shape20.addBox(0F, 0F, 0F, 24, 12, 22);
    Shape20.setRotationPoint(34F, -19F, -7F);
    Shape20.setTextureSize(64, 32);
    Shape20.mirror = true;
    setRotation(Shape20, 0F, 0F, 0.3346075F);
    Shape21 = new ModelRenderer(this, 256, 80);
    Shape21.addBox(0F, 0F, 0F, 21, 10, 17);
    Shape21.setRotationPoint(49F, -13F, -5F);
    Shape21.setTextureSize(64, 32);
    Shape21.mirror = true;
    setRotation(Shape21, 0F, 0F, 0.4833219F);
    Shape22 = new ModelRenderer(this, 42, 0);
    Shape22.addBox(0F, 0F, 0F, 12, 8, 14);
    Shape22.setRotationPoint(64.7F, -2.3F, -3.5F);
    Shape22.setTextureSize(64, 32);
    Shape22.mirror = true;
    setRotation(Shape22, 0F, 0F, 0.2185276F);
    Shape23 = new ModelRenderer(this, 0, 0);
    Shape23.addBox(0F, 0F, 0F, 11, 5, 9);
    Shape23.setRotationPoint(72.93333F, 2F, -1F);
    Shape23.setTextureSize(64, 32);
    Shape23.mirror = true;
    setRotation(Shape23, 0F, 0F, 0F);
    
    }
    
    public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
    {
    super.render(entity, f, f1, f2, f3, f4, f5);
    setRotationAngles(f, f1, f2, f3, f4, f5);
    Shape1.render(f5);
    Shape2.render(f5);
    Shape3.render(f5);
    Shape4.render(f5);
    Shape5.render(f5);
    Shape6.render(f5);
    Shape7.render(f5);
    Shape8.render(f5);
    Shape9.render(f5);
    Shape10.render(f5);
    Shape11.render(f5);
    Shape12.render(f5);
    Shape13.render(f5);
    Shape14.render(f5);
    Shape15.render(f5);
    Shape16.render(f5);
    Shape17.render(f5);
    Shape18.render(f5);
    Shape19.render(f5);
    Shape20.render(f5);
    Shape21.render(f5);
    Shape22.render(f5);
    Shape23.render(f5);
    }
    
    private void setRotation(ModelRenderer model, float x, float y, float z)
    {
    model.rotateAngleX = x;
    model.rotateAngleY = y;
    model.rotateAngleZ = z;
    }
    
    public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
    {
    this.Shape1.rotateAngleX = MathHelper.cos((f) * 0.63330555F + 1) * 1.0F * f1;
    this.Shape3.rotateAngleX = MathHelper.cos((f) * 0.63330555F + (float)Math.PI) * 1.0F * f1;
    this.Shape5.rotateAngleX = MathHelper.cos((f) * 0.63330555F + (float)Math.PI + 2) * 1.0F * f1;
    this.Shape7.rotateAngleX = MathHelper.cos((f) * 0.63330555F + 1) * 1.0F * f1;
    }
    
    }
    
    
  • Modérateurs

    Tu peux m'envoyer ton modèle Techne par mp?


  • Pas de problème , voilà.

  • Administrateurs

    Pour ton model : Sois tu utilises un GL11.glRotatef(x, y, z, angle);
    Sois tu le reconstruis de zéro sur Techne car là, tu avais orienter techne vers la droite, ce qui explique les mouvements buggués de ton mob. (Image : Clique ici)

    Et change les noms des Shape 123456… Tu t'y retrouvera mieux !

    -merci à superloup de m'avoir envoyé le model pour une analyse du problème.


  • D'accord je viens de remarquer xD Je vais essayer de remettre les pièces dans le bon sens en ajoutant de la hauteur je laisse le topic ouvert pour te dire si tout est bon 😉 Sinon il y a aussi la commande pour le faire pivoter, comment je dois faire avec x y z ?