CCMotionStreak in CocosSharp Not Working

I'm working with CocosSharp in Visual Studio for Mac and I'm trying to get CCMotionStreak to work but I've not had much luck.

It seems to be setup correctly but I can't get it to move. Setting the position does nothing, it's always at 0,0.

Has anyone been able to get this to work? Also, this is in an Android project.

  private void ResetMotionStreak ()
    {
        RemoveChildByTag(MOTION_STREAK_TAG);
        var motionStreak = new CCMotionStreak(0.5f, 1, 10, CCColor3B.Green, "line");
        AddChild(motionStreak, 1, MOTION_STREAK_TAG);
    }

    private void AddMotionStreakPoint (CCPoint point)
    {
        var streak = GetChildByTag(MOTION_STREAK_TAG);
        streak.Position = point;
    }

    void OnTouchesBegan(List<CCTouch> touches, CCEvent touchEvent)
    {
        if (touches.Count > 0)
        {
            ResetMotionStreak();
            AddMotionStreakPoint(touches[0].Location);
        }
    }

    void HandleTouchesMoved (System.Collections.Generic.List<CCTouch> touches, CCEvent touchEvent)
    {
        if (touches.Count > 0)
        {
            AddMotionStreakPoint(touches[0].Location);
        }
    }
Sign In or Register to comment.