Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9108275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:46:13+00:00 2026-06-17T02:46:13+00:00

currently having some fun in XNA programming a topdown shooter towards the XBox-controller but

  • 0

currently having some fun in XNA programming a topdown shooter towards the XBox-controller but I’m having some issues right now.

So I move my character with the left thumbstick and aim with my right, so essentially I can move in any direction and still shoot in 360 angle. What I have right now works, but it’s very sensitive and “tacky”, it likes to stick a bit extra on all the 90 angles before it moves on to the next angle if I’m moving the thumbstick in a perfect outer circle.

So this is what I have right now:

direction.X = gpState_new.ThumbSticks.Right.X;
direction.Y = gpState_new.ThumbSticks.Right.Y;
rotation = Math.Atan2(direction.Y, direction.X);

And then when I draw the player I use rotation as the angle of which I’m drawing it.
Do you got any tips on how to do this better ?

Fredrik

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T02:46:14+00:00Added an answer on June 17, 2026 at 2:46 am

    It looks like this is because of the “deadzone” on the stick. The basic fix is probably something like is to use GamePadDeadZone.Circular. Perhaps before your code, something like

    GamePadState gpSTate_new = GamePad.GetState(playerIndex, GamePadDeadZone.Circular);
    

    A very similar question was asked on GameDev (and you can see a more detailed answer there), which you might have better luck on with this kinds of questions in the future.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently messing with C# XNA 4.0, but I am having some problems
Currently having some problems- now = datetime.datetime.now() month = now.strftime(%B) site = wikipedia.getSite('en', 'wikiquote')
I am currently transitioning from VB to C# and am having some issues with
I am currently learning C, and am having some issues with trying to make
I'm trying to build firefox but I'm having some problems. I currently have Visual
I'm having some serious issues with a WinForm application that I'm working on. Currently,
Currently, working with RC0 Denali, having some issues I am attempting to review data
I am having some issues configuring the options for Simian Currently I have <buildArgs>-includes=**/*.cs
I've been having some fun with Flash developing IOS apps. I currently have two
I'm currently having some problems with setting up the right routes for my application.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.