home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Ray from mouse pointer

by Snape on 04/28/2011 13:13, 4 messages, last message: 04/29/2011 13:20, 965 views, last view: 05/04/2024 21:41

Could you please give an idea, how it\'s better to get an object in 3d space, where mouse pointer shows to? In addition, I need to detect somehow, what object is it. In my, case it\'s mouse pointer, I can\'t use active camera.

I know, there are some basic implementations with SDL and Open GL, but I\'m trying to study your code at first, before making any patches. Maybe you know some kind of implementation, which fits your code better?

What is it for. I\'ve already did a real MMOPRG-style camera with 3-d person view, with controls, identical to Lineage 2. To keep engine style, I\'ve added some script-language functionality for this controls was possible to change. That was quite easy to do with your engine and took me just few hours. Awesome!
Now I want to make L2-style movement controls (click-where-char-should-go-to, click-to-pick-up, highlight-hover-object, click-to-select-target).
I\'m going to study editor\'s code, to see, how it works to detect an object under crossair, but not sure it will be best approach. :(

PS: It\'s just for educational needs, nothing special. Yet. :)
PPS: Sorry for my Inglesh :)

BTW: Did anybody tried some other gui libraries already? Mostly interested in rendering to texture of flash or at least html, or both. I know \'bout berkelium, awesomium, gameswf and so on. But maybe there could be some useful advices, for better fitting cube2?

BTWPS: Yes, I could write my own GUI, but it\'s question of time. Lots of time, don\'t see any good in reinventing the wheel.

BTWPPS: Haven\'t looked yet, but maybe there is some easy way to remove scaling from your current gui and make it see x,y int mouse coordinates, not float screen position? %)

   Board Index   

#1: ..

by suicizer01 on 04/28/2011 15:18

I'm sure I've seen something similar to that (click-on-surface-for-next-position).
I tought it was been made with platium arts sandbox, check out youtube...

reply to this message

#2: ..

by Snape on 04/28/2011 22:45

Already done :) Thanks for answer anyway :)

reply to this message

#3: free/panned mouse modes in redeclipse

by Hirato Kirata on 04/29/2011 04:38

Redeclipse has supported 3 input modes since forever.
you have the classic cursor always in the centre mode.
The panned mode which pans the camera to where the mouse is pointed.
And free mode that pans the camera and aims to where the cursor is pointing.

so if I were you, I'd have a look at Redeclipse.

reply to this message

#4: ..

by Snape on 04/29/2011 13:20

Thanks, but I've already did it myself. Now I'm deep inside of GUI...

reply to this message

   Board Index   


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
53863612 visitors requested 71638726 pages
page created in 0.016 seconds using 10 queries
hosted by Boost Digital