
as the topic say, how is it possible?
ATM i got one simple method in my main Brume class.
Code say more then 1000 words

- Code: Select all
private void loadTiny(float x, float y, float z, String name)
{
//setup Tiny
XMesh = new BrumeXMesh(this, "tiny_4anim.x", "tiny_4anim.x", false);
tiny = new BrumeLightedObject(this, name);
tiny.Mesh = XMesh;
tiny.Size = 0.005f;
tiny.Orient(new BrumeVector(0f, 1F, 0.0f), new BrumeVector(1f, 0F, 0f));
tiny.Pos = new BrumeVector(x, y, z);
tiny.UseParentRenderStates = true;
BrumeAnimationManager.AddAnimationsFromMesh(XMesh);
tiny.Animation = BrumeAnimationManager.GetAnimation("Jog");
BrumeAnimationManager.AddAnimationsFromMesh(XMesh);
tiny.Animation = BrumeAnimationManager.GetAnimation("Jog");
tiny.HasCollisions = true;
}
on line
- Code: Select all
//setup Tiny
XMesh = new BrumeXMesh(this, "tiny_4anim.x", "tiny_4anim.x", false);
it throws a direct3dexeption.
the same method works in "gameInit", so my simple question is, how can i load a second tiny just "one the fly". hope u understand what i mean

then my second question is (if this problem solved):
this method is only usefuel to create a holy new object. if i want to update just the position of this created mesh, i think it isnt good to create it everytime again. so my first idea was to create a second method, that only validates the position of this object.
to understand what i want:
in the first method i create a new object with name "name".
so my second method would look somethink like this
- Code: Select all
public void validatePosition(float x, float y, float z, String name)
{
//Here is what i need to know and i need something like this
tiny.getName(name).Pos.X = x;
...
}
ty
Bostich

//Edit:
Need information
