Calling an interface from Level Blueprint dont get values

Hi people!

Im trying to get angular and linear velocity from a Pawn to pass to another in the level blueprint using an interface.


Interface override in Pawn

assign values in Blueprint Pawn:

Call interface in Level Blueprint:

Printing always 0,0,0.

In those graphs, it appears as if the velocity values are set only once, on Event Begin Play. At that point in time, it would make sense for them to be 0,0,0 because nothing has happened yet. The variables in your pawn, Angular Velocity and Linear Velocity, are not reactive in the sense that they automatically update when something happens.

So, to fix this, your implementation of the interface function GetVelocity must make calls to GetPhysicsAngularVelocity and GetPhysicsLinearVelocity directly when the function is called, and return those (up to date) values.

Thanks Xenome, using GetPhysicsAngularVelocity and GetPhysicsLinearVelocity into the function that overrides interface works nice!