Hi, I’ve managed to implement networking with a questionable amount of success in my project, but I’ve gotten hung up on the player’s dash ability. I’m getting an error when trying to create a Server RPC which passes in an FVector2D as a parameter. The dash ability can be aimed in any direction, and so needs both axes. What I find weird is that I have a regular, single axis binding that works perfectly fine over the network.
// In MaximumTopSpinBall.h
protected:
/** Action Bound. Calls server dash with
FVector2D(left/right axis input, up/down axis input) */
void DashHandoff();
/** Axis Bound. Called for side to side input */
UFUNCTION(Server, Reliable, WithValidation)
void ServerMoveRight(float Val);
/** Handle dash action. */
UFUNCTION(Server, Reliable, WithValidation)
void ServerDash(const FVector2D AxesTilt);
(Line 46 of MaximumTopSpinBall.h is ‘GENERATED_BODY()’, if that helps.)
I’ve tried having the ‘AxesTilt’ stored as a replicated UProperty, but when I tried creating a ServerSet RPC that takes in two floats for that, I got the same incompatible error.
I can’t figure out how to make this work. Can I not use parameters with RPCs? Why is ‘ServerMoveRight’ accepting a parameter when nothing else will?