Velocity at point (or child) in BP

I’m trying to get the point velocity of the corner of a hovering platform to dampen forces applied. And, any child I add to use as a reference point always returns 0s (probably local velocity) when using the Get Component Velocity BP node. Are there any solutions to this in UE?

That blueprint function internally calls GetUnrealWorldVelocity() on the associated body instance of the component. I’m guessing you want a call to GetUnrealWorldVelocityAtPoint of that body instance. It is not exposed to blueprint, but you could modify the source and expose it if desired.

The code would be something like:
in header of primitive component:

UFUNCTION(BlueprintCallable, Category = "Utilities|Transformation")
virtual FVector GetComponentVelocityAtPoint(const FVector& Point) const;

In implementation:

FVector UPrimitiveComponent::GetComponentVelocityAtPoint(const FVector& Point) const
{
	if (IsSimulatingPhysics())
	{
		FBodyInstance* BodyInst = GetBodyInstance();
		if(BodyInst != NULL)
		{
			return BodyInst->GetUnrealWorldVelocityAtPoint(Point);
		}
	}

	return FVector::ZeroVector;
}

Ah, nice. It’s solutions like this that make me feel like I should switch to using primarily C++. It simplifies a lot. Thanks.

This is how you can do it in BP. But be aware that you need to know location of your point relative to center of mass not to the model origin (0,0,0), unless you have both of them at origin.

Thanks. Might help people making content-only games or games that heavily rely on point velocity. Ultimately, I just extended a C++ class in my case before eventually changing my hover method altogether.

Yes, that was the intention. I was stuck myself until realized that you need to convert to radians. Almost went for C++ because of this :slight_smile: