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 / How can i return an objects id.

Author
Message
Battoad
AGK Developer
17
Years of Service
User Offline
Joined: 12th Feb 2007
Location: A Dark Place
Posted: 3rd Sep 2015 13:02 Edited at: 3rd Sep 2015 13:08
With many different objects on screen, is there a way that certain objects ids can be returned?
Because of the limited number of 3D commands currently available I am not bothered at this stage if it is via vectors, xy screen positions, color or anything else although ideally it would be via mouse click or touch.

CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 3rd Sep 2015 14:48
ObjectRayCast does the trick, but doesn't work with scaled objects (see thread http://forum.thegamecreators.com/?m=forum_view&t=214800&b=41 for details).

V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Battoad
AGK Developer
17
Years of Service
User Offline
Joined: 12th Feb 2007
Location: A Dark Place
Posted: 3rd Sep 2015 15:13
@CJB very clever, I can see how it works. I will not be scaling objects in my current project so I should be able to use it.

Hopefully we might get a lot more 3D commands similar to some provided in DBPro sooner than later. An Object Hit or Collision would have been apt for my application here but until it happens I am very happy to use your method.

Many thanks.

CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 3rd Sep 2015 16:43
It's not mine, but thanks anyway!

V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Battoad
AGK Developer
17
Years of Service
User Offline
Joined: 12th Feb 2007
Location: A Dark Place
Posted: 3rd Sep 2015 17:40
Quote: "It's not mine, but thanks anyway!"


Oh yeah, thank you both OminusPrime for the idea and CJB for providing the link. I was stuck without the help from you both.

Thanks.

Login to post a reply

Server time is: 2024-11-16 20:54:38
Your offset time is: 2024-11-16 20:54:38