Jump to content


Photo

Help! 3d model-selecting


  • Please log in to reply
4 replies to this topic

#1 ShubhamBansod

ShubhamBansod

    ͡º ͜ʖ ͡º

  • GMC Member
  • 365 posts
  • Version:GM:Studio

Posted 16 April 2012 - 06:15 AM

I am making a game for which i want to create a 3d room editor ,but i m unable to get the object's x,y,z postion ,,i only just select it ,,please help...
  • 0

#2 BattleRifle BR55

BattleRifle BR55

    Let Live

  • GMC Member
  • 9386 posts
  • Version:GM:Studio

Posted 16 April 2012 - 06:38 AM

Explain better - what do you mean you're unable to get those variables? You can get them like any other object/instance.
  • 0

#3 ShubhamBansod

ShubhamBansod

    ͡º ͜ʖ ͡º

  • GMC Member
  • 365 posts
  • Version:GM:Studio

Posted 16 April 2012 - 12:41 PM

Selecting a model means ,with the help of cursor clicking on 3d model on screen ,
as i am making a room editor ,i want to get object properties like its x,y,z,tex... values to put it into a text file..
i think u will understand...:)
  • 0

#4 Tepi

Tepi

    GMC Member

  • Global Moderators
  • 4238 posts
  • Version:GM:Studio

Posted 16 April 2012 - 01:33 PM

So you need a method to find the instance(s) under the cursor.

If it's sufficient to check for objects of similar shape to the simple shapes (block, cylinder, ellipsoid, cone, wall, floor), you could use my Line–Shape Collision scripts combined with Yourself's mouse conversion script, and loop through all the selectable instances in view#.

#
Spoiler


However, if the objects are arbitrary kind of models, you can use e.g. this DLL to raytrace.
  • 0

#5 toao

toao

    GMC Member

  • New Member
  • 157 posts

Posted 17 April 2012 - 11:14 AM

Try drawing each model in a diffirent color, and then check what color is under the cursor when you click. Thus you will know what object has been clicked on. I belive filulius hade some example of that around here.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users