Jump to content


Photo

D3d_model_draw()


  • Please log in to reply
4 replies to this topic

#1 flexaplex

flexaplex

    GMC Member

  • Global Moderators
  • 4814 posts
  • Version:GM8

Posted 02 January 2008 - 12:26 AM

Hi,
Ok when use d3d_model_draw(ind,x,y,z,texid) it seems to just be ignoring the argument3 value (z) and always drawing the model at z=0.

I'm using GM6.1, i've made an example showing the problem as well here

If you go into the camera draw event you'll see i've put:

d3d_model_draw(block,x+35,y+30,z,-1);
but the z value doesn't change when the player's z value changes

and i've also just put
d3d_model_draw(block,x+84,y+84,-184,-1);
but it doesn't draw it at -184 just z=0

is this a known error or something or am I just completely missing something?

Edited by flexaplex, 21 December 2008 - 07:53 PM.

  • 0
:]

#2 ragarnak

ragarnak

    GMC Member

  • GMC Elder
  • 19468 posts
  • Version:GM8

Posted 02 January 2008 - 10:07 AM

is this a known error or something or am I just completely missing something?

<{POST_SNAPBACK}>

No, you're not missing anything, and yes, its a known problem (although my knowledge about it is no more than a few months old, when I first saw it discussed).

You know you can work-around the problem with the "d3d_transform_set_translation(...)" command I assume ?
  • 0

#3 xygthop3

xygthop3

    You may know me from such forums as "Shaders"

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

Posted 02 January 2008 - 11:11 AM

I have used model functions in GM6.1 (as the topic starter is) for a long time and never came across this problem.

How is this problem caused?
  • 0

#4 ragarnak

ragarnak

    GMC Member

  • GMC Elder
  • 19468 posts
  • Version:GM8

Posted 02 January 2008 - 01:47 PM

I have used model functions in GM6.1 (as the topic starter is) for a long time and never came across this problem.

<{POST_SNAPBACK}>

Probably because you, just as most of the rest of us, have never used drawing a model without using transformations too. ;)

How is this problem caused?

We'll have to ask Mark (Overmars) that. :D But if you mean how you can make it show itself than just create a model and (try to) change its z-coordinate. :GM127:

The OP allso provided an example to it (second paragraph).
  • 0

#5 flexaplex

flexaplex

    GMC Member

  • Global Moderators
  • 4814 posts
  • Version:GM8

Posted 02 January 2008 - 05:46 PM

# # # # # # # # # # # # # # # # # # # # # # #
# ● ● ● ● ● ● ● ● ● ● # ● ● ● ● ● ● ● ● ● ● #
# # # # # # # # # # # # # # # # #
#  # # # # # # # # # # # # # # # #
# ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● #
#  # # # # # # # # # # # # # # # #
# ● ● ● # ● ● ● # ● ● ● # ● ● ● #
# # # # # # # # # _ # _ # # # # # # # # #
□ □ □ □ □ #
# _ _ _ _ _ _ _ # # □ □ □ □ □
□ □ □ □ □ #
# _ # # _ # # _ # # □ □ □ □ □
# # # # # #
# _ # a _ a # _ # # # # # # #
_ _ _ _ _ _ _ _
# a _ a # _ _ _ _ _ _ _ _
# # # # # #
# _ # # # # # _ # # # # # # #
□ □ □ □ □ #
# _ < _ _ _ > _ # # □ □ □ □ □
# # # # # #
# _ # # # # # _ # # # # # # #
# ● ● ● ● ● ● ● ● ● ● # ● ● ● ● ● ● ● ● ● ● #
#  # # # # # # # # # # # # # # # #
#  ● ● ● # ● ● ● ● ● ● ● ● ● # ● ● ● #
# # # # # # # # # # # # # # # # #
# ● ● ● # ● ● ● # ● ● ● # ● ● ● #
#  # # # # # # # # # # # # # # # # # # #
# ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● #
# # # # # # # # # # # # # # # # # # # # # # #


  • 0
:]