[Add-On] - Pickup - Hold - Throw Heavy Objects
May 3, 2022 3:13:39 GMT
septimustitus and axbaby123 like this
Post by icuruok on May 3, 2022 3:13:39 GMT
Invector Pick Up & Throw Heavy Object addon
v 1.0 - icuruok
* The goal of this addon was to create a pickup and throw system that can emulate the player lifting up
a heavy object and allowing the player to then hold the heavy object while walking/moving and then continue to allow the player to then throw the object.
Setup *
-- After installing the unitypackage or placing the extracted zip to your project --
1# Place the "PickUp" prefab object as a CHILD object of the game object you wish to have the character pickup/hold/throw
*MAKE SURE PickUp collider tag is set to "PickUp"
You can also create custom a mesh/capsule/sphere collider just make sure it has the tag "PickUp" and set its trigger to enabled on its collider
2# Place the "PickUpThrow.cs" script on your main invector third person player, Set the "myHands" to your right/left hand.
3# Use one of the updated animator controllers from the "PickUpThrow/Anim/Controllers" folder as your characters new animator controller.
Or you can simply open the controller in animator tab window and copy the custom action then add it to your own controller animator.
DONE# Go up to your target pickup object in game and press E to pickup and hold, Then to throw press E again.
**Download
PickUpThrow.zip
PickUpThrow.unitypackage
*******Inc Info*****
The example script provided is very crude and is buggy but it does work for showcasing the example, The invector
players will be able to pickup/hold/throw heavy objects.
The animations are fully functional and fluid with the invector system.
The script could use updating and fixing and the script will be bugy when used on the melee or shooter controllers
as its not scripted to block out blocking/attacking/jumping animations which will break the animation of the pickupthrow action
So give you expand upon the provided example to detect such inputs and block them out the example would work much better,
I may add this into a updated version later with a better fixed positioning of held object ect ++
v 1.0 - icuruok
* The goal of this addon was to create a pickup and throw system that can emulate the player lifting up
a heavy object and allowing the player to then hold the heavy object while walking/moving and then continue to allow the player to then throw the object.
Setup *
-- After installing the unitypackage or placing the extracted zip to your project --
1# Place the "PickUp" prefab object as a CHILD object of the game object you wish to have the character pickup/hold/throw
*MAKE SURE PickUp collider tag is set to "PickUp"
You can also create custom a mesh/capsule/sphere collider just make sure it has the tag "PickUp" and set its trigger to enabled on its collider
2# Place the "PickUpThrow.cs" script on your main invector third person player, Set the "myHands" to your right/left hand.
3# Use one of the updated animator controllers from the "PickUpThrow/Anim/Controllers" folder as your characters new animator controller.
Or you can simply open the controller in animator tab window and copy the custom action then add it to your own controller animator.
DONE# Go up to your target pickup object in game and press E to pickup and hold, Then to throw press E again.
**Download
PickUpThrow.zip
PickUpThrow.unitypackage
*******Inc Info*****
The example script provided is very crude and is buggy but it does work for showcasing the example, The invector
players will be able to pickup/hold/throw heavy objects.
The animations are fully functional and fluid with the invector system.
The script could use updating and fixing and the script will be bugy when used on the melee or shooter controllers
as its not scripted to block out blocking/attacking/jumping animations which will break the animation of the pickupthrow action
So give you expand upon the provided example to detect such inputs and block them out the example would work much better,
I may add this into a updated version later with a better fixed positioning of held object ect ++