Provides the ability for the SDK Camera Rig to be thrown around with a jumping motion by slingshotting based on the pull back of each valid controller.
VRTK_PlayerClimb- A Player Climb script for dealing with the physical throwing of the play area as if throwing off an invisible climbed object.
VRTK_BodyPhysics- A Body Physics script to deal with the effects of physics and gravity on the play area.
VRTK_BasicTeleport- A Teleporter script to use when snapping the play area to the nearest floor when releasing from grab.
VRTK_HeadsetCollision- A Headset Collision script to determine when the headset is colliding with geometry to know when to reset to a valid location.
VRTK_PositionRewind- A Position Rewind script to utilise when resetting to a valid location upon ungrabbing whilst colliding with geometry.
- Place the
VRTK_SlingshotJumpscript on the same GameObject as the
- Release Window Time: How close together the button releases have to be to initiate a jump.
- Velocity Multiplier: Multiplier that increases the jump strength.
- Velocity Max: The maximum velocity a jump can be.
SlingshotJumped- Emitted when a slingshot jump occurs
VRTK_SlingshotJump_UnityEvents component to
VRTK_SlingshotJump object allows access to
UnityEvents that will react identically to the Class Events.
- All C# delegate events are mapped to a Unity Event with the
public virtual VRTK_ControllerEvents.ButtonAlias GetActivationButton()
VRTK_ControllerEvents.ButtonAlias- Returns the button used for slingshot activation.
The SetActivationButton method gets the button used to activate a slingshot jump.
public virtual void SetActivationButton(VRTK_ControllerEvents.ButtonAlias button)
VRTK_ControllerEvents.ButtonAlias button- The controller button to use to activate the jump.
The SetActivationButton method sets the button used to activate a slingshot jump.
public virtual VRTK_ControllerEvents.ButtonAlias GetCancelButton()
VRTK_ControllerEvents.ButtonAlias- Returns the button used to cancel a slingshot jump.
The GetCancelButton method gets the button used to cancel a slingshot jump.
public virtual void SetCancelButton(VRTK_ControllerEvents.ButtonAlias button)
VRTK_ControllerEvents.ButtonAlias button- The controller button to use to cancel the jump.
The SetCancelButton method sets the button used to cancel a slingshot jump.
VRTK/Examples/037_CameraRig_ClimbingFalling shows how to set up a scene with slingshot jumping. This script just needs to be added to the PlayArea object and the requested forces and buttons set.
Updated less than a minute ago