Can I change DriveLinearVelocityTarget at runtime?

In Blueprint, I don’t think it’s possible to change DriveLinearVelocityTarget in tick event.

I search for code in ConstraintInstance, so what is the right way to achieve this?

Should I call InitConstraint/PxD6JointCreate as soon as I change DriveLinearVelocityTarget in tick function?
Thanks.

Hello mylkrex,

All D6 joint constraint functionality is encapsulated in APhysicsConstraintActor. You should not manually call PhysX functions.
To change DriveLinearVelocitTarget you can try this code

MyPhysicsConstraintActor->ConstraintComp->SetLinearVelocityTarget(FVector(0, 0, 0));

Best regards,

Thanks, It works!