Hey everyone,
Pick Up Plus Inspect - PUPI](Pick Up Plus Inspect in Blueprints - UE Marketplace) is new version of our first marketplace content known as Pick Up Physics Object - PUPO, with lots of new features :). With this blueprint you can add physics based interactivity and inspect feature to your project in a few minutes. PUPI supports VR for UE4.11+.
Preview:
Features:
- Access events of PUPI from other actors and extend functionality by using pre-made EventDispatchers. Usage examples can be found in FirstPerson and TopDown demo character,
- Inputs can be easily changed using Input Mappings,
- Controls for PUPI will be enabled and disabled automatically letting you set inputs without worrying about overriding other controls (example: if fire and pick up Mappings have the same key, fire will be ignored when something can be picked up/inspected and vice-versa),
- Configurable Easing animations for picking up and putting back Inspectable,
- Set default PUPI settings by using PUPISettings structure or configure PUPI(s) by using PUPISettings Actor Component.
Update:
[spoiler]
Update 3 (for UE4.18+):
- Changed setup process to use Scene Component instead of adding Child Actor Component,
- Added a “button” to PUPI component to add Input Mappings via single click instead of adding/writing them manually inside Project Settings -> Input,
- Removed PUPISettings component as it is not needed to configure PUPI any longer because of first change :).
Update 2:
- Changed content type to Asset Pack - you can now add this to your project by pressing Add to Project without having to manually migrate it,
- Added ability to clamp Pitch to (-20, 20) when rotating object. You can do this by adding a tag “ClampPitch” to component (not to Actor),
- Added option to change Trace visibility, to PUPISettings -> Main,
- Added option to disable Depth of Field when inspecting, to PUPISettings -> Inspect,
- Added option to rotate on Local axis, to PUPISettings -> Pick Up,
- Fixed an issue with Inspect Auto Scale - report,
- Changed demo character controls to key events instead of Input Mappings. This was done to reduce the steps of setting up Demo characters,
- Replaced deprecated nodes for UE4.14+.
Update 1:
- Configurable Easing “animation” for picking up and putting back Inspectable object.
- IgnorePUPI tag to make PUPI ignore certain objects even if they have physics enabled.
- PUPISettings Actor Component. It allows to have different configurations for multiple character in same level. (Can’t have different Outline colors for each PUPI at the same time. However Outline settings can be changed in real-time)
[/spoiler]
Guides:
Set up for update 3 (UE4.18+):[spoiler]
- Drag and drop BP_PUPI_Component into Character/Pawn,
- Set properties in Details Panel,
- Click** Add Default Input Mappings** if this is first time setup in this project (Mappings will be added to Project Settings -> Input)
[/spoiler]
Accessing Event Dispatchers:[spoiler]
- Select BP_PUPI_Component,
- Scroll down in Details Panel to Events category and press green “+” button to add the event
[/spoiler]
Set up for update 2 (UE4.17 and below):[spoiler]
- Drag and drop PUPI into Character/Pawn blueprint(or add as child actor and select PUPI as class)
- Set up Input Mappings,
- Configure(or leave at default) PUPISettings,
- Continue with the rest of your project
[/spoiler]
HTC Vive set up (both controllers in same actor):[spoiler]
- Add two MotionController components. (left and right as usual)
- Add/attach PUPI to each MotionController. Optionally attach SkeletalMesh or anything to MotionControllers to see them in game
(for UE4.18+ add BP_PUPI_Component and in Details Panel -> Properties -> Main - Motion Controller Hand select proper hand (Left/Right))
Should look like this: -
Pick Up Plus Inspect - PUPI [Update 1] - YouTube
(for UE4.18+ no need to add PUPI_Settings, click on added BP_PUPI_Component and change properties in Details Panel -> Properties)
[/spoiler]
Template VirtualReality implementation (UE4.18+):[spoiler]
- Open BP_MotionController [located in VirtualRealityBP->Blueprints], add a BP_PUPI_Component
Select **BP_****PUPI_Component** and change its properties in **Details Panel** as below:
...
Main Settings:
_Tracer: PUPI
_SphereTrace****Radius: 10 (or decide for your project)
_MaxGrabDistance: 0.001 (or decide for your project)
…
Pick Up** Settings**:
_…
_OrbitalObjectMovement:
__RollRelativeTo: PUPI
__Vertical: PUPI
__Horizontal: PUPI
…
Change rest of the settings based on your project
- Open ConstructionScript and make this addition
- Select BP_PUPI_Component, in Details Panel scroll down and add On Start Interaction and On End Interaction events by clicking green + icon. And connect **Grab **and Release functions to them.
- In Event Graph, inside Update animation of Hand comment box make these additions
- Open Grab Actor function from My Blueprint > Functions > Grabbing and make these additions
- Open Release Actor function from My Blueprint > Functions > Grabbing and make these additions
[/spoiler]
Template VirtualReality implementation:[spoiler]
- Open BP_MotionController [located in VirtualRealityBP->Blueprints],
add a Child Actor Component attached to MotionController, rename it to PUPI_ChildComponent,
add a PUPISettings component
Set **PUPI_ChildComponent**'s class to **PUPI** in Details Panel,
Select **PUPISettings** and change its properties in Details Panel as below:
PUPI Child Actor Name: PUPI_ChildComponent
…
Main Settings:
_Tracer: PUPI
_SphereTrace****Radius: 10 (or decide for your project)
_MaxGrabDistance: 0.001 (or decide for your project)
…
Pick Up** Settings**:
_…
_OrbitalObjectMovement:
__RollRelativeTo: PUPI
__Vertical: PUPI
__Horizontal: PUPI
…
Change rest of the settings based on your project
- Open ConstructionScript and make this addition
- Create a new Variable type of PUPI and in EventGraph (Event BeginPlay) make these additions
- In Event Graph, inside Update animation of Hand comment box make these additions
- Open Grab Actor function from My Blueprint > Functions > Grabbing and make these additions
- Open Release Actor function from My Blueprint > Functions > Grabbing and make these additions
[/spoiler]
PUPISettings Component (not needed for update 3 (UE4.18+)):[spoiler]
- Add PUPISettings Component to the Actor you have added PUPI
- Write name of PUPI into PUPI Child Actor Name field of PUPISettings Component
- Configure settings
[/spoiler]
Video Guide:
Settings: [spoiler]
Main:
- Tracer:
- Camera(trace from camera towards camera forward vector),
- PUPI(trace from placed PUPI towards PUPI forward vector),
- Mouse Pointer(use mouse pointer to interact)
- SphereTraceRadius: radius of trace.
- MaxGrabDistance: maximum distance which player can interact with object. Picked up objects will be dropped if distance between player(PUPI) and object exceeds this value.
- MaxGrabAngle: maximum angle which player can interact with object. Picked up objects will be dropped if angle between player(PUPI) and object exceeds this value.
- OutlineColor: color of outline.
- OutlineThickness: thickness of outline. Settings this too much will make outline cover whole object.
- OutlineBehindObjects: visibility of part of outline which is behind objects. 1 is same as OutlineColor, 0 disable outline, negative values to make hidden part of outline in negative, settings this to a bigger value than 1 will make hidden part of ouline glow brighter than visible part
- AllowDiagonalRotation: prevent or allow object to be rotated in diagonal rotation(pitch and yaw at the same time).
- AlwaysActiveMappings: to rotate, move or scale object Mode keys must be held down. If any of the mappings are set to true, there is no need to hold mode key for that action. Example: if RotatePitch and RotateYaw are true, can rotate object with “Q” and “E” keys, without the need of holding mode keys .
PickUp:
- MaxCarryWeight: Objects heavier than this can’t be picked up. Doesn’t affect Inspecting.
- MaxThrowForce: Objects can be thrown further by setting this value higher.
- PickUp\Drop:
- Press/Release - press key to pick up and release it to drop object,
- Press/Press - press key to pick up and press it again to drop object.
- PickUpSound: custom sound to play when object is picked up.
- OrbitalObjectMovement:
- “attach” object to Camera. Object will be moved with camera rotation,
- “attach” object to PUPI. Object will be moved with PUPI rotation (if PUPI is attached to root of character, object will be move when character rotates even if camera is standing still)
- Lock objects orbital movement. Object will stand in same angle to PUPI as it was first picked up.
Take a look at Guide video 2:00
- AllowObjectRotation: enable/disable local pitch or yaw while object is orbiting. Guide video 2:22
- WeightAffectsMotion: If true, object’s rotation and move speed and throw distance will be affected by it’s weight and MaxCarry weight.
- StartingPosition: if set to true, object will get to custom location relative to PUPI, set in settings.
- CollideWithPawn: If false, picked up object won’t have collision with player Pawn.
- MakeObjectUnwalkable: If false, player will be able to get on object, pick it up and fly. If false, player will fall of object when on attempt to fly on object.
Inspect:
- InspectDistance: at what distance should objects be inspected.
- EaseMethod:
- Step: Number of steps required to go from A to B. Used with Step method only.
- BlendExponent: Blend exponent for basic ease function. Used with Ease methods only.
- AnimationSpeed: Speed of ease animation.
- ScaleDownExtent: if object’s lenght, width or height exceeds this value it will be scaled down to this value.
Tip: by settings InspectDistance and ScaleDownExtent to small values you can make inspectable appear closer than anything else in scene - InspectSound: custom sound to play when inspect starts
- SlowTime: slow down time while inspecting. Note: might make physics behave strange.
- RotateAlwaysActive: just like AlwaysActiveMappings, if this is set to true, there is no need to hold RotateMode key to rotate object while inspecting it.
- CanRotateObejct: if it should be possible to rotate object while inspecting.
- CanMoveObject: if it should be possible to move object while inspecting.
- CanChangeDistance: if it should be possible to move object(further/closer) object while inspecting.
[/spoiler]
Input Mappings: [spoiler]
Action Mappings
- [PUPI]Pick Up/Inspect
- [PUPI]Rotate mode
- [PUPI]Move mode
- [PUPI]Scale mode
- [PUPI]Throw
- [PUPI]Reset Rotation
- [PUPI_MC_R]Pick Up
- [PUPI_MC_L]Pick Up
Axis Mappings
- [PUPI]ScaleLength
- [PUPI]ScaleWidth
- [PUPI]ScaleHeight
- [PUPI]MoveRight/Left
- [PUPI]MoveUp/Down
- [PUPI]MoveForward/Backward
- [PUPI]RotatePitch
- [PUPI]RotateYaw
- [PUPI]ConsumeWhileInspecting
[/spoiler]
About demo level: The project comes with 7 types of demo characters in it: 1st person, 3rd(or 2nd) person shooter type, 3rd person free camera, Top down(with mouse pointer), Fixed cameras(like old resident evil series but with mouse pointer), VR headset with keyboard and mouse, VR headset with motion controllers. These characters can be found in Demo->Character. Drag/drop one of them at a time into level to try.
You can start playing in demo level and press “B” to bring up demo menu and change settings on top right. To have correct camera height in VR please put on headset in correct position(seated) before pressing play for VR keyboard mouse; put headset on floor before pressing play for motion controllers.
Thanks to everyone who liked, asked questions and gave suggestions!
Special thanks to tcla75 for helping out with VR!