- Home /
MP - Enter & Exit Any Vehicle
Hello,
This is not like me to do and I am still deciding on if I should post this, the only thing that is making me do this is this may help others that do not wish to ask.
I am new to unity and like many, I have started off with the biggest thing i can think of and that is making a multi-player game in Unity with the feature of getting in and out of vehicles.
The first part is done, joining a server with others and walking around, granted the models look rubbish but they'll do.
My difficulty at this moment, is getting the user to get into a vehicle, I am aware that you need to disable scripts within the player model and enable the car scripts however the answers I have looked at are only for single player scripts and they only work for one vehicle.
I am a Web Programmer and I cannot understand how to get an ID off the player or from the vehicle, I am using photon network by the way (probably best to stick with web development :D) - this project is just for fun and I do not wish to spend money, I am using the free version of Unity.
My intention is to spawn AI (which I have) and then to be able to get in their vehicle and drive it with others being able to get in as well.
I hope this makes sense and if not just think of a Grand Theft Auto game with JUST the walking around and getting into vehicles.
Thanks a lot
Answer by dooly123 · Oct 21, 2017 at 12:41 AM
hey mate I had this issue a few years ago. it took me a long time to develop a solution for photon, I ended up releasing it on the asset store https://assetstore.unity.com/packages/tools/enter-exit-vehicle-networked-73715
but as a hint https://doc.photonengine.com/en-us/pun/current/manuals-and-demos/ownership-transfer
Answer by BorisTheLad · Dec 11, 2017 at 10:32 AM
Thanks for the reply!
I am so sorry this has taken me so long to respond, I lost interest with Unity because I was trying to do certain tasks and they would not work (syncing animations etc). Thanks for the reply and the help. I will defiantly look at this when I get time and potentially purchase this.
Regards, Boris
Your answer
![](https://koobas.hobune.stream/wayback/20220612140855im_/https://answers.unity.com/themes/thub/images/avi.jpg)