Skip to content

Commit

Permalink
Several Fixes from Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
hammy275 committed Sep 26, 2023
1 parent 69541e9 commit 207dd54
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ static VivecraftClientAPI getInstance() {
*
* @param controllerNum The controller number to trigger a haptic pulse. 0 is the primary controller, while 1 is
* the secondary controller.
* @param duration The duration of the haptic pulse in seconds.
* @param duration The duration of the haptic pulse in seconds. Note that this number is passed to the
* underlying VR API used by Vivecraft, and may act with a shorter length than expected beyond
* very short pulses.
* @param frequency The frequency of the haptic pulse in Hz. 160 is a safe bet for this number, with Vivecraft's codebase
* using anywhere from 160F for actions such as a bite on a fishing line, to 1000F for things such
* as a chat notification.
Expand All @@ -87,7 +89,9 @@ static VivecraftClientAPI getInstance() {
*
* @param controllerNum The controller number to trigger a haptic pulse. 0 is the primary controller, while 1 is
* the secondary controller.
* @param duration The duration of the haptic pulse in seconds.
* @param duration The duration of the haptic pulse in seconds. Note that this number is passed to the
* underlying VR API used by Vivecraft, and may act with a shorter length than expected beyond
* very short pulses.
*/
default void triggerHapticPulse(int controllerNum, float duration) {
triggerHapticPulse(controllerNum, duration, 160F, 1F, 0F);
Expand Down Expand Up @@ -147,7 +151,7 @@ default void triggerHapticPulse(int controllerNum, float duration) {
* @return The historical VR data for the player's controller, or null if the player isn't in VR.
*/
@Nullable
default VRPoseHistory getHistoricalVRControllerData(InteractionHand hand) {
default VRPoseHistory getHistoricalVRControllerPoses(InteractionHand hand) {
return getHistoricalVRControllerPoses(hand.ordinal());
}

Expand All @@ -157,7 +161,7 @@ default VRPoseHistory getHistoricalVRControllerData(InteractionHand hand) {
* @return The historical VR data for the player's primary controller, or null if the player isn't in VR.
*/
@Nullable
default VRPoseHistory getHistoricalVRController0Data() {
default VRPoseHistory getHistoricalVRController0Poses() {
return getHistoricalVRControllerPoses(0);
}

Expand All @@ -167,7 +171,7 @@ default VRPoseHistory getHistoricalVRController0Data() {
* @return The historical VR data for the player's secondary controller, or null if the player isn't in VR.
*/
@Nullable
default VRPoseHistory getHistoricalVRController1Data() {
default VRPoseHistory getHistoricalVRController1Poses() {
return getHistoricalVRControllerPoses(1);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public interface VRPoseHistory {
int MAX_TICKS_BACK = 20;

/**
* @return The amount of ticks worth of history being held.
* @return The amount of ticks worth of history being held. The number returned by this methodwill never be higher
* than {@link VRPoseHistory#MAX_TICKS_BACK}, however can be lower than it.
*/
int ticksOfHistory();

Expand Down
3 changes: 2 additions & 1 deletion common/src/main/java/org/vivecraft/api/data/VRData.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

/**
* Represents all VR data associated with a given player, mainly the pose of the HMD and both controllers
* of the player.
* of the player. If the player is in seated mode, controller 1 carries the HMD's data, and controller 0 is
* based on the direction being looked at via the mouse pointer.
*/
public interface VRData {

Expand Down

0 comments on commit 207dd54

Please sign in to comment.