Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 205719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:34:53+00:00 2026-05-11T17:34:53+00:00

I have a model of a snowman that I am loading from a .obj

  • 0

I have a model of a snowman that I am loading from a .obj file. Everything works well except that when I use glRotatef() to rotate the model the head of the snowman will always render in front of the body. The nose of the snowman will also always render behind the head. This creates the effect that the snowman changes direction as he is rotating, but really the parts just not rendering in the right z order. Why is this occuring?

NOTE: all parts of the snowman are from the same .obj file created using blender.

rendering the model like this ( in the draw loop)

glVertexPointer(3 ,GL_FLOAT, 0, model_verts);
glEnableClientState(GL_NORMAL_ARRAY);
glNormalPointer(GL_FLOAT, 0, model_normals);
glDrawElements(GL_TRIANGLES, num_model_indices*3, GL_UNSIGNED_SHORT, &model_indices);

rotating like this (in touchesMoved)

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
 UITouch *touch = [touches anyObject];
 touchBeginPos = [touch locationInView:self];

}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
 CGPoint touchEndPos = [[touches anyObject] locationInView:self];
 glMatrixMode(GL_MODELVIEW_MATRIX);
 glRotatef(10, (touchBeginPos.y - touchEndPos.y)/4, -(touchBeginPos.x - touchEndPos.x)/4, 0.0f);
 touchBeginPos = touchEndPos;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T17:34:53+00:00Added an answer on May 11, 2026 at 5:34 pm

    Check that you haven’t (by mistake) applied a negative (mirroring) scale to the scene. Also check that you’re using Z buffering, perhaps you’re not.

    This page talks a bit about Blender’s coordinate system, compared to another 3D system’s, and is perhaps semi-obscure as a reference but I place a certain amount of confidence in it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have model data that came from a MultipleChoiceField. I have figured out it
I have a model, Thing, that has a has_many with ThingPhoto, using Paperclip to
Let's assume I have a model called product. Let's assume that product has three
I have model that is a queue of Strings associated with enum types. I'm
I have model Article it has field title with some text that may contain
I have model/controller called notification. I want to make a new url so that
I have a model that already has a couple dozen of columns that will
I have a model that has several properties. The properties can be primitive (String)
I have a Model that has several properties. When I submit a form, I
I have a model that picks up the choices defined in CHOICES like this:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.