UxtTwoHandManipulationScaleLogic
Implements a scale logic that will scale an object based on the ratio of the distance between hands: object_scale = start_object_scale * curr_hand_dist / start_hand_dist
Usage: When a manipulation starts, call Setup. Call Update with currently available grab pointers to get a new scale for the object.
class UxtTwoHandManipulationScaleLogic;
Header
#include <Interactions/Manipulation/UxtTwoHandScaleLogic.h>
Public Types
Name | |
---|---|
typedef const TArray< FUxtGrabPointerData > & | GrabPointers |
Public Functions
Name | |
---|---|
void | Setup(GrabPointers PointerData, const FVector & ObjectScale) |
FVector | Update(GrabPointers PointerData) const |
Public Types Documentation
typedef GrabPointers
typedef const TArray<FUxtGrabPointerData>& UxtTwoHandManipulationScaleLogic::GrabPointers;
Public Functions Documentation
function Setup
void Setup(
GrabPointers PointerData,
const FVector & ObjectScale
)
Sets up scale logic by storing initial object scale and hand distance
function Update
FVector Update(
GrabPointers PointerData
) const
Updates the scale based on the current grab pointer locations. Returns the new object scale.
Updated on 19 August 2021 at 17:42:52 Coordinated Universal Time