Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by RSud · Apr 08, 2011 at 04:38 AM · third-person-controller

3rd person controller but want to use my mesh ?

Newbie to Unity....

So I have my space fighter showing in my game after I instantiate it (with lights, etc) and it looks good.

I now, of course want to move it around (and have the camera follow).

So I see the standard asset 3rd person controller script.

I am not able to make out how do I use this controllers with my space fighter.

I drop 3rd person controller in my scene and I can move the default construction guy around.

But how do I discard the construction guy and put my space fighter in instead??

Thanks for any help!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by seyyid · Apr 08, 2011 at 04:44 AM

well you shouldnt drop 3rd person controller object into your scene

select your space fighter in hierarchy pane and add 3rd person controller and 3rd person camera script from component>scripts

those 2 scripts works for you

but make sure you remove 3rd person controller object from your scene or any other objects with 3rd person controller and 3rd person camera script

you may need to adjust controller collider to suit your player

peace

Comment
Add comment · Show 6 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image RSud · Apr 12, 2011 at 12:41 AM 0
Share

Hi, thanks but I must be doing something wrong.

$$anonymous$$y space fighter is a prefab and I instantiate it when the scene starts. So if I drop the 3rd person controller in my space fighter prefab it removes my space fighter entirely (mesh, materials) and I'm left with the construction guy.

If I drop my player ship prefab into the scene and then drop the 3rd person controller on it (in Hierarchy) then I get my mesh and the construction guy. I note that the camera target is blank in the inspector so I drop my space fighter game object into it. But running my game all I see is a blank screen.

avatar image seyyid · Apr 12, 2011 at 01:17 AM 0
Share

i dont mean to add 3rd person controller in your space fighter prefab, you just need to add 3rd person controller SCRIPT and 3rd person camera SCRIPT, not the 3rd person construction worker itself, if you added these 2 scripts to your space ship fighter, and your space ship still cannot move or cannot be seen, make sure when u add 3rd person controller you set your controller collider well aligned to the ground(means collider must stay on the ground) there shouldnt be any other problem

avatar image RSud · Apr 12, 2011 at 03:10 AM 0
Share

Thanks for your patience! I am not out of the woods yet.

Okay so I added the scripts and when I run I get a null exception inside the thirdpersoncontroller on this line:

 var cameraTransform = Camera.main.transform;

Any idea why?

avatar image RSud · Apr 12, 2011 at 04:29 AM 0
Share

Okay... I kept futzing around with it. did some stuff. deleted and recreated some of the objects and... all of sudden it is working!

Not sure what the earlier problem was.

Thank you!!

avatar image seyyid · Apr 12, 2011 at 06:45 AM 0
Share

good to go then :) it works this way anyway, for your null exception error you must drag your main camera into Camera Transform of your 3rd person camera in your inspector pane :) good day !

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Third Person MMO Controller 0 Answers

Modify tps standard script to be able to climb pipe/ladder 0 Answers

Third Person Controller animation problem 1 Answer

Newbie: ThirdPersonCamera Issue 0 Answers

Is there a way to use the ThirdPersonController script to control an iOS game character? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges