Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Ok, so I'm making a game in XNA similar to Uplink (computer hacking) and I have a lot of ingame panels that display information, such as mission details, emails, passwords, and so on. To add to the overall feel of the game, I would like to add a dragging effect like the one they had in the Phun physics playground. It is shown in the very beginning of this video: http://www.youtube.com/watch?v=frnglKFPp2I&feature=player_detailpage#t=14s (it is shown in the first few seconds when the guy drags the window around!)

This effect seems to me like it would be complicated, but I'm kind of a noob when it comes to XNA (I know absolutely NOTHING about shaders!!!) If it's too complicated just tell me and I'll ditch the idea because I really don't need it, although it would be nice because the interface is everything in my game.

share|improve this question
You could just render the whole thing to a render Target and then do some transforms to the render-target to get what you want. :) –  Vaughan Hilts Aug 24 '12 at 13:10
@VaughanHilts that's exactly what I'd do. Looking closer at the movement, you should be able to reproduce it simply by applying a shearing transformation for x momentum, and a stretching transformation for y momentum. –  melak47 Aug 24 '12 at 13:35
I'll look into that, thanks! Anyone else have any other methods? –  user1566937 Aug 24 '12 at 13:36
That's going to be your best way short of transforming every control. Just when the mouse moves, apply some velocity to a vector and stretch by that amount slightly; play with the numbers to get the desired effect you want. I'd start with a roughly 2:1 ratio. –  Vaughan Hilts Aug 24 '12 at 13:37
Okay, I'll try that tomorrow. I'll let you know if I have any specific questions. –  user1566937 Aug 24 '12 at 14:53
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.