Kanda Players 0.7.0
|
In PC interaction, there are several ways to grab entities, all of which requires hovering on them.
Q
) keyboard buttonGrabbing: Q button works like a toggle, so after hovering on an entity and press Q, the entity will be grabbed. User does not need to keep pressing Q button.
Un-grabbing: While the entity is grabbed by pressing Q button, if the user press Q again or right mouse button, the entity will be ungrabbed.
If the user is not hovering on any entity, then any Q button press will be ignored.
KeyboardInputSystem
and MouseInputSystem
gets the keyboard and mouse inputs.PCRayInteractorInputClientSystem
updates the value of interactorInput.IsSecondaryActive
depending on if there is a hovered entity, and either of grab toggle or right mouse button is pressed.Interactions
package make use of value of interactorInput.IsSecondaryActive
to attach the object to interactor.