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

  • SEARCH
  • Home
  • 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 8436219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:07:23+00:00 2026-06-10T07:07:23+00:00

I’ve created a simple 3D world using GLKit. I’m trying to find a specific

  • 0

I’ve created a simple 3D world using GLKit. I’m trying to find a specific point in my 3D world based on a screen tap. It seems that I would want to use GLKMathUnproject. The signature of the method is:

GLKVector3 GLKMathUnproject (
   GLKVector3 window,
   GLKMatrix4 model,
   GLKMatrix4 projection,
   int *viewport,
   bool *success
);

A few things confuse me about the params it requires. First shouldn’t the window coordinates be GLKVector2? And most importantly wouldn’t projecting a point on the screen into 3D space create a ray instead of a single point.
When you project points in 3D space onto a 2D plain (aka the screen) you loose one dimension of information about that point. So how would it be possible to transform a 2D screen point into a 3D world point without specifying at what depth you’d like to ‘unproject’ your point to? There is absolutely no comment about this method anywhere on the internet (besides apple docs).

  • 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-06-10T07:07:24+00:00Added an answer on June 10, 2026 at 7:07 am

    The first parameter is GLKVector3 because the z component stores the desired z-depth.

    So window x,y are the screen coords and window z is the desired depth.

    eg with z=0 GLKMathUnproject will give the coordinates of the object at the near plane
    with z=1, GLKMathUnproject will give you the coordinates of the object at the far plane.

    This is necessary because GLKMathUnproject maps from a plane to a line in the 3d space formed by the projection frustum. The z – bounds of the frustum are constrained by the near and far planes.

    So say you wanted to map the unprojected mouse point at the z=0 (object space) plane in the frustum.

    Then unproject 2 points with window z=0 and window z =1 1.
    Use these points to form a line in object space. Interesect this line with the plane z=0 to determine the final target point.

    Hope this helps someone –

    You can read more here CasualDistraction Blog

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm trying to create an if statement in PHP that prevents a single post
I'm making a simple page using Google Maps API 3. My first. One marker
Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and

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.