Jump to content
Search Community

My Bezier curve car is going offroad on chrome mobile

TomWWD test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hey there, I'm posting as I received some great advice with my animation before. The goal is to have the car follow the route, and it seems to work perfectly on mobile.

The pertinent lines of code are below, and shown in action in the codepen

 

.set("#Car", {transformOrigin:"50% 50%", xPercent:-50, yPercent:-50})
.to("#Car", 7, {bezier:{values:MorphSVGPlugin.pathDataToBezier("#CarPath", {align:"#Car"}), type:"cubic", autoRotate:90,},ease:Linear.easeNone})

 

 

However on chrome mobile the linked codepen should produce the car doing doughnuts on the grass area offroad.

 

I'm wondering if anyone can help me identify the code causing it. Hopefully you can replicate the issue as a couple of friends couldn't reproduce in on their devices.

 

Thanks for taking your time to read my post.

 

-Tom.

 

See the Pen KQvaLR by TomBismuth (@TomBismuth) on CodePen

Link to comment
Share on other sites

4 hours ago, Sahil said:

You were using really old version of TweenMax, I updated it to latest version and it fixed the issue on chrome.

 

See the Pen ddVPep by Sahil89 (@Sahil89) on CodePen

 

 

Perfect! Don't know why I was using such an old version, I think I forked it from one of the official GSAP pens.

 

Thanks very much for your help

  • Like 1
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...