Author Topic: Non-turning wheels for Segway.  (Read 888 times)

I'm working on a segway vehicle and I'm having trouble keeping the wheels from turning but have the actual vehicle turn when driving. If I make the maxSteeringAngle = 0; then i can't turn at all, and if i leave it the wheels turn when i'm driving and it just looks weird on the segway.
I tried making the front wheels empty wheels, and the back wheels the segway wheels and then putting the mounts on top of each other but then the wheels get screwed up. I also tried making 4 invisible wheels at the front and at the back, and then 2 segway wheels in the middle but the segway wheels for some reason turn even though they weren't hub0 and hub1.

Any help on how to make the vehicle turn but have the wheels stay put?
« Last Edit: July 22, 2010, 04:01:49 PM by DarkStar »

There's functions to set the ability to steer and the ability to 'drive' on specific wheels on a vehicle.

But if I just make the wheels drive instead of steer I can't turn anywhere, or can I? I'm just going to keep trying to mount invisible wheels that steer it, and then visible wheels that just drive.
Going to leave this topic open though.

edit: ok i got 2 invisible wheels to steer and 2 invisible wheels to drive but my 2 wheels that aren't supposed to steer still turn, is there a function that can make them not turn? I put this at the end of my script:

Code: [Select]
function segwayVehicle::onAdd(%this,%obj)
{
%obj.setWheelTire(0, emptytire);
%obj.setWheelTire(1, emptytire);
%obj.setWheelTire(2, segwaytire);
%obj.setWheelTire(3, segwaytire);

%obj.setWheelSpring(0, segwaySpring);
%obj.setWheelSpring(1, segwaySpring);
%obj.setWheelSpring(2, segwaySpring);
%obj.setWheelSpring(3, segwaySpring);

%obj.setWheelSteering(0,1);

%obj.setWheelPowered(0,true);
    %obj.setWheelPowered(1,true);
%obj.setWheelPowered(2,true);
    %obj.setWheelPowered(3,true);
}
« Last Edit: July 22, 2010, 05:04:01 PM by DarkStar »

That's because you haven't added %obj.setWheelSteering(0,<wheel #>); for the wheels that are not to steer, they default to steering.

Oh, I was reading it wrong. I fixed it by putting the steering hubs right in front of the back hubs, but thanks anyway.