|
Post by Invector on Feb 4, 2021 0:25:32 GMT
Push Action Add-on
* Basic Locomotion version 2.5.6 required * Doesn't work with the Free Lite version
Push and Pull with Cross Movements (forward, backward, left, and right)
Plug & Play and FREE
|
|
|
Post by deirre on Feb 4, 2021 13:28:21 GMT
Its back. Thanks for for this. I cant wait to integrate it.
|
|
|
Post by arkanis on Feb 12, 2021 4:16:15 GMT
I appreciate this asset a lot, its really great. However, I feel like using Space to push the block and E to climb up is kind of strange.
I changed mine so that it works by pressing E to jump up, and holding E for greater than 0.2s to push the block.
For anyone else who wants to do this:
in vTriggerGenericAction I added an extra value to the enum (Line 24)
public enum InputType
{
GetButtonDown,
GetDoubleButton,
GetButtonTimer,
AutoAction,
GetButtonUp
};
Correspondingly I changed all of the actions for climbing up on the block to use GetButtonUp in the drop down.
In vGenericAction, right after the code for GetButtonDown (Line 541) I added this:
// GetButtonUp -- ADDED BY ME
else if (triggerAction.inputType == vTriggerGenericAction.InputType.GetButtonUp && actionConditions)
{
if (triggerAction.actionInput.GetButtonUp())
{
TriggerActionEvents();
TriggerAnimation();
}
}
I THOUGHT I was going to need a timer in there to say to only wait for the button up for 0.2s, but it turns out it works without that.
In vPushActionController I added (Line 12):
public float pushTime = 0.2f;
In vPushActionController in the LateUpdate() function right after the Physics Ray I changed the entry condition to this (Line 230):
if (pushPoint && pushPoint.canUse && startPushPullInput.GetButtonTimer(pushTime))
{
StartCoroutine(StartPushAndPull());
}
return;
I left the end condition as a GetButtonDown still.
Final Result:
|
|
|
Post by deirre on Feb 18, 2021 1:59:20 GMT
Is there a way to also push and pull the object in all directions?
|
|
|
Post by arkanis on Feb 19, 2021 5:20:30 GMT
Deirre, you already should be able to move it in any of the four cardinal directions with the add on.
|
|
|
Post by deirre on Feb 23, 2021 19:41:59 GMT
Deirre, you already should be able to move it in any of the four cardinal directions with the add on. Yes I can move it 90 degrees, in the good ole days you could move in 360 degrees. Having this flexibility allows it for other uses.
|
|
sayos
New vMember
Posts: 6
|
Post by sayos on Mar 10, 2021 12:40:33 GMT
hi, i have the last shooter template from the unity store and gives me this error:
Assets\Invector-3rdPersonController\Add-ons\PushAction\Scripts\vPushActionController.cs(9,54): error CS0246: The type or namespace name 'vIAnimatorMoveReceiver' could not be found (are you missing a using directive or an assembly refer
|
|
|
Post by Invector on Mar 10, 2021 13:19:47 GMT
hi, i have the last shooter template from the unity store and gives me this error: Assets\Invector-3rdPersonController\Add-ons\PushAction\Scripts\vPushActionController.cs(9,54): error CS0246: The type or namespace name 'vIAnimatorMoveReceiver' could not be found (are you missing a using directive or an assembly refer To verify if you're actually is using version 2.5.5, go to the menu Invector > Welcome Window The Package Manager is not very reliable and sometimes doesn't update the asset, the window is saying that you currently have the latest version 2.5.5 but once you import the project it actually imported version 2.5.4, you need to clean the AssetStore cache folder, to do that, press Windows+R and paste AppData\Roaming\Unity\Asset Store-5.x
|
|
sayos
New vMember
Posts: 6
|
Post by sayos on Mar 10, 2021 15:13:39 GMT
hi, i have the last shooter template from the unity store and gives me this error: Assets\Invector-3rdPersonController\Add-ons\PushAction\Scripts\vPushActionController.cs(9,54): error CS0246: The type or namespace name 'vIAnimatorMoveReceiver' could not be found (are you missing a using directive or an assembly refer To verify if you're actually is using version 2.5.5, go to the menu Invector > Welcome Window The Package Manager is not very reliable and sometimes doesn't update the asset, the window is saying that you currently have the latest version 2.5.5 but once you import the project it actually imported version 2.5.4, you need to clean the AssetStore cache folder, to do that, press Windows+R and paste AppData\Roaming\Unity\Asset Store-5.x Excelent, now i have 2.5.6b without errors, thanks
|
|
|
Post by aleksandr409 on Mar 27, 2021 11:38:04 GMT
I appreciate this asset a lot, its really great. However, I feel like using Space to push the block and E to climb up is kind of strange. I changed mine so that it works by pressing E to jump up, and holding E for greater than 0.2s to push the block. For anyone else who wants to do this: in vTriggerGenericAction I added an extra value to the enum (Line 24) public enum InputType
{
GetButtonDown,
GetDoubleButton,
GetButtonTimer,
AutoAction,
GetButtonUp
};
Correspondingly I changed all of the actions for climbing up on the block to use GetButtonUp in the drop down. In vGenericAction, right after the code for GetButtonDown (Line 541) I added this: // GetButtonUp -- ADDED BY ME
else if (triggerAction.inputType == vTriggerGenericAction.InputType.GetButtonUp && actionConditions)
{
if (triggerAction.actionInput.GetButtonUp())
{
TriggerActionEvents();
TriggerAnimation();
}
}
I THOUGHT I was going to need a timer in there to say to only wait for the button up for 0.2s, but it turns out it works without that. In vPushActionController I added (Line 12): public float pushTime = 0.2f;
In vPushActionController in the LateUpdate() function right after the Physics Ray I changed the entry condition to this (Line 230): if (pushPoint && pushPoint.canUse && startPushPullInput.GetButtonTimer(pushTime))
{
StartCoroutine(StartPushAndPull());
}
return;
I left the end condition as a GetButtonDown still. Final Result: I can't make it work. The code in the video and documentation differs in " vPushActionController"
|
|
|
Post by mrnobody on May 26, 2021 23:43:44 GMT
Hi all, I've been trying to get my character to drag dead bodies, like in the Hitman games. I've tried many things over the past week. The closest I've come so far is to use this push add-on. Basically I copied the push-pull scripts from the demo scene and pasted into my scene, on the appropriate objects. I tried first on a dumpster FBX model, it worked perfectly, great work Invector team! Anyhow, when I try to switch it over to a gameobject with a rag doll or AI script, e.g. NPC's, I run into issues. For some reason, I can't move them at all unless I change a few things. Under the AI Manager, I turn off "remove components after death. Under the push script manager, On push-start event, I have to make my character the parent of the dead NPC. Then revert the parent on push-stop event. I also tinkered around a lot with the rigid bodies of both characters. I finally got it so I can move the dead NPC around! But there's still issues.. They move at like 60 MPH or not at all, I can't find the sweet spot or even get close. Also they both seem to float a few inches off the ground, so that the rag doll isn't affected by anything, it's just static as they move around. Am I going about this all wrong, or missing a simple aspect? Any insight is much appreciated. If I'm in the wrong forum, sorry I'm a forum newbie as well.
Edit: After playing around with the rigid bodies mass some more, I got the speed how I want it. Still having 1 major issue that I only just realized. For the pushable object script to work, I have to check control kinematics. However, when I have this option checked, the NPC cannot move as he just walks in place until I brutally murder him for not working correctly. You'd think he'd learn by now... Anyhow, I can't find a way to disable the pushable object script while he's alive or to toggle the kinematic switch using events. Any Suggestions?
|
|
|
Post by samrock on Jun 20, 2021 0:54:41 GMT
Hi all, I've been trying to get my character to drag dead bodies, like in the Hitman games. I've tried many things over the past week. The closest I've come so far is to use this push add-on. Basically I copied the push-pull scripts from the demo scene and pasted into my scene, on the appropriate objects. I tried first on a dumpster FBX model, it worked perfectly, great work Invector team! Anyhow, when I try to switch it over to a gameobject with a rag doll or AI script, e.g. NPC's, I run into issues. For some reason, I can't move them at all unless I change a few things. Under the AI Manager, I turn off "remove components after death. Under the push script manager, On push-start event, I have to make my character the parent of the dead NPC. Then revert the parent on push-stop event. I also tinkered around a lot with the rigid bodies of both characters. I finally got it so I can move the dead NPC around! But there's still issues.. They move at like 60 MPH or not at all, I can't find the sweet spot or even get close. Also they both seem to float a few inches off the ground, so that the rag doll isn't affected by anything, it's just static as they move around. Am I going about this all wrong, or missing a simple aspect? Any insight is much appreciated. If I'm in the wrong forum, sorry I'm a forum newbie as well. Edit: After playing around with the rigid bodies mass some more, I got the speed how I want it. Still having 1 major issue that I only just realized. For the pushable object script to work, I have to check control kinematics. However, when I have this option checked, the NPC cannot move as he just walks in place until I brutally murder him for not working correctly. You'd think he'd learn by now... Anyhow, I can't find a way to disable the pushable object script while he's alive or to toggle the kinematic switch using events. Any Suggestions? That sounds awesome! Could you please make a video tutorial of how you achieved it?
|
|
|
Post by ningkamess on Nov 30, 2021 22:54:18 GMT
I think I'm doing something wrong. I can push and pull an object... but is there a way to push/pull faster?
I've tried changing all of the settings on the push action controller component in the demo and there is no difference in how it pushes or pulls.
|
|