lobo
New vMember
Posts: 4
|
Post by lobo on Apr 4, 2020 8:59:14 GMT
Hello everyone,
I'm a visual effects artist and a 3D modeling artist. I just got into creating video games but wondering if any one of you would be willing to code or do a tutorial where you are teaching us how to code an invector character simply entering a car or for that matter, any vehicles. Really what I am looking for is a camera switch where the character simply disappear and we become the vehicle when entering and then when exiting, the character simply is next to the vehicle. Let me know. Thanks!
Lobo
|
|
|
Post by komposite on Apr 7, 2020 15:14:10 GMT
You can try that using generic animations, get your animations from mixamo.com, do your animator, animate your car door and stuff to match your animations, and that should be it !
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Apr 11, 2020 17:39:50 GMT
Smarter men than me could propose a more elegant solution. Here's my hack for your review.
Using:
Invector Template Dynamic Water Physics (boat) by NWH Coding
1. Create an empty object and put all Invector components inside. (PlayerPackage). 2. Disable boat controller and camera. 3. Add UseBoat.cs script to boat object.
using System.Collections; using System.Collections.Generic; using UnityEngine;
public class UseBoat : MonoBehaviour { // Declare public GameObject vPlayer; public GameObject vPlayerGroup; public GameObject vBoat; public GameObject vBoatCam; private bool kick;
void Update() { if(kick == true && Input.GetKeyUp(KeyCode.E) ){ vPlayerGroup.SetActive(false); vBoatCam.SetActive(true); vBoat.GetComponent<AdvancedShipController>().enabled=true; kick = false; } else { if(vBoatCam.activeInHierarchy == true && kick == false && Input.GetKeyUp(KeyCode.E)) { vPlayer.transform.position = vBoatCam.transform.position; vPlayerGroup.SetActive(true); vBoatCam.SetActive(false); vBoat.GetComponent<AdvancedShipController>().enabled=false; } } } private void OnTriggerEnter(Collider other){ if(other.gameObject.tag == "Player"){ kick = true; } } private void OnTriggerExit(Collider other){ kick = false; } }
|
|
|
Post by coolguyplatinum on Apr 20, 2020 20:16:00 GMT
It's a tossup with this. Half these developers sayin its easy. Other half not having any clue. Im new to coding and actually been angry that I cant get a simple solution for this. You would think there would be more tutorials on this since its a high in demand feature everyone knows they want in their game. Look how many people want that deprecated car feature to work so bad. There should be an official Invector Integration.
|
|
|
Post by coolguyplatinum on Apr 20, 2020 20:17:30 GMT
ColonelO I have that but do you think it would be the same method for NHW car controller?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Apr 21, 2020 2:58:59 GMT
coolguyplatinum:
The above hack was done using the old version of NWH water physics and took about 5 minutes to confirm proof of concept. Anyway, I just purchased the NWH vehicle controller and water physics upgrade so I could see for myself how they're put together now.
I took a peek and the short answer is NO my hack won't work as described with the NWH vehicle controller. But I will familiarize myself with it and come up with something in short order. I'll put a little more effort into it this time and provide a workable solution.
Respectfully, ColonelO
|
|
|
Post by coolguyplatinum on Apr 26, 2020 21:41:41 GMT
Alright. Sounds good!
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Apr 27, 2020 19:09:40 GMT
coolguyplatinum:
The NWH CharacterVehicleChanger.cs script works with the Invector Controller out of the box as advertised. Not sure what challenges you might be facing but I don't see any reason to recreate the wheel here.
If you want to show and hide the InvectorUI and or the Vehicle dials UI you could just add them to the CharacterVehicleChanger.cs script and insert a line using ".SetActive(true/false)".
##Example Declarations
public GameObject InvectorUI; public GameObject InvectorCamera; public GameObject NWH_UI;
##Example Commands inserted below: [characterControllerObject.SetActive(true);]
InvectorUI.SetActive(true); InvectorCamera.SetActive(true); NWH_UI.SetActive(false);
##Example Commands inserted below: [characterControllerObject.SetActive(false);] InvectorUI.SetActive(false); InvectorCamera.SetActive(false); NWH_UI.SetActive(true);
|
|
|
Post by coolguyplatinum on Apr 28, 2020 17:19:35 GMT
Alright I'll check it out. Been super busy at the moment. I'll let you know.
|
|
ara
New vMember
Posts: 22
|
Post by ara on Jun 1, 2020 22:40:14 GMT
There is an add-in that does that on this board (https://invector.proboards.com/thread/215/deprecated-vehicle-add-on-invector), it was recently revived by developer and being contributed to by a couple others so a little work to get it working, but it does the animation thing you are looking for. (and I got it working at least that far on my project over the weekend). You could check out the videos first to see if it is what you are after.
|
|
|
Post by skullvez on Oct 9, 2021 15:35:36 GMT
|
|