0
votes
0answers
54 views

2D animated sprite jumping and gravity physics

I'm currently writing a Megaman clone for my school project. So far all I did was making the character run and stay put when needed. Know I want to be able to make him jump using the 'X' button. I ...
-1
votes
2answers
62 views

Speeding up sprite the second time it passes the screen [closed]

I'm a student studying Games Development. I want a sprite to speed up on it's second passing of the screen. How do I do this? Code I wrote so far: public class Game1 : Microsoft.Xna.Framework.Game { ...
1
vote
2answers
120 views

How to Calculate Velocity in a 2D space game

I am currently using screenpos.X = (float)(screenpos.X + velocity * Math.Sin(r)); screenpos.Y = (float)(screenpos.Y - velocity * Math.Cos(r)); For my Movement with r being the Rotation in Radians. ...
0
votes
2answers
201 views

How can I make an object's hitbox rotate with its texture?

In XNA, when you have a rectangular sprite that doesnt rotate, it's easy to get its four corners to make a hitbox. However, when you do a rotation, the points get moved and I assume there is some kind ...
0
votes
2answers
304 views

Making The Player Stop Bouncing And Stop Sinking In The Ground In A Platformer XNA

Heres a problem i've been having. I have a platformer, and whenever my player hits the ground he keeps bounding. Here's the falling code iceBoy.moveY++; iceBoy.position.Y += moveY; Now heres the ...
1
vote
1answer
489 views

Collision detection against specific sprite shape using XNA with Farseer Physics?

I am making a 2D XNA Game, using Farseer Physics for collisions. I need collisions to be resolved against the actual shape of the sprite image, ignoring transparent pixels, rather than against the ...
-2
votes
1answer
119 views

Help finding a good XNA physics library? [closed]

I'm looking for a good physics library for XNA. Can anyone help me find something good, simple and easy to learn for XNA?
0
votes
1answer
140 views

Separating Axis Theorem fails at certain angles

I'm currently attempting to add an overlap tester for an axis aligned and orientated bounding box but the solution only seems to work accurately when the OBB's angle is between -10 and +10. As the ...
5
votes
3answers
647 views

'Spring' physics

I'm trying to put together a struct or a method of some sort that will allow me to check the relative position between two objects, and if they're too far apart, apply a force that will draw them ...
3
votes
3answers
839 views

Moving a body in a specific direction using XNA with Farseer Physics

I have a custom polygon attached to a body, which looks like this: What I am trying to accomplish is getting the body to move according to wherever the tip of the body is. So far this is what I've ...
6
votes
3answers
646 views

How do I make a moving object stop smoothly at the end of a path?

There are a dozen ways I could word this question, but to keep my thoughts in line, I'm phrasing it in line with my problem at hand. So I'm creating a floating platform that I would like to be able ...
2
votes
2answers
437 views

One-way platform collision

I hate asking questions that are specific to my own code like this, but I've run into a pesky roadblock and could use some help getting around it. I'm coding floating platforms into my game that will ...
4
votes
1answer
1k views

Friction in 2D game

I'm developing a 2D platformer, although this question could probably apply to just about any 2D type physics; What is the equation for friction? I have sort of a hacky type of friction set up in my ...
5
votes
1answer
431 views

2D Magnet-like repelling behavior

If somebody wanted to develop a system between two intersecting rectangles so that the rectangles would, in a gradual process, push eachother away from one another until no longer intersecting, with ...
1
vote
2answers
293 views

Building a shape out of two rectangles

I would like to build a body with Farseer out of two rectangles so it looks like this: I am a real beginner, so please describe it carefully. Thanks in advance!