Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2009
    Posts
    61

    TP_Controller in Terrain R & D Session 2 part 5 (video 37)

    OK, maybe i missed this one but i think this class just made it's first entrance here as if by magic and we are supposed to start using it without having written it in these videos. So I gather that this comes from the third person camera course. I haven't followed those videos yet because I got the impression we would be making a slightly different camera system for the MMO which would be covered in the actual MMO class.

    So do have to do that course in order to be able to follow these R & D videos in order to be able to use this class? I appreciate this is only R & D and not strictly necessary to follow along, but I do learn a lot from doing that and not so much from just watching someone else write code, and so would like to be able to follow along if possible. So as I have not seen it explained anywhere, does one just do the entire third person camerar course and then drop the resulting TP_Controller class in the Terrain R&D project or how is it done exactly? Or is the class available for download somewhere (I know you said you wouldn't do that, but still ...)

    Once again, my apologies if this has been explained somewhere and I have missed it. Also, the tp course is a great course and i have looked at bits of it, so I don't mind doing it in the least, just that I didn't know it would be necessary precisely at this time.

    Thanks a lot and great course so far and I would appreciate any help as to what to do in this case.
    Last edited by RickTheBlade; 03-05-2011 at 12:32 PM.

  2. #2
    Join Date
    Dec 2002
    Location
    Virginia Beach, VA
    Posts
    861
    No you don't have to go through the 3rd person videos to follow along but it does help. We are using the character and controller from that course just because we had it available and we have yet to develop the full system that will be used in the MMO. You could just as easily used one of the built in controllers provided by Unity. In the the end if you want to be able to navigate the world you'll need some sort of camera that you can move around which system you use is up to you.

  3. #3
    Join Date
    Mar 2009
    Posts
    61
    Thanks for the reply, Lee. I am indeed at the moment using one of the generic thrid person controllers provided with Unity to move around. I was just wondering about the code side of it, seeing as you use methods in the TP_Controller class which obviously won't be available or won't work the same way in the standard Unity code, and names will be different anyway etc etc.

    So it seems like the best option, for me anyway, will be to go through and make the character and controller from your other course, which looks like a fun course anyway!

    Thanks again!

  4. #4
    Join Date
    Dec 2002
    Location
    Virginia Beach, VA
    Posts
    861
    It is true that if you do use a different type of controller you will have to find some other way of integrating it into the R&D videos than the way I am doing it but it isn't a deal breaker if you understand how the controller you are using works.

    Going through the 3rd person character controller would be an excellent idea as well as the 3rd person platform game videos when they come out. I designed both of those courses to be the warmup for the MMO class to try and get everyone on an even footing to tackle the MMO class. Both of those video sets were tailored around getting people familiar with working with the Unity API and making things work in Unity, while Jason is working on a couple of his own video series which will tackle more of the software design side of things. The reason I'm bringing this up is just because some of the videos aren't officially part of the MMO class doesn't mean that the content wasn't design specifically to help those in the MMO class. They just happened to be structured in a way that just about anyone could benefit from them.

  5. #5
    Join Date
    Mar 2009
    Posts
    61
    Yeah absolutely Lee, it's awesome that you have those other courses up to get people fully conversant with Unity and C# before starting on something as massive as the MMO project. Unfortunately for me, the MMO started before I had the chance to go through all those preliminary videos, which is my fault entirely as they have been up there for a while.

    So it's back to the grindstone for me to try and catch up!

    Thanks, and keep up the great work!

  6. #6
    Join Date
    Sep 2010
    Location
    New York
    Posts
    57
    Hi RickTheBlade. I used the one that came with standard Unity assets it's the guy with the hardhat and holding a wrench. I integrated him in this link. I hope it helps.

    Peace.

  7. #7
    Join Date
    Mar 2009
    Posts
    61
    Awwww, thanks a lot Tomo, that's just what the doctor ordered! That's really most kind of you and very much appreciated. I'll still do the third party camera coiurse because there's a lot of useful stuff for me to learn there but at least I'll be able to follow along with the R & D videos while I'm catching up.

    Cheers!
    Last edited by RickTheBlade; 03-07-2011 at 08:01 AM. Reason: typo

  8. #8
    Join Date
    Oct 2006
    Posts
    45
    Funnily enough, I can't get that particular video to load. (Just checked, can't load 55-57)

    What i'd do is reference a Camera rather than the TPController. What a terrain system needs is a transform and a view frustum.
    Last edited by duke22; 03-19-2011 at 10:20 AM.

  9. #9
    Join Date
    Nov 2009
    Location
    Seaford, UK
    Posts
    211
    im having a little trouble on video 52: with using the TPCT instead of TP_controller.

    im using the snippet that was provided above but now when we go to call the TP_controller again to so we can get the characters positon it doesn't seem to work

    Code:
    public void Start ()
    
    			{
    
    				CreateInitialTerrain();
    
    					
    
    				var pos = TPCT.Instance.transform.position;
    
    				TPCT.Instance.transform.position = new Vector3(pos.x, terrain.GetHeight(pos.x, pos.z) + 10, pos.z);
    
    		}
    after completing 2/3 of the third person series today i figured out why this wouldnt work and have rectifyed it but using the TP_Controller
    Last edited by mattcscz; 03-19-2011 at 05:22 PM.
    feed me Rep

  10. #10
    Join Date
    Sep 2010
    Location
    New York
    Posts
    57
    Quote Originally Posted by mattcscz View Post
    im having a little trouble on video 52: with using the TPCT instead of TP_controller.

    im using the snippet that was provided above but now when we go to call the TP_controller again to so we can get the characters positon it doesn't seem to work

    Code:
    public void Start ()
    
    		{
    
    			CreateInitialTerrain();			
    
    			var pos = TPCT.Instance.transform.position;
    
    			TPCT.Instance.transform.position = new Vector3(pos.x, terrain.GetHeight(pos.x, pos.z) + 10, pos.z);
    
    		}
    That's because you didn't use it correctly. You can only reference the transform not a Vector3. You need to make it...
    Code:
     public void Start () 
     {
    	CreateTerrain();
    	TPCT.position = new Vector3(TPCT.position.x,terrain.GetHeight(TPCT.position.x,
    			                                            TPCT.position.z) + 10,TPCT.position.z);
    			
    	// I don't have this TP Controller its a whole nother VTM series - I added the work around above.
    	// var pos = TP_Controller.Instance.transform.position;
    	// TP_Controller.Instance.transform.position = new Vector3(pos.x,
    	//							terrain.GetHeight(pos.x,pos.z) + 10, pos.z);
     }
    I'm posting this for those of you who may need the above for later on and had followed the initial post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •