PrimitiveComponent::SetSimulatePhysics is missing BoneName Parameter, or comment needs to be updated

Dear Friends at Epic,

In PrimitiveComponent.h there is:

/** 
	 *	Sets whether or not a single body should use physics simulation, or should be 'fixed' (kinematic).
	 *
	 *	@param	bSimulate	New simulation state for single body
	 *	@param	BoneName	If a SkeletalMeshComponent, name of body to modify. 'None' indicates root body.
	 */
	UFUNCTION(BlueprintCallable, Category="Physics")
	virtual void SetSimulatePhysics(bool bSimulate);

Where is the BoneName Parameter?

How do I activate simulation on individual bone names for lack of this parameter?

Rama

#Edit

ahhh I think I use these two for partial rag doll

/**
	 *	'Wake' physics simulation for a single body.
	 *	@param	BoneName	If a SkeletalMeshComponent, name of body to wake. 'None' indicates root body.
	 */
	UFUNCTION(BlueprintCallable, Category="Physics")
	void WakeRigidBody(FName BoneName = NAME_None);

	/** 
	 *	Force a single body back to sleep. 
	 *	@param	BoneName	If a SkeletalMeshComponent, name of body to put to sleep. 'None' indicates root body.
	 */
	UFUNCTION(BlueprintCallable, Category="Physics")
	void PutRigidBodyToSleep(FName BoneName = NAME_None);

Hi, Rama,

To do partial ragdoll, make sure the whole actor isn’t simulating. (SetSimulatePhysics(false))
And only enable partial by calling this function.

/** Set all of the bones below passed in bone to be simulated */
UFUNCTION(BlueprintCallable, Category="Physics")
void SetAllBodiesBelowSimulatePhysics(const FName& InBoneName, bool bNewSimulate );

However, there was a bug where it doesn’t activate blending when that happens. If this doesn’t work for you, make sure to call this function to enable physics blending.

/** Set all of the bones below passed in bone to be simulated */
UFUNCTION(BlueprintCallable, Category="Physics")
void SetAllBodiesBelowPhysicsBlendWeight(const FName& InBoneName, float PhysicsBlendWeight, bool bSkipCustomPhysicsType = false );

Still I feel WakeRigidBody/PutRigidBodyToSleep and simulate flag is somewhat confusing. I’ll add TTP to clear that up.

Thanks,

–Lina,

Thank you for the detailed info Lina!

:slight_smile:

Rama