Jump to content

changing angles with GL11


endershadow

Recommended Posts

It's really hard for me to change the rotation and position of glove model when my character is wearing it. does anyone have any tips on doing it? because I'm having trouble with it. I watched a video on setting up things like this, but ichun said that this part is different for every model. if anyone would be willing to give me any tips/restrictions on what the numbers can be or willing to set up the rotation for me would be appreciated.

Link to comment
Share on other sites

glTranslatef  will move Your model. It's easy to figure out this one using some kind of bisection method (If You want to move Your model in X axis, but You don't know how big the factor should be, give it some value x1, then, if it's too big, give it x1/2 and if x1/2 is too little, give it x1*3/4 and so on until You got Your value). Just remember to use glTranslate after rotating and before scaling.

 

glRotatef will rotate model by angle (first parameter) using axis (three other parameters). It's easiest to give 0.0F to two axes, and 1.0F to one axis.

 

Glove model should be rotated more or less like this:

 

GL11.glRotatef(-55, 0.0F, 0.0F, 1.0F);

As arms are by default rotated 55 degrees around Z axis. Maybe some other angles should be applied to other axes, but I'm not sure.

 

Also note, that You should specify some offset (not texture offset) in Techne if You're using it, so that Your model has good rotation center. Otherwise, rotating and translating will be extremely tricky.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • the world capability works for the current world and its different for every dimension  sound like what you need  the only thing is you cannot access data from a diferent world things like reading a data of the overworld from the nether would nwork
    • use inventorytick() whit the slot number you can know if its into an armour slot         //########## ########## ##########     public void inventoryTick(ItemStack helditem, Level warudo, Entity en, int slot, boolean value) {         Long wtick = 0L;         int tick = 0;         // System.out.println("\n#inventoryTick#\n");         if( !warudo.isClientSide ){             wtick = warudo.dayTime();             if( wtick % 20 == 0 && en instanceof Player ) {                 item_handler ih = get_itemhandler(helditem);                 //inicializar tiempo                 if (ih.start_time < 1L) {                     ih.start_time = wtick;                 }                 ih.time = (int) ( wtick - ih.start_time );                 tick = ih.time;                 //cada 5 seg causar daño por fuego al player                 if (tick > 0 && tick % 100 == 0) {                     en.setSecondsOnFire(1);                 }                 //despues de un minuto el lingote se enfria y vielve a ser hierro                 if ( tick > 1200 ) { //                     helditem = new ItemStack( Items.IRON_INGOT, helditem.getCount() );                     ((Player) en).getInventory().setItem(slot, helditem );                 }             }         }     }
    • i have not test it but  you must extend the slot class overriding the max stack size to 1  public int getMaxStackSize() { return this.container.getMaxStackSize(); }   then in the menu class use your custome slot class to declare the slot    this.addSlot(new SlotItemHandler(handler00, 6, 62, 35));//slot zero this.addSlot(new ArmourSlotItemHandler(handler00, null,5, 80, 8));//head  
    • I have java, jarfix, Minecraft java, and forge all downloaded/installed, however I've been trying to make forge work for literal weeks now, and it quite literally just wont load. My primary launcher is Modrinth and when I try to launch a game with forge instead of fabric it'll just stop loading, no error message or anything in the logs, and when I try to launch directly from the Minecraft launcher I just get "Exit Code: 1". I also do not have anything in my mods folder. I'm at a loss... I've tried with practically every version at this point, but the specific versions I'm trying to get into are 1.20.1 and 1.19.2
    • My forge 1.12.2 server is very slow and laggy. The reason is probably because every 5 seconds, the console spits out this message (or smth like it):   Running 15ms behind! Is the server overloaded? Skipping 60 ticks (example, but keeps sending messages just like it)   I've been trying to allocate ram to fix this issue. How can I do this on 1.12.2? There is no jvm args.txt, like in 1.20.1.  
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.