Path: chuka.playstation.co.uk!news From: "John \( QuietBloke \)" Newsgroups: scee.yaroze.freetalk.english Subject: Re: joystick directions Date: Mon, 8 Jul 2002 23:54:36 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 52 Message-ID: References: <3D28AB1D.8010407@100Tinsoldiers.com> <3D29F54D.4040007@100Tinsoldiers.com> NNTP-Posting-Host: host213-122-136-176.in-addr.btopenworld.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 First off.. hi all.. sorry Ive been away so long but I havent gone for good.. Yaroze is too much fun to leave alone for too long. As for the question.. I must admit Ive never tried using the analog controls but I assume you get an x and y value of -127 to 128 or something. If thats the case you can store a value for the direction the player is pointing. -127 = to the left and 128 to the right. Now if the player is pointing left ( -127 ) and the player gently pushes to the right you can add the x value of the controller to the player angle. therefore the player angle should slowly increase till he faces forward and when it reaches 128 he is now facing to the right. If the player yanks to the right he will turn instantly ( ish ). errmm.. Something liek that.. I just re-read you post and you got the player facing towards and away from the screen so you would probably need to store the player angle as a full 360 degrees instead but something along those lines might do the trick. "Nigel Critten" wrote in message news:3D29F54D.4040007@100Tinsoldiers.com... > Who knew this was going to turn out so complicated :) > > Right thanks to pal I've got the object pointing in the direction of the > analog stick is moved in, so push the joystick forward and the character > looks into the screen, pull the joystick back and he looks out of the > screen, left he looks left, right he looks right and all the other > angles inbetween which is superb. > > The problem is getting him moving, if this was a space ship I could > attach the thrust to one of the fire buttons but I want him to move in > the same way Luigi moves on the Gamecube. So from a standing start you > push the joystick right and as he turns to face the right he should > already start to move in that direction, the more to the right you push > it the faster he walks, then if you push it to the left while he starts > to turn left he starts walking left, but to make things even more > complicated for myself, if you are looking right and move the joystick > slowly left he would slowly turn to the left and then walk in that > direction, thinking about it that should be easy enough if you have the > walk set to activate later than the turn so you have a larger dead zone > for the walk than for the turn... hmm I'm completely lost, any more > offers of help would be most welcome... > > Cheers > Nigel. > www.100tinsoldiers.com > www.netyaroze-europe.com/~ncritten >