I am using default blueprint vehicle project.I want to change the throttle input in cpp generated code so that it will update in blueprint.
I want to set desired throttle through the code.
I am using default blueprint vehicle project.I want to change the throttle input in cpp generated code so that it will update in blueprint.
I want to set desired throttle through the code.
I would create a blueprint pure ufunction which binds to the input axis (or thakes this as an float input), calculates the desired trottle, and gives that as the retunr. then you could plug that into the setTrottleInput
sorry I’m not on the pc today. you create a function in your header with something like:
UFUNCTION(BlueprintPure)
float GetCalculatedThrottle(float axisInput);
and code it something like:
…
return axisInput * YourMagicNumbers;
this gives you the function in BP which you can plug its output to the setTrottleInput node
The other way is to bind to the input event directly in code which I personally don’t like much…should be as an example in the vehicle cpp starter template.
Thank u very much… can u please explain it by images… It will be very helpful… Thank u in advance