Jump to content
Search Community

Recommended Posts

Posted

Sorry guys,

 

I finally found a way to reveal a div with a custom cursor. The thing is the mask is not moving enough. If you move your cursor you can see the circle stays away from the current position of the cursor. Is there a solution to fix this? Thanks a lot!

 

See the Pen PoepGrM by talewoy290 (@talewoy290) on CodePen.

  • momo12 changed the title to GSAP Custom cursor is not moving enough!
Posted

If you mean the mask is moving too slowly, then you could specify a shorter duration for your tweens, like 

  gsap.to($middlemask, {
    x: e.clientX,
    y: e.clientY, 
    duration:0.2
  });

- it's just using the default 0.5 right now. But maybe that's not what you mean?

Posted
20 minutes ago, geedix said:

If you mean the mask is moving too slowly, then you could specify a shorter duration for your tweens, like 

  gsap.to($middlemask, {
    x: e.clientX,
    y: e.clientY, 
    duration:0.2
  });

- it's just using the default 0.5 right now. But maybe that's not what you mean?

@geedix It stays behind the cursor.

Posted

Hi @momo12,

 

If you want for the element to be where the pointer is all the time, then just use a set() instance or a really short duration (less than 0.1)

 

Happy Tweening!!!

  • Like 1
Posted
2 hours ago, Rodrigo said:

Hi @momo12,

 

If you want for the element to be where the pointer is all the time, then just use a set() instance or a really short duration (less than 0.1)

 

Happy Tweening!!!

The reason it doesn't work was the "Wrong initial position" of the mask div. I came up with a custom solution. changing a few pixels(100px) the current position of the cursor and assign it to the X and Y values of the mask.

Posted

Hi momo!

I'm not sure I understand good, sorry for my bad english, but try position fixed on your .middle-mask element. Does help you?

 

 

Best Regards!

Sam

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...