Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I made a custom model for an item just as a test and I can't figure out what rotation would make this correct.(http://imagebin.org/265693)

 

here's my render code:

public class RenderHammer implements IItemRenderer
{

protected ModelHammer hammerModel;

public RenderHammer()
{
	hammerModel = new ModelHammer();
}

@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type)
{
	switch(type)
	{
	case EQUIPPED: return true;
	case EQUIPPED_FIRST_PERSON: return true;
	default: return false;
	}
}

@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper)
{
	return false;
}

@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
{
	switch(type)
	{
	case EQUIPPED:
	case EQUIPPED_FIRST_PERSON:
	{
		GL11.glPushMatrix();

		Minecraft.getMinecraft().renderEngine.func_110577_a(new ResourceLocation("modclass","/textures/models/Hammer.png"));

		GL11.glRotatef(192F, 1.0F, 0.0F, 0.0F);
		GL11.glRotatef(95F, 0.0F, 1.0F, 0.0F);
		GL11.glRotatef(-10F, 0.0F, 0.0F, 1.0F);

		float scale = 1.6F;
		GL11.glScalef(scale, scale, scale);


		this.hammerModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);

		GL11.glPopMatrix();
	}
		default: 
	}
}
}

Unfortunately no one can give you the answer. When it comes to model rotation you have to play with it until it is how you want it...

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

  • Author

it doesn't have to be a specific angle but how would a rotate it downwards, all the other ones just seem to turn it left or right

it doesn't have to be a specific angle but how would a rotate it downwards, all the other ones just seem to turn it left or right

 

So you are wanting it to (say you are looking at the side) go from vertical, to 45˚?

 

 

example:

 

| to /

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

  • Author

well ya if you look at the picture i linked the handle is in my shoulder, how would i rotate it into my hand

As others have said, the best way to answer this kind of question is by experiment. Try changing each of the rotation angles a little bit, one axis at a time, and observe what happens. Once you've found the right axis, adjust the angle until you get the result you want.

 

Keep in mind that when you perform multiple rotations, the effect of later ones will depend on the earlier ones. You may find it less confusing to start with all angles zero.

dude, i already told you in your other thread to just keep playing around with it. just keep trying, man. you're bound to get it right sooner or later.

  • Author

But this is why I'm asking, i played around with them A LOT and none of them rotate on that axis but i'll keep trying I guess. sorry

hmm.. have you tried what gcewing suggested? starting with the angles at 0? im about to sleep, but i'll check back tomorrow. if you still haven't gotten it, i'll see what i can do. unless someone else helps you first

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.