Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - r_chevallier

Pages: [1]
1
DOTween & DOTween Pro / Dotween Pro easeType
« on: February 06, 2016, 02:27:36 AM »
Hello,
I purchased Simple Waypoint System and was hoping to be able to change easeTypes at differnt Waypoints on a single spline which is only a single tween. It is not possible to do this with SWS. I was wondering if Dotween Pro will support this feature in the future? It would be a great feature for objects that do not have a constant speed.

2
DOTween & DOTween Pro / DOTween Pro
« on: January 25, 2016, 09:32:27 AM »
Hello,

I have yet to purchase DOTween Pro but I have a question on its functionality.

If a game object ,in my case a camera, is animated along a path can DOTween tell the camera to stop at the waypoints and wait for a certain event to happen before proceeding along the rest of the path? I have never used waypoints before.

Also the Simple WayPoint System asset(I don't have this asset yet) uses your DOTween code. Which asset, yours or Simple Waypoint System would be better for the camera on a path scenario?

Thankyou,

3
DOTween & DOTween Pro / transform.forward equivalent?
« on: December 03, 2015, 07:37:10 AM »
Hello,

I have a rocket prefab that spawns in different directions throughout the game so I can't just have 1 transform move direction.

Is their an equivalent to "transform.forward". Your asset is much easier to move objects than Unity's native code.

I have gotten the below Unity code to work but want to use your asset for better control.
transform.Translate(Vector3.right * Time.deltaTime * speed,Space.Self);

Thanks,
Raymond

4
How about in a simple game such as Q-bert or even Crossy Road. These are basicly grid movements by interger units and the players movent needs to be completed before the next movement is calculated(great for keeping it aligned with the grid). The only reaction in these games is when the player dies. Would DOTween be exceptible in this type of scenario. Your DOJump for example seems like a good reason to use it in a game like Q-bert or Crossy Road. Again for me, probably because I am more on the art side DOTween is more intuitive.

Or would it be better just to play a jump animation along with moving the Players transform.

Thanks for your input.

5
I know your product is good for animating objects in a game but I wanted to reconfirm using your product for Character movement.

I have already started using your product to move my enemy character around. I wanted to ask is DOTween an exceptable way to set up the movement of the main Player too vs. using getAxis and traditional transfrom movement scripting. Is it more expensive on the processor or equal to using traditional Unity player controllers scripting.

The reason I am using your product is it seems much more intuitive from a scripting aspect and for myself I have more control over how I want the movements to be structured.

Thanks.

6
DOTween & DOTween Pro / Re: Sequences and SetEase
« on: July 09, 2015, 12:05:40 PM »
Hello,

Getting closer to my code working properly.

This is a basic question I'm sure but I cant get it right.

I am trying to SetEase but I am getting an error. What is the right way to write this line of code.

mySequence.Append(transform.DOMove(new Vector3(1,0,0), 0.5f).SetRelative.SetEase(Ease.Linear));


Thank You.

7
DOTween & DOTween Pro / RE: bool isComplete()
« on: July 07, 2015, 11:55:39 AM »
Hello,

Here is a more revised script. I am trying to make sure sequence is complete before allowing enemy to move. I have set up my conditions in update and am using a utility class script to hold collision information. This part works but this is my problem: My enemy character moves almost 3 units at a time when I only want him to move one unit when the right collisions occur. I am trying to set up "bool isComplete" to get the movement right but am having trouble.

I will eventually have more move directions in place but for now I just have move Forward. Please advise how and where to paste the proper DOTween  "bool isComplete" script.

I do have "bool isComplete = mySequence.IsComplete();" in Start. I am not sure if this is the proper location.

Thanks in advance.

Here is my script:

public class EnemyMove : MonoBehaviour {
   
   //public bool isComplete = true;
   private bool isMoving = false;
   private TriggerParent leftTrigger;
   private TriggerParent frontDownTrigger;
   private TriggerParent frontTrigger;
   private Sequence mySequence;

   internal bool rotatePosDown = false;

   public GameObject frontBounds;                  //trigger for sight bounds
   public GameObject frontDownBounds;      



   void Awake()
   {      

   
      if(frontBounds)
      {
         frontTrigger = frontBounds.GetComponent<TriggerParent>();
         if(!frontTrigger)
            Debug.LogError("'TriggerParent' script needs attaching to enemy 'SightBounds'", frontBounds);
      }
      if(!frontBounds)
         Debug.LogWarning("Assign a trigger with 'TriggerParent' script attached, to 'SightBounds' or enemy will not be able to see", transform);
      
      if(frontDownBounds)
      {
         frontDownTrigger = frontDownBounds.GetComponent<TriggerParent>();
         if(!frontDownTrigger)
            Debug.LogError("'TriggerParent' script needs attaching to enemy 'attackBounds'", frontDownBounds);
      }
      else
         Debug.LogWarning("Assign a trigger with 'TriggerParent' script attached, to 'AttackBounds' or enemy will not be able to attack", transform);
   }

   // Use this for initialization
   void Start () {
      Sequence mySequence = DOTween.Sequence();
      bool isComplete = mySequence.IsComplete();
   }


   void Update() {

      //Moving forward
      if (frontTrigger && !frontTrigger.colliding && frontDownTrigger && frontDownTrigger.colliding)
      {

         // Move one step forward
         Move("forward");

         
      }
   }

void Move(string moveDirection)
{
   if( isMoving == false)
   {
      // The object is moving
      //isMoving = true;
      
      switch( moveDirection.ToLower() )
      {
         
      case "forward":
            
            print("foward");
            mySequence.Append(transform.DOMove(new Vector3(1,0,0), 0.5f).SetRelative());
            

            break;
            
      case "right":
            
            mySequence.Append(transform.DORotate(new Vector3(0, 90, 0), 0.25f).SetRelative());
         
            break;

         }
      }
   }
}


Thanks again.

8
DOTween & DOTween Pro / Re: If Statement and Sequences
« on: June 26, 2015, 11:34:08 AM »
I modified my question near the end. What do you think of my attemp of checking if the enemy is positioned on an Interger. If this works this would prevent any premature movement until DOMove has landed the enemy on a whole number. I am moving 1 unit at a time.

Thanks,
R_Chevallier

9
DOTween & DOTween Pro / If Statement and Sequences
« on: June 26, 2015, 11:16:15 AM »
Hello,

I am setting up a simple enemy ai script using DoTween.

I have 4 trigger points on the enemy. Depending on which trigger is triggered the enemy will move and rotate a certain direction.

My question is when I have more than one IF statement in Update does it wait untill completion of a DOMove Sequence(after the enemy has moved to the designated position) to recheck if any of the other "IF" Statements are true. Or will Update check to see if any "If" statements are true even before the completion of the Sequenced DOMove designated position has been reached. My code is not final or tested and written for this question only so far.

My movement is similar to grid system movement as I want all end positions to land on an Interger so my concern would be that another If statement would interupt the completion of the enemies movement thus the new movment would begin too soon.


Sample Code:

 void Update()
   {
   
       //forward
   if (oneTrigger && twoTrigger.colliding)
       
       Sequence mySequence = DOTween.Sequence();
      mySequence.Append(transform.DOMove(new Vector3(1,0,0), 0.5f).SetRelative());
       
        //Down
       else if (!oneTrigger && !twoTrigger.colliding)
       
        // Set the new target Rotation and new target Move
       Sequence mySequence = DOTween.Sequence();
        mySequence.Append(transform.DORotate(new Vector3(0,90,0), 1));
   mySequence.Append(transform.DOMove(new Vector3(1,0,0), 0.5f).SetRelative());

       //Turn
       else if (oneTrigger && threeTrigger.colliding)
       
        // Set the new target Rotation and new target Move
       Sequence mySequence = DOTween.Sequence();
        mySequence.Append(transform.DORotate(new Vector3(0,180,0), 1));
   mySequence.Append(transform.DOMove(new Vector3(1,0,0), 0.5f).SetRelative());
       
       
      {

As a safeguard againts moving to soon I might add something like this to see if the enemy is positioned on a Interger:
   
     public int myX = (int)transform.position.x;
     public int myZ = (int)transform.position.z;

 void Update()
   {
   if (!oneTrigger && !twoTrigger.colliding && myX==int && myZ==int)

        Sequence mySequence = DOTween.Sequence();
      mySequence.Append(transform.DOMove(new Vector3(1,0,0), 0.5f).SetRelative());

//I am not sure if this add on of the Int would be necessary?

Thanks
R_Chevallier

10
Thanks,

It works great. I have another question. I just noticed that there is a DOLocalJump in the transform Documentation. Is this the same as useing the "setRelative" for DOJump that you just added.

I will be sure to give you outstanding reviews on the ASSET STORE. :)

________________________________________________________________

New Question:
I have purchased another asset from the asset store and I am changing out some of there Player code with DOTween.

They have a line of code for movement if the up arrow is pressed(below):
     targetPosition = thisTransform.position + new Vector3(1, 1, 0);

I added your DOJump code(below):
     thisTransform.DOJump(new Vector3(1,1,0),2, 1, 0.5f, false).SetRelative();

Is there a way I can define the "targetPosition" to = the new DOJump code. Such as (this does not work but explains what I am trying to do):
     targetPosition = thisTransform.DOJump(new Vector3(1,1,0),2, 1, 0.5f, false).SetRelative();


Thanks in advance.


11
Hello,

I downloaded the updated files for DOJump to jump to different Y heights. Here is my test code I applied to a cube:

transform.DOJump(new Vector3(1,1,0),2, 1, 0.5f, false).SetRelative();

The problem I am having is "SetRelative" is not working. The object still jumps to the Global position.

What am I doing wrong?

Thanks for your help.

Pages: [1]