AddMesh troubles

Blitz3D Forums/Blitz3D Programming/AddMesh troubles

Picklesworth(Posted 2005) [#1]
I am using the AddMesh command, two spheres, and a cylinder (eek!) to create a capsule. That all seems to work well, in that the capsule is created and resembles a capsule.

Now, my problem is that when I use ScaleMesh to resize this capsule, it all disconnects in an odd way - but only if it exceeds a particular size.

So... Shouldn't AddMesh make the meshes added to the main mesh all act as one single mesh that can easily be scaled and all that as though it is just any old mesh?

If you have your own code for adding a mesh to another, please share.


Screenies:

What it does:


What it should do:




PS: This is why I want to kill the capsule guy.


WolRon(Posted 2005) [#2]
it all disconnects in an odd way - but only if it exceeds a particular size.
Please elaborate.


Picklesworth(Posted 2005) [#3]
Please elaborate.

Screenies.
They seem to actually not scale, but rather just move apart. I'm dead certain though, that I am calling the same functions for both of those images, and that they both take place after the exact same functions.


Beaker(Posted 2005) [#4]
Odd. Are you deleting the old meshes that you addmeshed?


Picklesworth(Posted 2005) [#5]
Yup.

Edit:
Don't you hate how horrible and time-wasting glitches are always the simplest little things?
Yes, I fixed it.


KuRiX(Posted 2005) [#6]
Why not make a capsule in 3dsmax or milkshape and then import it into blitz3d? So you will have less vertex and less polygonsĄ (faster...)


John Blackledge(Posted 2005) [#7]
Mr Pick - can you tell us what you did to fix it?


Picklesworth(Posted 2005) [#8]
It was my own fault. The code that creates the capsule's spheres and cylinder was modified so that it actually makes a small object which is then scaled to proper size. I did this to save myself a bit of time, but it ended up costing a lot more :(
What I had done was I forgot to change the section that positions the spheres to the right spot on their z axis to match the change (they were going the full z size/2 of the capsule by accident)

Anyway, AddMesh works well, don't worry :)
Will post capsule code soon.

KuRiX: I experimented with a pre-built capsule, but later concluded that for some reason it was better to do it in code. For starters, I can easily and cleanly do dynamic LOD on them based on how many there are. Also, the resizing wasn't working on pre-built capsules for some odd reason.