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.

DarkBASIC Professional Discussion / [SOLVED] Matrix terrain

Author
Message
BlackChaos
16
Years of Service
User Offline
Joined: 2nd May 2010
Location: London
Posted: 17th Oct 2011 20:09
I am trying to get a tile number based on the mouse's position (without dll's or extras pluggins) using DB's native functions or just abit of math.

any ideas??





bchaos101

The author of this post has marked a post as an answer.

Go to answer

chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 17th Oct 2011 21:46 Edited at: 17th Oct 2011 21:48
@BlackChaos
Have a look to this example. Use both mouse buttons



Cheers.

I'm not a grumpy grandpa
BlackChaos
16
Years of Service
User Offline
Joined: 2nd May 2010
Location: London
Posted: 17th Oct 2011 22:06
Nice I noticed when I unhide the mouse its not very relative to the reference object, so its not very smooth when trying to move across the grid . Is there a better way to do this? Or am I asking for allot?

http://www.ameadusproject.com
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 18th Oct 2011 00:25
Quote: "I noticed when I unhide the mouse its not very relative to the reference object, so its not very smooth "


It use a snap to grid movement. if we instead of 5 we move just 1 it goes smooth

change this :


for this:




Cheers.

I'm not a grumpy grandpa
BlackChaos
16
Years of Service
User Offline
Joined: 2nd May 2010
Location: London
Posted: 18th Oct 2011 02:44
Thanks

http://www.ameadusproject.com
BlackChaos
16
Years of Service
User Offline
Joined: 2nd May 2010
Location: London
Posted: 18th Oct 2011 03:50
Ok so I've just written this and was wondering if it has any possible way of working. I want the ellipse to shrink and grow based on distance, the reference object(the cube) to be at exact position to the mouse(mainly over the matrix).



Thanks

http://www.ameadusproject.com
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 19th Oct 2011 21:23
@BlackChaos. Sorry for the delay, but I hadn't see your post until now.You have to make the ellipse with other object, or a group of objects around the main object selector.





Cheers.

I'm not a grumpy grandpa
BlackChaos
16
Years of Service
User Offline
Joined: 2nd May 2010
Location: London
Posted: 19th Oct 2011 23:45
Thanks I will check that code out ASAP

BlackChaos
16
Years of Service
User Offline
Joined: 2nd May 2010
Location: London
Posted: 30th Oct 2011 16:50 Edited at: 31st Oct 2011 01:35
@chafari

Based on pieces of your code ,others & my own i'm developing a matrix editor.. But I have an issue.


When the mouse goes off the screeen there is an issue. Check this:


Check out my website -> Ameadus Project <- Free Project files, Examples and Over 2,000 textures
BlackChaos
16
Years of Service
User Offline
Joined: 2nd May 2010
Location: London
Posted: 30th Oct 2011 16:52
And I dont want to have to run it in full screen mode

Check out my website -> Ameadus Project <- Free Project files, Examples and Over 2,000 textures
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 30th Oct 2011 21:44
This post has been marked by the post author as the answer.
You have to put limits to your x# z# values, in order not go out off the grid. If you go out of grid when you are windowed, you prees accidentaly windows bar.


Cheers.

I'm not a grumpy grandpa
BlackChaos
16
Years of Service
User Offline
Joined: 2nd May 2010
Location: London
Posted: 31st Oct 2011 03:42
Thanks

Check out my website -> Ameadus Project <- Free Project files, Examples and Over 2,000 textures

Login to post a reply

Server time is: 2026-07-11 02:36:33
Your offset time is: 2026-07-11 02:36:33