Page MenuHomeFeedback Tracker

CarController class is broken
Need More Info, UrgentPublic

Description

So, almost every "set" function in class CarController is not working

  • SetSteering
  • SetThrust

Only things that seems to be working are

  • ShiftUp/ShiftDown and ShiftTo

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce
HumanCommandVehicle vehCommand = GetGame().GetPlayer().GetCommand_Vehicle();
if ( vehCommand )
{
	Transport trans = vehCommand.GetTransport();
	if ( trans )
	{
		CarScript drivingVehicle;
		if ( Class.CastTo( drivingVehicle, trans ) )
		{
			CarController tctrl = drivingVehicle.GetController();
        		tctrl.SetSteering(0.5);
			tctrl.SetThrust(0.5, 0, 1);

			Print("GetThrust " + tctrl.GetThrust());
			Print("GetSteering " + tctrl.GetSteering());
		}
	}
}

Event Timeline

Camino created this task.Dec 7 2019, 2:25 PM
Geez changed the task status from New to Need More Info.Dec 9 2019, 4:04 PM
Geez added a subscriber: Geez.

Hello Camino.
Can you please describe what are you trying to achieve / what the code you have presented should do?
Regards,
Geez

Hello, i am trying to force the vehicle to move forward and steer itself without driver

Geez added a comment.Jan 6 2020, 1:04 PM

Hello Camino.
The code you have provided should work. Is it possible that you are calling this code only on the client? As this should be called on the server in order for it to work correctly.
Regards,
Geez