Waterbody Buoyancy component - Editing locked variables in blueprint?

I’m using the waterbody plugin with its buoyancy component for a boat actor.
I want to add a script that if the boat is killed that it will sink.

The way I hoped it could be accomplished was by getting the buoyancy component, and dragging off a “set buoyancy coefficient” node that would modify said variable to a value low enough so that it sinks, like how a real ship simply loses its buoyancy.

However, it seems that this variable cannot be accessed through the event graph.
Is there a way that I can still get access to it?

Right now I have to make a very complex workaround which is prone to glitching, so I’d prefer not to take that route and simply alter the responsible variable instead.

1 Like

I was also playing around with it and cannot get the buoyancy component to be disabled somehow. Same as you, no success accessing the buoyancy coefficient from blueprint. What you can do, however, is accessing the coefficient from C++:

BuoyancyController.h:

UFUNCTION(BlueprintCallable, Category = "Buoyancy")
void DisableBuoyancy(UBuoyancyComponent* buoyancy);

....
BuoyancyController.cpp:

#include "BuoyancyComponent.h"

void ABuoyancyController::DisableBuoyancy(UBuoyancyComponent* buoyancy)
{
	buoyancy->BuoyancyData.BuoyancyCoefficient = 0;	
}

and then call the function from Blueprint.