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.

Dark GDK .NET / C#:Net DGDK - Go from 2d to 3d

Author
Message
Hayer
18
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 22nd Nov 2009 16:28
Hi

Anyone have a solution for going from 2d to 3d coordinates?
Like in DBP I could use pick object.. But the .net version requires a distance instead of object number range?

halp i is soo lozt

Keep it simple.
Questions? Mail me
Hayer
18
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 22nd Nov 2009 20:19
the answer was to use Object3D.Pick

Keep it simple.
Questions? Mail me
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 30th Nov 2009 23:04
I have found that extending the basic Object3D class is an easy way to create object groups. I've added a parameter that describes the object as terrain, entity, track etc. After picking the closest object, I can establish what type of object it is and how I want to interact with it. As I normally use DBP, I find this a fantastic little trick I haven't been able to use before.

My handy tip for the day.

kBessa
17
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 1st Dec 2009 00:04
Nice to hear that Bat! The class library was intended to be extended by the developer, adding his own properties.

"That's inheritance, dude!"

[center][center]
Stefano
User Banned
Posted: 2nd Dec 2009 17:48
I think you can inherits specific classes without the need to have a parameter that describe the object.

Pseudo code



You can also declare an variable of class Object3D and assign to it an instance as terrain, entity at runtime

pseudo code

Login to post a reply

Server time is: 2024-04-19 14:23:24
Your offset time is: 2024-04-19 14:23:24