General Information
Description
VR Button is a class which is fundamental for all buttons. The class uses Physics Constraint Component to achieve physics interactions.
Components
Body_Mesh - This is a button mesh wich is a Static Mesh Component.
Body_PhysicsConstraint - This is a Physics Constraint Component which connects button mesh(Body_Mesh ) with the parent (Parent_Actor).
Settings
Parent Actor - This is a Static Mesh variable to which button will be connected by using Physics Constraint Component(Body_PhysicsConstraint).
Fall In Distance - This is a float value which indicates how deep the button can go.
Return Force - This is a float value which indicates return to initial position force.
Velocity Strength - This is a float value which indicates velocity strength.
Max Force - This is a float value which indicates maximum return force value.
Do Once Press - This is a bool value which indicates if button can be pressed only once.
Slide Direction - This is a vector value which indicates in what direction button can be pushed(-1 means inverted direction).
Events
Do On Pressed - This is an event which can be defined and playes each time(or once if Do Once Press variable is set to true) button is pressed.
Blueprint API Reference
Public Member Functions
Set Parent
Input
AStaticMeshActor* ParentActor
Set Parent Component
Input
UPrimitiveComponent* PrimitiveParentComponent
Is Pressed
Output
bool
Update Return Force
Input
float Force
float Velocity
float Max_Force
Public Attributes
float FallInDistance
float ReturnForce
float VelocityStrength
float MaxForce
FVector SlideDirection
Protected Attributes
class USceneComponent * RootScene
class UStaticMeshComponent * Body_Mesh
class UPhysicsConstraintComponent * Body_PhysicsConstraint
class AStaticMeshActor * Parent_Actor
FVector PrevLoc