Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / How do I find a 2d mouse in a 3d world, moving the world up and down and zooming in or out?

Author
Message
Fvanstav
13
Years of Service
User Offline
Joined: 5th May 2011
Location:
Posted: 25th Jan 2012 03:04
I have a game board image, and I've stabilized it to look 2 d. The board itself is an object since I get better image quality than with trying to zoom sprites. There is no no rotation of the board, but I am using the z axis to zoom in or out.

The goal here is to be able to click on one part of the board, not matter the zoom or how far up,down,left or right of center it is, and be able to use the coordinates of the item to specify an action. Specific items would be in an array listing their x and y position.

I've tried using DKShop, but when I zoom or move up,down, left or right, the results differ for each attempt to select a point on the board.

How do I accomplish this correctly?

Frank
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 25th Jan 2012 22:49
This a simple example of what I think you're after. I got the basic idea from a post from VanB in this thread:

http://forum.thegamecreators.com/?m=forum_view&t=193534&b=1




Hope this helps.
Fvanstav
13
Years of Service
User Offline
Joined: 5th May 2011
Location:
Posted: 26th Jan 2012 12:09
That's just what I needed, Thanks 29 games.

Frank

Login to post a reply

Server time is: 2024-11-22 05:43:59
Your offset time is: 2024-11-22 05:43:59