Vehicle not moving
by Randy Hearn (Magnum) · in Torque Game Engine · 01/10/2006 (7:57 pm) · 8 replies
OK,
I have set my FPS game up to have a buggy included and my player can mount it with the "E".. Used most of the resources and I can drive the buggy just fine once I mount it.
Si, I went to milkshape and exported a Dodge Ram pickup I had. Of course I had mount0 as well as hub0,hub1,hub2,hub3 defined.
But, when i use the dts from the truck. It will not move. I have place the truck and it does not appear to be stuck. Although it's size is large compared to the original buggy - not sure that matters.
Anything I am missing? I figured a new model would at least move as long as it had wheels. May not have animation ect...
I have set my FPS game up to have a buggy included and my player can mount it with the "E".. Used most of the resources and I can drive the buggy just fine once I mount it.
Si, I went to milkshape and exported a Dodge Ram pickup I had. Of course I had mount0 as well as hub0,hub1,hub2,hub3 defined.
But, when i use the dts from the truck. It will not move. I have place the truck and it does not appear to be stuck. Although it's size is large compared to the original buggy - not sure that matters.
Anything I am missing? I figured a new model would at least move as long as it had wheels. May not have animation ect...
#2
I think the car has control, as the only thing I am doing is swapping DTS files.
My guess is I have something not right in the model. I am assuming I set the coordinates correctly.
I am thinking this is a DTS model setup problem and either a missing mount point or something.
01/11/2006 (4:11 pm)
@Ben thanks....I think the car has control, as the only thing I am doing is swapping DTS files.
My guess is I have something not right in the model. I am assuming I set the coordinates correctly.
I am thinking this is a DTS model setup problem and either a missing mount point or something.
#3
function Armor::onMount(%this,%obj,%vehicle,%node)
{
if (%node == 0) {
%obj.setTransform("0 0 0 0 0 1 0");
%obj.setActionThread(%vehicle.getDatablock().mountPose[%node],true,true);
%obj.lastWeapon = %obj.getMountedImage($WeaponSlot);
%obj.unmountImage($WeaponSlot);
%obj.setControlObject(%vehicle);
%obj.client.setObjectActiveImage(%vehicle, 2);
}
}
I get the error setObjectActiveImage unknown command..
However, I do get this with both models, so it may be unrelated, but this is the only error in the console.
01/11/2006 (6:34 pm)
I did find this in the console, This is from a resource so if I don't get a response here I will try the resource link.function Armor::onMount(%this,%obj,%vehicle,%node)
{
if (%node == 0) {
%obj.setTransform("0 0 0 0 0 1 0");
%obj.setActionThread(%vehicle.getDatablock().mountPose[%node],true,true);
%obj.lastWeapon = %obj.getMountedImage($WeaponSlot);
%obj.unmountImage($WeaponSlot);
%obj.setControlObject(%vehicle);
%obj.client.setObjectActiveImage(%vehicle, 2);
}
}
I get the error setObjectActiveImage unknown command..
However, I do get this with both models, so it may be unrelated, but this is the only error in the console.
#4
01/11/2006 (6:49 pm)
Make sure the wheels are not intersecting the collision mesh for the car (i.e the wheels touching the wheel arches).
#5
I will check that tonight. I actually have moved the wheels way behind the body of the vehicle. Almost comical to no effect, I figured it might have something to do with the wheels as well.
Thanks
01/12/2006 (4:13 am)
@Westy I will check that tonight. I actually have moved the wheels way behind the body of the vehicle. Almost comical to no effect, I figured it might have something to do with the wheels as well.
Thanks
#6
Oh well, sometimes it's the simple things...
01/12/2006 (4:14 pm)
OK figured it out. exported vehicle with a visible collisoin box and found out the box was actually touching the ground under the model. That is what it was hangining on. I simply moved the hub? mounts down some and it started moving.Oh well, sometimes it's the simple things...
#7
01/13/2006 (6:15 am)
Glad you got it sorted!
#8
01/13/2006 (3:48 pm)
Yea.. Now to figure out why it doesn't turn :)
Torque Owner Ben R Vesco
function GameConnection::createCar(%this, %spawnPoint) { . . . %this.setControlObject(%car); . . . }