I’m trying to have time small bit of code work
RealVehicleMovementComponent.h
#include "CoreMinimal.h"
#include "ChaosWheeledVehicleMovementComponent.h"
#include "RealVehicleMovementComponent.generated.h"
/**
*
*/
UCLASS()
class PISSS_API URealVehicleMovementComponent : public UChaosWheeledVehicleMovementComponent
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category = Vehicle)
void SetDriveTorque(float DriveTorque, int32 WheelIndex);
};
RealVehicleMovementComponent.cpp
#include "RealVehicleMovementComponent.h"
#include "ChaosWheeledVehicleMovementComponent.h"
#include "PhysicalMaterials/PhysicalMaterial.h"
#include "VehicleAnimationInstance.h"
#include "ChaosVehicleManager.h"
#include "ChaosVehicleWheel.h"
#include "SuspensionUtility.h"
#include "SteeringUtility.h"
#include "Chaos/ChaosEngineInterface.h"
void URealVehicleMovementComponent::SetDriveTorque(float DriveTorque, int32 WheelIndex)
{
UChaosVehicleWheel* Wheel = WheelSetups[WheelIndex].WheelClass.GetDefaultObject();
auto& PWheel = PVehicle->Wheels[WheelIndex];
PWheel.SetDriveTorque(DriveTorque);
}
and when I trigger the Set drive torque function it dropped an error
UE4Editor-Chaos.pdb contains the debug information required to find the source for the module UE4Editor-Chaos.dll
so I got Editor Symbols for Debugging installed and it started working at leas a bit so I’m guessing it worked but Maybe I was supposed to do something else so I’m mentioning it
now when I run the function the code triggers a break point at an ensure that confuses me a lot.
if anyone needs the breakpoints I can send them over but they are always different and I have no clue what’s happening.