Sign in to follow this  

How do you draw a trail effect behind a users cursor

This topic is 2841 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi All, I'm after a way of drawing a trail that fades off behind the users mouse cursor. Im using WPF which sadly lacks much support for directly drawing pixels to a screen, but I think I can get some of it to work if I get some of the theory behind it. So, typically (in 2d space), how would someone draw/create the effect of a trail that follows the users cursor, with simple effects like fading away, and if possible, combining to create a goo/water like effect. Im not sure if Im really asking a specific question here, but Im just after some ideas as to how to draw some of these types of effects. There is a blogger that I am following with this post: http://www.cynergysystems.com/blogs/page/rickbarraza?entry=advanced_render_techniques_with_writeablebitmaps which is just brilliant, but Im not sure how to extend it further (more that just a line and an ellipse) and I dont really understand the bit-wise operations that he uses for the colors etc... Thanks for any help you can give me Cheers, Mark

Share this post


Link to post
Share on other sites
An easy solution would be to keep the last X positions of the cursor and draw the cursor at each position - with newest cursor at highest alpha and oldest cursor at lowest alpha.

Catalin Zima had a good post on mimicking the cursor from world of goo. here

Share this post


Link to post
Share on other sites
Hi glaeken, that kind of theory is kind of a given, but that blog post looks awesome and I will give that a good looking into!

Thanks a lot

Share this post


Link to post
Share on other sites

This topic is 2841 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this