top of page

VR Button

This is a physic base button class. Can be used in the game world or as a child actor component.

Class name:

Include:

Type:

Lines of code:

AVR_Button

#include "VR/VR_Actors/VR_Button.h"

Interactable Actor

269

​General Information

Description

VR Button is a class which is fundamental for all buttons. The class uses Physics Constraint Component to achieve physics interactions.


VR button is a class which is fundamental for all buttons. The class uses Physics Constraint Component to achieve physics interactions.
VR Button Demo Example

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).
VR Button Components

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).


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).
VR Button Settings

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.


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.
Do On Pressed Event of VR Button

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

bottom of page