Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
Kylearnold1234

Realistic FPS Prefab Cars

Question

I'm Currently Using Realistic FPS Prefab and i need some help.

 

Iv'e been trying to add drivable cars to my game and i just cant do it i was just wondering if some one can give me some help with adding them.

 

Realistic FPS Prefab Runs off of C# Scripts.

 

Thanks

Share this post


Link to post
Share on other sites

12 answers to this question

Recommended Posts

  • 0

what exactly do you need help with?
getting inside the car, make cars drive? you need to be more specific

Share this post


Link to post
Share on other sites

  • 0

If your game porpose is Singleplayer so:

 

1) Create a script attach it to an Empty game object:

Please login or register to see this code.

2) use the Vehicle unity pack(or your own if you have) and Import it in.

3) attach the Player to Player GameObject and Car to the CarPlayer GameObject on the script.

 

This is the easyest way to do it I am sure there are lot of more compleceted ways

 

It should work my PC is in a lab so If you try to test it please tell me how it went :d

Edited by TomerBD

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

You can find a car script pretty much anywhere on the internet just google it.

as for the sitting in the car part

just use colliders to check if a player is inside OR raycast to check if ur looking at the car, then make player a child of the car and disable the player and enable the car like Please login or register to see this link.  stated above 

Share this post


Link to post
Share on other sites
  • 0

KyleArnold - Friend the way you are thinking is wrong. You should think a vehicule as a new controller player when you use him. Your will is to receive a magic script in order to use a vehicule in this asset/project, but it is just impossible. You said honestly "Im Pretty New To Unity I dont know what a raycast is". This fact allow us to say to you that you need before all learn the basics with Unity. Why all of the new users want create something amazing after few hours? It's an utopy. I am sorry if I seem to you rude and cruel, but it is true. Good luck ++

Share this post


Link to post
Share on other sites
  • 0

Please login or register to see this link. read this one i think.

 

The Kit that u are using uses raycast for shooting

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

well i can script i know the basics of it. I have made a working inventory system and i have scripted new guns and arm models and made my own main menu its very nice btw

Share this post


Link to post
Share on other sites
  • 0

In fact you are not a beginner, but you don't know what a RaycastHit is. There is some paradox. May I suggest you to take a moment reading code from FPSkit which uses some interesting scripts in order to fly in a copter or drive a car? It will be useful for you ++

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...