|
Head Mounted VR 3.0
|
Grab Component class. More...
#include <VR_GrabComponent.h>
Inheritance diagram for UVR_GrabComponent:Public Member Functions | |
| UVR_GrabComponent () | |
| virtual void | DoDebugVisualize () |
| virtual bool | IsColliding_Implementation () |
| virtual bool | IsGrabbed_Implementation () |
| virtual bool | CanPullGrab_Implementation () |
| void | OnHitCheckColliding (UPrimitiveComponent *HitComponent, AActor *OtherActor, UPrimitiveComponent *OtherComp, FVector normalImpulse, const FHitResult &Hit) |
| virtual void | TickComponent (float DeltaTime, ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override |
| virtual void | Grab_Implementation (class UVR_HandComponent *MotionController, bool &HandleStatus, bool bFroceAttachHandle) |
| Grab Implementation. | |
| virtual void | Drop_Implementation (class UVR_HandComponent *MotionController) |
| Disconect object from Hand. | |
| void | MoveHandToSocketPosition () |
| Grab object using physics constraint method and socket.(Object snaps to taget) Physics , force attach. | |
| void | GrabAnimatedNearSocket () |
| Search for nearest socket from array. | |
| void | MoveHandTo (FVector Location, FRotator Rotation) |
| void | GrabAnimatedComponent () |
| FTransform | GetHandToComponentTransform (EControllerHand Hand, FVector HandRootOffset) |
| FTransform | GetHandToSocketTransform (EControllerHand Hand) |
| FTransform | GetPrimitiveSnapDesiredTransform (UVR_HandComponent *Hand, EGrabSnapType SnapType, bool PositionBasedOnly=false) |
| FTransform | GetInvertedTransformByAxis (FTransform T, EAxies Axies=EAxies::Y, FVector OriginOffset=FVector::Zero()) |
| void | DropAnimated () |
| Drops with static animation. | |
| void | Drop_PhysicsConstraintAnimatedNearSocket () |
| void | ForceDrop () |
| Disconnects constraints. | |
| virtual void | PickUpScript () |
| Executes before PickUp. Function can be overridden. | |
| virtual void | DropScript () |
| Executes before Drop. Function can be overridden. | |
| void | CheckEAnimationType () |
| Checks animation type for Drop_PhysicsConstraintAnimatedNearSocket. | |
| void | SetBothHands (bool BothHands) |
| If true player can pick an object using two hands. | |
| void | EnablePullGrab (bool Enable) |
| void | EnableBlockPullGrab (bool Enable) |
| void | SetAllowPickUp (bool PickUpStatus) |
| Sets bSetAllowPickUp(If true player can Grab) | |
| void | RunJustDropTimer () |
| Sets true for bJustDroped for a short time(Usefull if we need to put somthing in inventory). | |
| FORCEINLINE UAnimSequence * | GetGrabAnimation () const |
| Get PickUp Animations. | |
| FORCEINLINE EAnimationType | GetAnimationType () const |
| FORCEINLINE UVR_HandComponent * | GetHandActor () const |
| FORCEINLINE bool | GetInHand () const |
| Get PickUp Animations. | |
| FORCEINLINE bool | GetJustDroped () const |
| FORCEINLINE bool | CanPlayerStepOn () const |
| FORCEINLINE FName | GetLeftHandSocketName () const |
| FORCEINLINE FName | GetRightHandSocketName () const |
| FORCEINLINE uint8 | GetNumOfHandsAttached () const |
| FORCEINLINE bool | GetCanPutInInventory () const |
| FORCEINLINE bool | GetCanNPCInteract () const |
| FORCEINLINE bool | CanBothHandsGrab () const |
| FORCEINLINE int | GetGrabPriority () const |
| FORCEINLINE float | GetMaxInteractionDistance () const |
| FORCEINLINE bool | IsDropAllowed () const |
| FORCEINLINE bool | GetPullGrabEnabled () const |
| FORCEINLINE bool | IsAutoHandRotation () const |
| FORCEINLINE bool | IsCheckingChildCollision () const |
| void | SetLockMotion (bool LockMotion, bool LockOneRotationAxis=false, EAxies Axis=EAxies::Y) |
| void | SetHandConstraintMode (int Mode) |
| bool | GetChildCollisions (TArray< UShapeComponent * > &ShapeComponents) |
| bool | InInteractionDistance (FVector Location, FRotator Rot, float &Distance) |
| bool | IsParentSimulatesPhysics () |
| void | DrawCollisionDebug () |
| void | ActivateCanDamagePlayers () |
| void | TriggerPressed () |
| void | APressed () |
| void | BPressed () |
| void | GrabPressed () |
| void | ThumbPressed () |
| void | TriggerReleased () |
| void | AReleased () |
| void | BReleased () |
| void | GrabReleased () |
| void | TriggerChange (float Value) |
| void | ThumbstickChange (float ValueX, float ValueY) |
| void | UpdateHitEvents () |
| virtual void | BeginPlay () override |
| virtual void | EndPlay (const EEndPlayReason::Type EndPlayReason) override |
| UPROPERTY (EditAnywhere, BlueprintReadWrite, Category="Grab|Snap", meta=(AllowPrivateAccess="true", EditCondition="GrabPosition != EGrabPosition::NearSurface && ExactPosition == EExactPosition::Component || (bUsePrimitiveSnap && PrimitiveSnapType == EGrabSnapType::Points)", EditConditionHides)) bool bClosestAngle | |
| bool | IsPointInGrabVolumes (const FVector &Point) const |
| If true, checks if the hand's grab root is inside any attached grab volumes during grab priority checks. | |
| virtual void | OnRegister () override |
Public Member Functions inherited from IVR_InteractionInterface | |
| bool | IsGrabbed () |
| bool | CanPullGrab () |
| void | Grab (class UVR_HandComponent *MotionController, bool &HandleStatus, bool bFroceAttachHandle) |
| Used for interaction with objects such as door. | |
| bool | IsColliding () |
| void | Drop (class UVR_HandComponent *MotionController) |
| Stop object interaction. | |
| void | Shoot () |
| bool | IsHeldBy (class UVR_HandComponent *MotionController) |
| Indetify if object is held by MotionController. | |
| bool | CanNonVRInteract () |
| bool | ForceCheckForGrabComponents () |
| void | NonVRInteraction (AVR_Player *Player) |
| bool | IsNonVRInteractTillStop () |
| void | Stop_NonVRInteraction (AVR_Player *Player) |
| Stop object interaction. | |
Public Attributes | |
| FComponentTriggerPressed | OnComponentTriggerPressed |
| FComponentAPressed | OnComponentAPressed |
| FComponentBPressed | OnComponentBPressed |
| FComponentGrabPressed | OnComponentGrabPressed |
| FComponentThumbstickPressed | OnComponentThumbstickPressed |
| FComponentTriggerReleased | OnComponentTriggerReleased |
| FComponentAReleased | OnComponentAReleased |
| FComponentBReleased | OnComponentBReleased |
| FComponentGrabReleased | OnComponentGrabReleased |
| FComponentTriggerChange | OnComponentTriggerChange |
| FComponentThumbstickReleased | OnComponentThumbstickReleased |
| FComponentThumbstickChange | OnComponentThumbstickChange |
| FComponentOnTick | OnTick |
| bool | bBlockOtherTriggerEvents |
| bool | bBlockOtherA_Events |
| bool | bBlockOtherB_Events |
| bool | bBlockOtherThumbEvents |
| bool | bBlockOtherThumbChangeEvents |
| UPrimitiveComponent * | ParentComponent |
| EGrabPosition | GrabPosition |
| EExactPosition | ExactPosition |
| bool | bBothHands |
| bool | EnablePriority |
| bool | bOnlyOneHand |
| EControllerHand | HandCanInteract |
| int | GrabPriority |
| float | MaxComponentInteractionDistance |
| bool | bAimToGrabForThisComponent |
| float | AimToGrabDistance |
| bool | bAllowTeleportWith |
| bool | bCanPullGrab |
| bool | bCanPlayerStepOn |
| bool | bAllowPickUp |
| bool | CanPutInInventory |
| bool | bAllowTriggerGrab |
| bool | WeldWithHand |
| bool | LowerAttachedStrength |
| int | LowStrengthMode |
| float | StrengthPositionDevision |
| float | StrengthAngularDevision |
| bool | bAttach |
| bool | ContraintMotionUnlocked |
| bool | bLockOneRotationAxis |
| EAxies | LockOnlyAxisForRotation |
| EAxies | LeftHandReflectAxis |
| bool | UseHandGrabOffset |
| FVector | GrabOriginOffset |
| bool | bUsePrimitiveSnap |
| Enables or disables primitive snapping for the grab component. | |
| EGrabSnapType | PrimitiveSnapType |
| Determines the type of primitive snapping (e.g., Axis, Plane). | |
| FVector | SnapAxis |
| The axis used for snapping when Axis snapping is enabled. | |
| FVector | SnapPlaneNormal |
| The normal vector of the plane used for snapping when Plane snapping is enabled. | |
| FVector | SnapAxisCenter |
| The center of the axis used for snapping when Axis snapping is enabled. | |
| FVector | SnapAxisDir |
| The direction of the axis used for snapping when Axis snapping is enabled. | |
| float | AxisLength |
| The length of the axis used for snapping when Axis snapping is enabled. | |
| bool | bUseCylinderSnap |
| Enables or disables cylinder snapping along the axis. | |
| float | CylinderRadius |
| The radius of the cylinder used for snapping when Cylinder snapping is enabled. | |
| TArray< FTransform > | SnapPoints |
| float | AngularPointDifference |
| Angular difference for snap in radians. | |
| FVector2D | PlaneExtents |
| The extents of the plane used for snapping when Plane snapping is enabled. | |
| bool | RectangleCustomUpVector |
| Enables or disables the use of a custom up vector for the plane. | |
| FVector | RectangleCustomUpVectorDirection |
| Specifies the direction of the custom up vector for the plane. | |
| EAnimationType | AnimationType |
| EPickUpAnimations | GrabAnimationType |
| int | IK_Animation_ID |
| UAnimSequence * | GrabAnimation |
| UAnimSequence * | GrabAPressAnimation |
| UAnimSequence * | GrabBPressAnimation |
| UAnimSequence * | GrabTriggerPressAnimation |
| TArray< UAnimSequence * > | SnapGrabAnimations |
| TArray< UAnimSequence * > | SnapGrabAPressAnimation |
| TArray< UAnimSequence * > | SnapGrabBPressAnimation |
| TArray< UAnimSequence * > | SnapTriggerPressAnimations |
| bool | AutoHandRotation |
| bool | CheckForChildCollision |
| bool | bCanNPCInteract |
| FName | LeftHandSocketName |
| FName | RightHandSocketName |
| TArray< FName > | SocketArray |
| TArray< UAnimSequence * > | PickUpAnimationArray |
| float | SocketInRadius |
| bool | AllowDrop |
| bool | bAllowNonVR |
| ENonVRGrabTypes | NonVRGrabType |
| bool | bDebug |
| bool | bIsColliding = false |
| float | DefaultMass |
| class UVR_HandComponent * | HandComponent |
Protected Member Functions | |
| void | ApplyPrimitveSnapping () |
| UVR_GrabComponent::UVR_GrabComponent | ( | ) |
| void UVR_GrabComponent::ActivateCanDamagePlayers | ( | ) |
|
protected |
| void UVR_GrabComponent::APressed | ( | ) |
| void UVR_GrabComponent::AReleased | ( | ) |
|
overridevirtual |
| void UVR_GrabComponent::BPressed | ( | ) |
| void UVR_GrabComponent::BReleased | ( | ) |
|
inline |
|
inline |
|
inlinevirtual |
| void UVR_GrabComponent::CheckEAnimationType | ( | ) |
Checks animation type for Drop_PhysicsConstraintAnimatedNearSocket.
|
virtual |
| void UVR_GrabComponent::DrawCollisionDebug | ( | ) |
|
virtual |
Disconect object from Hand.
| void UVR_GrabComponent::Drop_PhysicsConstraintAnimatedNearSocket | ( | ) |
| void UVR_GrabComponent::DropAnimated | ( | ) |
Drops with static animation.
|
virtual |
Executes before Drop. Function can be overridden.
| void UVR_GrabComponent::EnableBlockPullGrab | ( | bool | Enable | ) |
| void UVR_GrabComponent::EnablePullGrab | ( | bool | Enable | ) |
|
overridevirtual |
| void UVR_GrabComponent::ForceDrop | ( | ) |
Disconnects constraints.
|
inline |
|
inline |
|
inline |
| bool UVR_GrabComponent::GetChildCollisions | ( | TArray< UShapeComponent * > & | ShapeComponents | ) |
|
inline |
Get PickUp Animations.
|
inline |
|
inline |
| FTransform UVR_GrabComponent::GetHandToComponentTransform | ( | EControllerHand | Hand, |
| FVector | HandRootOffset ) |
| FTransform UVR_GrabComponent::GetHandToSocketTransform | ( | EControllerHand | Hand | ) |
|
inline |
Get PickUp Animations.
| FTransform UVR_GrabComponent::GetInvertedTransformByAxis | ( | FTransform | T, |
| EAxies | Axies = EAxies::Y, | ||
| FVector | OriginOffset = FVector::Zero() ) |
|
inline |
|
inline |
|
inline |
|
inline |
| FTransform UVR_GrabComponent::GetPrimitiveSnapDesiredTransform | ( | UVR_HandComponent * | Hand, |
| EGrabSnapType | SnapType, | ||
| bool | PositionBasedOnly = false ) |
|
inline |
|
inline |
|
virtual |
Grab Implementation.
| MotionController | Hand which wants to grab |
| void UVR_GrabComponent::GrabAnimatedComponent | ( | ) |
| void UVR_GrabComponent::GrabAnimatedNearSocket | ( | ) |
Search for nearest socket from array.
| void UVR_GrabComponent::GrabPressed | ( | ) |
| void UVR_GrabComponent::GrabReleased | ( | ) |
| bool UVR_GrabComponent::InInteractionDistance | ( | FVector | Location, |
| FRotator | Rot, | ||
| float & | Distance ) |
|
inline |
|
inline |
|
virtual |
|
inline |
|
inlinevirtual |
| bool UVR_GrabComponent::IsParentSimulatesPhysics | ( | ) |
| bool UVR_GrabComponent::IsPointInGrabVolumes | ( | const FVector & | Point | ) | const |
If true, checks if the hand's grab root is inside any attached grab volumes during grab priority checks.
Checks if the specified point is inside any of the attached grab volumes.
| Point | The point to check (e.g., hand's grab root position) |
| void UVR_GrabComponent::MoveHandTo | ( | FVector | Location, |
| FRotator | Rotation ) |
| void UVR_GrabComponent::MoveHandToSocketPosition | ( | ) |
Grab object using physics constraint method and socket.(Object snaps to taget) Physics , force attach.
| void UVR_GrabComponent::OnHitCheckColliding | ( | UPrimitiveComponent * | HitComponent, |
| AActor * | OtherActor, | ||
| UPrimitiveComponent * | OtherComp, | ||
| FVector | normalImpulse, | ||
| const FHitResult & | Hit ) |
|
overridevirtual |
|
virtual |
Executes before PickUp. Function can be overridden.
| void UVR_GrabComponent::RunJustDropTimer | ( | ) |
Sets true for bJustDroped for a short time(Usefull if we need to put somthing in inventory).
| void UVR_GrabComponent::SetAllowPickUp | ( | bool | PickUpStatus | ) |
Sets bSetAllowPickUp(If true player can Grab)
| PhysStatus |
| void UVR_GrabComponent::SetBothHands | ( | bool | BothHands | ) |
If true player can pick an object using two hands.
| BothHands |
| void UVR_GrabComponent::SetHandConstraintMode | ( | int | Mode | ) |
| void UVR_GrabComponent::SetLockMotion | ( | bool | LockMotion, |
| bool | LockOneRotationAxis = false, | ||
| EAxies | Axis = EAxies::Y ) |
| void UVR_GrabComponent::ThumbPressed | ( | ) |
| void UVR_GrabComponent::ThumbstickChange | ( | float | ValueX, |
| float | ValueY ) |
|
overridevirtual |
| void UVR_GrabComponent::TriggerChange | ( | float | Value | ) |
| void UVR_GrabComponent::TriggerPressed | ( | ) |
| void UVR_GrabComponent::TriggerReleased | ( | ) |
| void UVR_GrabComponent::UpdateHitEvents | ( | ) |
| UVR_GrabComponent::UPROPERTY | ( | EditAnywhere | , |
| BlueprintReadWrite | , | ||
| Category | = "Grab|Snap", | ||
| meta | = (AllowPrivateAccess="true", EditCondition="GrabPosition != EGrabPosition::NearSurface && ExactPosition == EExactPosition::Component || (bUsePrimitiveSnap && PrimitiveSnapType == EGrabSnapType::Points)", EditConditionHides) ) |
| float UVR_GrabComponent::AimToGrabDistance |
| bool UVR_GrabComponent::AllowDrop |
| float UVR_GrabComponent::AngularPointDifference |
Angular difference for snap in radians.
| EAnimationType UVR_GrabComponent::AnimationType |
| bool UVR_GrabComponent::AutoHandRotation |
| float UVR_GrabComponent::AxisLength |
The length of the axis used for snapping when Axis snapping is enabled.
| bool UVR_GrabComponent::bAimToGrabForThisComponent |
| bool UVR_GrabComponent::bAllowNonVR |
| bool UVR_GrabComponent::bAllowPickUp |
| bool UVR_GrabComponent::bAllowTeleportWith |
| bool UVR_GrabComponent::bAllowTriggerGrab |
| bool UVR_GrabComponent::bAttach |
| bool UVR_GrabComponent::bBlockOtherA_Events |
| bool UVR_GrabComponent::bBlockOtherB_Events |
| bool UVR_GrabComponent::bBlockOtherThumbChangeEvents |
| bool UVR_GrabComponent::bBlockOtherThumbEvents |
| bool UVR_GrabComponent::bBlockOtherTriggerEvents |
| bool UVR_GrabComponent::bBothHands |
| bool UVR_GrabComponent::bCanNPCInteract |
| bool UVR_GrabComponent::bCanPlayerStepOn |
| bool UVR_GrabComponent::bCanPullGrab |
| bool UVR_GrabComponent::bDebug |
| bool UVR_GrabComponent::bIsColliding = false |
| bool UVR_GrabComponent::bLockOneRotationAxis |
| bool UVR_GrabComponent::bOnlyOneHand |
| bool UVR_GrabComponent::bUseCylinderSnap |
Enables or disables cylinder snapping along the axis.
| bool UVR_GrabComponent::bUsePrimitiveSnap |
Enables or disables primitive snapping for the grab component.
| bool UVR_GrabComponent::CanPutInInventory |
| bool UVR_GrabComponent::CheckForChildCollision |
| bool UVR_GrabComponent::ContraintMotionUnlocked |
| float UVR_GrabComponent::CylinderRadius |
The radius of the cylinder used for snapping when Cylinder snapping is enabled.
| float UVR_GrabComponent::DefaultMass |
| bool UVR_GrabComponent::EnablePriority |
| EExactPosition UVR_GrabComponent::ExactPosition |
| UAnimSequence* UVR_GrabComponent::GrabAnimation |
| EPickUpAnimations UVR_GrabComponent::GrabAnimationType |
| UAnimSequence* UVR_GrabComponent::GrabAPressAnimation |
| UAnimSequence* UVR_GrabComponent::GrabBPressAnimation |
| FVector UVR_GrabComponent::GrabOriginOffset |
| EGrabPosition UVR_GrabComponent::GrabPosition |
| int UVR_GrabComponent::GrabPriority |
| UAnimSequence* UVR_GrabComponent::GrabTriggerPressAnimation |
| EControllerHand UVR_GrabComponent::HandCanInteract |
| class UVR_HandComponent* UVR_GrabComponent::HandComponent |
| int UVR_GrabComponent::IK_Animation_ID |
| EAxies UVR_GrabComponent::LeftHandReflectAxis |
| FName UVR_GrabComponent::LeftHandSocketName |
| EAxies UVR_GrabComponent::LockOnlyAxisForRotation |
| bool UVR_GrabComponent::LowerAttachedStrength |
| int UVR_GrabComponent::LowStrengthMode |
| float UVR_GrabComponent::MaxComponentInteractionDistance |
| ENonVRGrabTypes UVR_GrabComponent::NonVRGrabType |
| FComponentAPressed UVR_GrabComponent::OnComponentAPressed |
| FComponentAReleased UVR_GrabComponent::OnComponentAReleased |
| FComponentBPressed UVR_GrabComponent::OnComponentBPressed |
| FComponentBReleased UVR_GrabComponent::OnComponentBReleased |
| FComponentGrabPressed UVR_GrabComponent::OnComponentGrabPressed |
| FComponentGrabReleased UVR_GrabComponent::OnComponentGrabReleased |
| FComponentThumbstickChange UVR_GrabComponent::OnComponentThumbstickChange |
| FComponentThumbstickPressed UVR_GrabComponent::OnComponentThumbstickPressed |
| FComponentThumbstickReleased UVR_GrabComponent::OnComponentThumbstickReleased |
| FComponentTriggerChange UVR_GrabComponent::OnComponentTriggerChange |
| FComponentTriggerPressed UVR_GrabComponent::OnComponentTriggerPressed |
| FComponentTriggerReleased UVR_GrabComponent::OnComponentTriggerReleased |
| FComponentOnTick UVR_GrabComponent::OnTick |
| UPrimitiveComponent* UVR_GrabComponent::ParentComponent |
| TArray<UAnimSequence*> UVR_GrabComponent::PickUpAnimationArray |
| FVector2D UVR_GrabComponent::PlaneExtents |
The extents of the plane used for snapping when Plane snapping is enabled.
| EGrabSnapType UVR_GrabComponent::PrimitiveSnapType |
Determines the type of primitive snapping (e.g., Axis, Plane).
| bool UVR_GrabComponent::RectangleCustomUpVector |
Enables or disables the use of a custom up vector for the plane.
| FVector UVR_GrabComponent::RectangleCustomUpVectorDirection |
Specifies the direction of the custom up vector for the plane.
| FName UVR_GrabComponent::RightHandSocketName |
| FVector UVR_GrabComponent::SnapAxis |
The axis used for snapping when Axis snapping is enabled.
| FVector UVR_GrabComponent::SnapAxisCenter |
The center of the axis used for snapping when Axis snapping is enabled.
| FVector UVR_GrabComponent::SnapAxisDir |
The direction of the axis used for snapping when Axis snapping is enabled.
| TArray<UAnimSequence*> UVR_GrabComponent::SnapGrabAnimations |
| TArray<UAnimSequence*> UVR_GrabComponent::SnapGrabAPressAnimation |
| TArray<UAnimSequence*> UVR_GrabComponent::SnapGrabBPressAnimation |
| FVector UVR_GrabComponent::SnapPlaneNormal |
The normal vector of the plane used for snapping when Plane snapping is enabled.
| TArray<FTransform> UVR_GrabComponent::SnapPoints |
| TArray<UAnimSequence*> UVR_GrabComponent::SnapTriggerPressAnimations |
| TArray<FName> UVR_GrabComponent::SocketArray |
| float UVR_GrabComponent::SocketInRadius |
| float UVR_GrabComponent::StrengthAngularDevision |
| float UVR_GrabComponent::StrengthPositionDevision |
| bool UVR_GrabComponent::UseHandGrabOffset |
| bool UVR_GrabComponent::WeldWithHand |