Jump to content

Entity average size


Jules D.
 Share

Recommended Posts

Not sure if there is a way yet, but

 

GetEntityAverageSize(Entity)

or

GetModelAverageSize(Model)

 

would be nice, this way I can figure how far to place the Entity or model from camera, depending on size.

 

DBPro I believe has that, and I once wrote a program when I load an object it would place it's self a certain distance from the camera depending on it's size

I could load a pin and it would load in close to the camera, and if I load a huge planet it would look the same size as the pin on screen, but obviously placed much farther from the camera. But this way I had my models in full view, not to big, not to small.

Intel Quad 9300 2.5

Windows 7 64 bit

nforce 780i SLI MotherBoard

Sapphire, Ati Radeon HD 5770

8 GRam

Link to comment
Share on other sites

I thought that's what it was called in DarkBasicPro, but it's been so long since I used it, I can't remember.

I also lost my math equation for it, it worked perfect. So I need to fiqure out the math all over.

Intel Quad 9300 2.5

Windows 7 64 bit

nforce 780i SLI MotherBoard

Sapphire, Ati Radeon HD 5770

8 GRam

Link to comment
Share on other sites

Ok had it working, now the command does not want to read the values, and I did not change the code, that command needs fixing.

 

It would work then it wouldn't, on and off.

 

 

I got it, it seems to be working well in one of the functions, I wonder if its the

SetGraphics(CanvasGraphics(MainWindow_RenderCanvas))

just before it.

 

Got the math as well

Camera_z = aabb.x1 + aabb.y1 + aabb.z1

Camera_z = -Camera_z / (Camera_z / 3) - (Camera_z / 3)

seems to work.

Intel Quad 9300 2.5

Windows 7 64 bit

nforce 780i SLI MotherBoard

Sapphire, Ati Radeon HD 5770

8 GRam

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...