850176300 / dotween

Automatically exported from code.google.com/p/dotween
0 stars 0 forks source link

DOPunchposition Array index is out of range with full parameters #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create a cube, attached a short script with inside :
using DG.Tweening;

public class cubescript : MonoBehaviour {
    Vector3 dwn;
    // Use this for initialization
    void Start () {
        dwn=new Vector3(0f,-0.5f,0f);
    }

    // Update is called once per frame
    void Update () {

        if (Input.GetKey(KeyCode.Return))
            transform.DOPunchPosition(dwn,1f,0.5f,1f,false);
    }
}
2. => when type on Return, => exception as below
3. => when the parameter is just transform.DOPunchPosition(dwn,1f);, it works.

- What is the expected output?
the cube is moved with a punch 

- What do you see instead? 
Exception 
IndexOutOfRangeException: Array index is out of range.
DG.Tweening.Plugins.Core.DefaultPlugins.Vector3ArrayPlugin.Evaluate 
(Vector3ArrayOptions options, DG.Tweening.Tween t, Boolean isRelative, 
DG.Tweening.Core.DOGetter`1 getter, Single elapsed, UnityEngine.Vector3[] 
startValue, UnityEngine.Vector3[] changeValue, Single duration) (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Plugins/Co
re/DefaultPlugins/Vector3ArrayPlugin.cs:98)
DG.Tweening.Core.TweenerCore`3[UnityEngine.Vector3,UnityEngine.Vector3[],DG.Twee
ning.Plugins.Core.DefaultPlugins.Options.Vector3ArrayOptions].ApplyTween 
(Single prevPosition, Int32 prevCompletedLoops, Int32 newCompletedSteps, 
Boolean useInversePosition, UpdateMode updateMode) (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Core/Tween
erCore.cs:127)
DG.Tweening.Tween.DoGoto (DG.Tweening.Tween t, Single toPosition, Int32 
toCompletedLoops, UpdateMode updateMode) (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Tween.cs:2
00)
DG.Tweening.Core.TweenManager.Update (Single deltaTime, Single independentTime) 
(at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Core/Tween
Manager.cs:178)
DG.Tweening.DOTween.Update () (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/DOTween.cs
:87)

What version of the product are you using? On what operating system?
MacOs 10.9 U3D 4.5.f6 DOTween 0_8_010

Please provide any additional information below.

Original issue reported on code.google.com by ac...@tactic3d.com on 31 Aug 2014 at 8:59

GoogleCodeExporter commented 8 years ago
Fixed (while replicating it I realized there was the same bug in the Shake 
methods and I fixed those too) in the latest 0.8.035: 
http://dotween.demigiant.com/download.php

Original comment by daniele....@gmail.com on 31 Aug 2014 at 1:43