Results 1 to 11 of 11
  1. #1
    MSgt. Shooter Person
    Join Date
    Mar 2002
    Posts
    214

    Default Mouse Controlled Vehicles

    Is there any way to control a vehicle by using the mouse
    eg: push the mouse forward the vehicle goes down, like a plane?
    Last edited by legacy-tGazza; 11-11-2003 at 01:47 AM.

  2. #2
    legacy-Chunky
    Guest

    Default

    You mean like the redeemer...

  3. #3
    MSgt. Shooter Person
    Join Date
    Mar 2002
    Posts
    214
    oh yea i fogot about that ,
    ill have a look at the way epic does the guided shell.

    heres some pics of what im working on:



    its the dropship from unreal II

  4. #4
    MSgt. Shooter Person
    Join Date
    Mar 2002
    Posts
    214

    Big Grin

    no luck yet,
    can any one show me an example on how to control the pitch and yaw by moving the mouse?

  5. #5
    Redeemer
    Join Date
    Sep 2002
    Location
    Ireland
    Posts
    1,158

    Default

    Originally posted by tGazza
    no luck yet,
    can any one show me an example on how to control the pitch and yaw by moving the mouse?
    In PlayerController.uc a few lines down:

    Code:
    var input float
        aBaseX, aBaseY, aBaseZ, >>> aMouseX, aMouseY, <<<
        aForward, aTurn, aStrafe, aUp, aLookUp;
    In User.ini:


    MouseX=Count bXAxis | Axis aMouseX Speed=2.0
    MouseY=Count bYAxis | Axis aMouseY Speed=2.0


    So, aMouseX and aMouseY control the mouse-movement for the player and the PlayerInput variable of PlayerController.uc handles and processes all the input, look in PlayerInput.uc....and the PlayerInput function does most of the work I'm not so sure about replication tho but that should get you started!

  6. #6
    MSgt. Shooter Person
    Join Date
    Mar 2002
    Posts
    214

    Default

    Thanks [6pk]Shambler but i found a better way

    Code:
    simulated function ClientKDriverEnter(PlayerController pc)
    {
            local vector X,Y,Z;
    	local Rotator ViewRotation;
    
    	//log("Enter: "$pc.Pawn);
    
    	pc.myHUD.bCrosshairShow = false;
    	pc.myHUD.bShowWeaponInfo = false;
    	//pc.myHUD.bShowPersonalInfo = false;
    	pc.myHUD.bShowPoints = false;
    
    	pc.bBehindView = true;
    >>	pc.bFixedCamera = true;   <<here
    	pc.bFreeCamera = False;
    
    	GetAxes(Rotation,X,Y,Z);
    	ViewRotation = Rotation;
            SetRotation(ViewRotation);
    }
    i have another Question:

    how can i make a KeyBind class talk to my vehicle eg:
    player presses a key the vehicle moves forward?

  7. #7
    legacy-Chunky
    Guest

    Default

    You mean like the bulldog... :P

  8. #8
    MSgt. Shooter Person
    Join Date
    Mar 2002
    Posts
    214

    Default

    I've got my craft to yaw and pitch only by changing the values in the script and i want a way to control them without deleting my class then changing the values then recomplying the whole script again, some sort of key control, i don't know how to do that can anyone help?



    sorry about my bad english

  9. #9
    Skaarj
    Join Date
    Nov 2003
    Posts
    7

    Default Key binding to loop move objects

    Hi,
    I like to bind keys to an object that moves in a loop in the map. I like to control its speed through up and down arrow keys. What would be the best way to make it?
    Thanks

  10. #10
    legacy-Chunky
    Guest

    Default

    If you're making a karma based vehicle, look at the bulldog code, if you're not, well there's not much difference between your vehicle and a normal player pawn, so look at the player movement code. The code is spread across both the pawn and controller classes in either case.

  11. #11
    Skaarj
    Join Date
    Nov 2003
    Posts
    7

    Default tutorial for controller/pawn

    Hi,
    I am kind of novish game programmer!
    Is there any tutorial for making controller and pawn?


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.