Jump to content
Search Community

Bug where mouse effect increasing over time

JonoUWE test
Moderator Tag

Recommended Posts

 

See the Pen JYpOOK by osublake (@osublake) on CodePen



I've forked Blake Bowen's amazing procedural grass pen to add a mouse movement effect, which I've got working but it's got a bug where the effect the mouse has increases over time, so it starts too subtle, goes through a sweet spot of looking natural but quickly goes past that to being too strong an effect which looks way too jittery to be natural. I've been trying lots of different stuff but no joy. I logged a few values for things like the currentSpeedMultiplier and the targetSpeedMultiplier but they seem to remain stable over time. If anyone else can spot the cause of this I would love to know!

See the Pen yLdBodK by mrjonoces (@mrjonoces) on CodePen

Link to comment
Share on other sites

Hi,

 

Blake's demos are not the simplest ones to follow and modify/enhance. There is a lot of code there and honestly I don't have time to dig into it and check where to look for. Maybe you can point us where to look exactly in order to check what could be the problem and how to solve it.

 

Happy Tweening!

Link to comment
Share on other sites

Hey Rodrigo. Yes I appreciate it's a lot of code, I should have narrowed it down a little more. I'm pretty sure it's due to time in the 'Grass update function' section. Resetting time stops the issue but has the effect of visually resetting the scene which doesn't work. I also tried reducing other factors as time progresses which had a big improvement, but I got called away from that computer in a rush before I got a chance to push the changes and update the pen. I'll do that on Monday when I'm next at work

Link to comment
Share on other sites

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...