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.

Author
Message
Wolfdog
21
Years of Service
User Offline
Joined: 9th Dec 2002
Location:
Posted: 10th Dec 2002 05:35
Ive been trying to get this to work for hours but i can't seem to get it right and now im just confused. Im trying to make a rts style game right now i have the camera able to move, rotate, and like in WCIII when you scroll the middle wheel it will bring the camera to ground level. Now im trying to get an object to follow the mouse on the terrain but im just lost if anyone knows of any engines or snippets that could help please let me know. Thanks
Kangaroo2
21
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 10th Dec 2002 17:57
presumably your plain is made of squares or hexes and you are programming in 3d not sprites?

One way to do it is have a 3d cube or hex and get it to move in exact integers of how wide your grid squares are, controlled by the mouse. Then make the object invisible and draw a sprite for the mouse using a maths equasion to accurately plot it above the square.

This is v hard to get right tho and there may be an easier way

* If the apocalypse comes, email me *
Kangaroo2
21
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 10th Dec 2002 17:58
I you were to program the whole game in sprites and rescale them it would obviously be much easier

* If the apocalypse comes, email me *
Kangaroo2
21
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 10th Dec 2002 23:48
Just found 4 ways to do this in the code snippets section of realgametools.com which let you select 3d objects with your mouse pointer. These are much better than trying to follow my poorly worded explanation above

* If the apocalypse comes, email me *

Login to post a reply

Server time is: 2024-05-07 09:41:41
Your offset time is: 2024-05-07 09:41:41