|
Post by Invector on Mar 23, 2017 19:24:29 GMT
(www.assetstore.unity3d.com/en/#!/content/21676)
Well how about another cool integration Steps: - Download and import the last version of the Template ( tested on basic 2.1a) - Download, import and install the Rewired last version ( tested on 1.0.0.112.U5) - Create a Rewired InputManager on your scene - Follow steps with images above- Replace or take a look into this vThirdPersonInput [ Example] Basically we replace every input call to a rewired input call. Original: if (jumpInput.GetButtonDown())Rewired: if (player.GetButtonDown("Jump"))
You will need to create new actions and assign the inputs at the Rewired EditorCreating New Actions: ( in this example we only setup the basic locomotion inputs, but it's the same process for the Melee or Shooter) Keyboard Mapping: Joystick Mapping:
And Mouse Mapping:
Don't forget to assign all the inputmappings into a Player: That's it, it's pretty easy to integrate this one so I think a video tutorial is not necessary.
|
|
|
Post by tharindu on Mar 24, 2017 10:02:05 GMT
Are you people on a rampage or something!!! :D Jokes apart, is ICE Creature Control on the pipeline by any chance ? Could you guys check the possibility of ding feet IK for MegaSplat like bone controller does ?
|
|
|
Post by Invector on Mar 24, 2017 14:44:30 GMT
Are you people on a rampage or something!!! :D Jokes apart, is ICE Creature Control on the pipeline by any chance ? Could you guys check the possibility of ding feet IK for MegaSplat like bone controller does ? I just exchange assets with ICE Creature developer - will try to integrate today, let's see how it goes. about the other comment, I don't understand a single word LOL, Feet IK for MegaSplat? sorry, wuuuut bone controller?
|
|
|
Post by jrackley on Mar 24, 2017 14:59:05 GMT
Are you people on a rampage or something!!! :D Jokes apart, is ICE Creature Control on the pipeline by any chance ? Could you guys check the possibility of ding feet IK for MegaSplat like bone controller does ? I just exchange assets with ICE Creature developer - will try to integrate today, let's see how it goes. about the other comment, I don't understand a single word LOL, Feet IK for MegaSplat? sorry, wuuuut bone controller? That would be badass if you get that done!!! ICE is very amazing and complex with endless possibilities.
|
|
|
Post by tharindu on Mar 24, 2017 15:06:53 GMT
Are you people on a rampage or something!!! :D Jokes apart, is ICE Creature Control on the pipeline by any chance ? Could you guys check the possibility of ding feet IK for MegaSplat like bone controller does ? I just exchange assets with ICE Creature developer - will try to integrate today, let's see how it goes. about the other comment, I don't understand a single word LOL, Feet IK for MegaSplat? sorry, wuuuut bone controller? Haha sorry I should've given some background. So MegaSplat is the new terrain shader that's been around for sometime and is an alternative to RTP v3.1+ . It has a very strong and performance friendly tessellation shader. Downside of using tessellation is that your textures are displaced but the terrain mesh isn't; so positioning feet is challenging. The reason this is a major challenge is because tessellation is a fixed render shader that runs straight on the gpu and we cannot edit it, meaning you can't access the gpu to get the mesh data that has been altered. So when your character moves around it looks like your feet are planted in the ground. The developer has included a basic script that helps you move your feet correctly when the ground textures are displayed using tessellation and it's been quickly adapted and improved upon by one or two choice 3rd person controllers like Bone Controller or Opsive. So the character correctly positions their feet on the displaced ground. Even A* path finding now has some level of compatibility with it because it's been quickly adapted by the Terrain Composer and Gaia community members. A few people actually consider going for bone controller just because the feet IK works. If you guys can support it I am sure it'll be a good thing. I didn't bring this up in the past because you guys were looking at the shooter completely. Now that you're looking at integrations I thought this might interest you guys.
|
|
|
Post by tharindu on Mar 24, 2017 15:22:26 GMT
|
|
|
Post by Invector on Mar 24, 2017 15:50:38 GMT
Hmmmmmm that's interesting for sure, but since we don't have a IK solution out of the box I don't know if the integration is even possible for now
|
|
|
Post by tharindu on Mar 24, 2017 16:32:57 GMT
Hmmmmmm that's interesting for sure, but since we don't have a IK solution out of the box I don't know if the integration is even possible for now True. If Jason made a compatibility script with Final IK then I guess it'll solve the problem partially since Invector's got an integration with the asset. Until then I am working on a foot IK solution for Invector with standard Unity implementation.
|
|
|
Post by fluidImages on Mar 28, 2017 3:06:51 GMT
What about the mobile HUD?
Do we need to modify ButtonHandler?
Sean
|
|
|
Post by Invector on Mar 28, 2017 15:15:16 GMT
What about the mobile HUD? Do we need to modify ButtonHandler? Sean It's pretty much the same process, but instead of using our MobileHUD you will use their touchButtons, take a look into the CustomControllersTouch demo scene to see how it works.
|
|
|
Post by dcmonkey on Sept 19, 2017 2:20:12 GMT
I was looking at doing this modification for Rewired integration in my project. Looking at the code, wouldn't it be more appropriate to modify the GenericInput class in vInput.cs ?
One would also need to modify the various GenericInput constructor calls throughout the template to pass in action names rather than keybindings (or call Rewired directly if using the original method).
Also, if you use the keybind reference HUD, it would need to be rewritten to get the actual keybinds from Rewired's controller maps for the Actions.
|
|
|
Post by Yort_Draeb on Sept 21, 2017 3:54:15 GMT
has anybody gotten this complete yet and bother sharing? it has been a pain
|
|
|
Post by dcmonkey on Sept 28, 2017 7:38:59 GMT
Yes, it is a pain. This isn't a complete solution, but I wrote a RewiredInputWrapper class that mimics the GenericInput class that wraps most of the input calls in TPC.
using System.Collections; using System.Collections.Generic; using UnityEngine; using Rewired;
[System.Serializable] public class RewiredInputWrapper { [SerializeField] private string actionName;
public RewiredInputWrapper(string actionName) { this.actionName = actionName; }
public bool GetButton() { if (!ReInput.isReady) return false;
return ReInput.players.GetPlayer(0).GetButton(actionName); }
public bool GetButtonDown() { if (!ReInput.isReady) return false;
return ReInput.players.GetPlayer(0).GetButtonDown(actionName); }
public bool GetButtonUp() { if (!ReInput.isReady) return false;
return ReInput.players.GetPlayer(0).GetButtonUp(actionName); }
public float GetAxis() { if (!ReInput.isReady) return 0.0f;
return ReInput.players.GetPlayer(0).GetAxis(actionName); }
public float GetAxisRaw() { if (!ReInput.isReady) return 0.0f;
return ReInput.players.GetPlayer(0).GetAxisRaw(actionName); }
public bool GetDoubleButtonDown(float inputTime = 1.0f) { if (!ReInput.isReady) return false;
return ReInput.players.GetPlayer(0).GetButtonDoublePressDown(actionName, inputTime); } }
With this you can replace the GenericInput fields/initializers with corresponding RewireInputWrapper fields, and keep the needed script modifications to one location in each affected script rather than having to modify every "xxxInput.GetButton" call. For example, in vThirdPersonInput.cs you would change
public GenericInput jumpInput = new GenericInput("Space", "X", "X"); to
public RewiredInputWrapper jumpInput = new RewiredInputWrapper("Jump"); Of course you would still need to create all of the corresponding Actions and mappings in Rewired.
Also, there are a number of places in TPC that still call the Unity input system directly.
|
|
|
Post by Yort_Draeb on Oct 4, 2017 1:30:53 GMT
Thank you so much for sharing that. I just gave up for now the other day so this is great news for me. You are amazing!
|
|
bdk
New vMember
Posts: 7
|
Post by bdk on Nov 8, 2017 6:58:45 GMT
thanks for the wrapper it has worked out great.
|
|