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 8782239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:31:15+00:00 2026-06-13T20:31:15+00:00

I am trying to make a simple game engine but I got stuck at

  • 0

I am trying to make a simple game engine but I got stuck at a point when I tried to map a 2D mouse coordinate to a 3D coordinate in my world. The basic game has a plane that serves as the ground as it is going to be (hopefully with time) an RTS gameengine.

My problem is that I can’t really come up with anything useful. The plane is located at the 0,-100,-300 points and is about 1000×1000 in size. My camera is at 0,0,0 and the scene is rotated at 60 degreesto give the impression of a “bird eye” cam.

I was thinking about the trigonometric equations, using that I know the height of my camera and the angle and possibly calculating the distance will give me the right coords but this is just an idea.

Can somebody please give me some advice?

  • 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-13T20:31:16+00:00Added an answer on June 13, 2026 at 8:31 pm

    You can do it with a simple ray casting.

    First, using gluUnProject, you can obtain the 3D world coordinates m corresponding to the 2D window coordinates of the mouse pointer.

    Given the camera position e = (0, 0, 0), you can compute the mouse ray direction r = m - e.

    Now, given a point p on the plane and the plane normal n, you can compute the intersection of the mouse ray with the plane.

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

Sidebar

Related Questions

Trying to make simple minesweeper game in python, but have one problem. I have
im trying to make a simple game on cocos2d box2d, its basically got two
I am trying to make a simple guess my number game in c++ but
I'm trying to make a pretty simple game and I'm stuck. Basically I want
I am creating a simple game of TicTacToe, but I got stuck in restarting
Im trying to make a quite simple game but its having an error. I
I am playing around with trying to make a simple Roguelike game to learn
I'm, trying to make a simple 3D game for Android, and I want to
I am trying to make a simple tile system for my game. I made
I've been trying to make a little simple game just to test my logics,

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.