Can Item objects be mounted to another object?
by Liu Yi · in Torque Game Engine · 01/10/2007 (1:39 am) · 2 replies
I asked this in another thread, but no one has answered. So I have to ask again.
Can an Item be mounted to another object, say, a vehicle? I manage to mount a staticShape object to the vehicle, but when I try to mount an item to the vehicle, the item doesn't appear. What might be the problem?
Here is the code.
%device = new StaticShape() {
dataBlock = device1;
};
%Field= new Item(){
dataBlock = Negative_Field;
};
%vehicle.mountObject(%device,1);
%device.mountObject(%Field, 0);
As a result, the StaticShape object %device appears on the vehicle, but the Item object %Field doesn't appear.
Can an Item be mounted to another object, say, a vehicle? I manage to mount a staticShape object to the vehicle, but when I try to mount an item to the vehicle, the item doesn't appear. What might be the problem?
Here is the code.
%device = new StaticShape() {
dataBlock = device1;
};
%Field= new Item(){
dataBlock = Negative_Field;
};
%vehicle.mountObject(%device,1);
%device.mountObject(%Field, 0);
As a result, the StaticShape object %device appears on the vehicle, but the Item object %Field doesn't appear.
#2
01/10/2007 (9:24 am)
You don't mount the Item class object, but the image class of it, that uses the same shape file (.dts)
Torque 3D Owner Billy L
Mount an Image instead.
Sorry that i didn't answer in the other thread !