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.

AppGameKit Classic Chat / 3D object Selection with mouse

Author
Message
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 10th Aug 2016 08:40
Hello community

I got a Question, maybe you people can help me:
How would you do a 3D object selection by mouse, with a dynamic camera? I can not wrap my mind around that... is there a command i'm missing?

Thanks in advance!
Carharttguy
7
Years of Service
User Offline
Joined: 8th Jul 2016
Location: Belgium
Posted: 10th Aug 2016 10:20 Edited at: 10th Aug 2016 10:46
Something like this: https://www.youtube.com/watch?v=RmwPUSncBTE?

Only two steps involved:
-Screencoordinates -> 3D coordinates
-Raycasting
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 10th Aug 2016 11:59
Hey, thx Carharttguy!

Works like it should!

I have writen the functions for others to copy:

CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 10th Aug 2016 12:51
Sorry to be a stickler, but just as a matter of forum etiquette, Green7, when creating a forum thread, be sure to put info in the thread title that pertains to the problem you're having, that way future browsers will be able to find your post in searches and perhaps get help for the same issue!
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 10th Aug 2016 13:42
Hey CumQuaT!
I Know that, im on this forum for a certain time, but i do not post often, mostly i read. I forgot to add a sensefull title, wanted to do as soon as i wrote down the message. english is not my first language, so i sometimes have to search for the words.
an then, baaam-> headshot! i accidently hit the "post thread" button. sorry!

if a mod reads this, please could you alter the name of this tread for something better? thx in advance!
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 10th Aug 2016 14:20
If you want to do the same thing but with 3D physics check out the raycasting demo here.

https://forum.thegamecreators.com/thread/216683
The coffee is lovely dark and deep,and I have code to write before I sleep.
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 10th Aug 2016 15:09
Thanks Stab!
Physics are not planed by now, but i will keep this in the back of my mind, for future projects. nice work there, keep it going!
CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 11th Aug 2016 12:19
All ok Green7! It all came out good!
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 11th Aug 2016 13:07
Built a small editor, nothing fancy, no saving, no media, only stacking cubes.
Have fun!

Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 11th Aug 2016 14:25
If you use physics you could make a Jenga like game.
The coffee is lovely dark and deep,and I have code to write before I sleep.
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 11th Aug 2016 15:11
Nice Idea! If anyone wonts to use this as a base for such a game, feel free to do so.
I got different plans, for now, but the longer you push that physics-button i tend to think about it. But it's better to stay with plans than to implement more than needed.

Login to post a reply

Server time is: 2024-04-26 17:58:18
Your offset time is: 2024-04-26 17:58:18