playMaker

Author Topic: Click to move and iTween alternatives?  (Read 5739 times)

DIamod

  • Playmaker Newbie
  • *
  • Posts: 17
Click to move and iTween alternatives?
« on: April 09, 2019, 06:06:39 AM »
Hi, I am following this tutorial and adapting it to for VR, the tutorial uses the iTween actions which I understand were but can be enabled through the welcome menu.

I have enabled these but get quite a lot of errors such as
Code: [Select]
Assets\PlayMaker\Actions\iTween\iTweenLookFrom.cs(32,10): error CS0246: The type or namespace name 'iTween' could not be found (are you missing a using directive or an assembly reference?)

I assume there is no support for this as it has been depreciated? could someone help with an alternative for this? I had a look at https://assetstore.unity.com/packages/tools/input-management/simple-vr-teleporter-115996 which seems to be ideal and what I am after but I am unsure how to make this work with playmaker?



Following this up with some more FSM I have been working on.

The FSM is as follows

a raycast is fired and stores the "hit point" in a global variable "globalhitlocation"
the next state is a "move object" that specified the camera prefab I am using, however I am unable to set the "Destination" as it does not have the global variable from the previous state, only a "game object" global set in another FSM.

Is "move object" unable to have a vector3 as its Destination variable?
« Last Edit: April 09, 2019, 06:58:32 AM by DIamod »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7620
    • jinxtergames
Re: Click to move and iTween alternatives?
« Reply #1 on: April 09, 2019, 08:27:27 AM »
Hi.
You are getting a lot of errors as you probably did not get Itween from the asset store.

The one on the welcome screen only holds actions for the asset.

For simple movement you can use interpolate action together with set position actions.

here are some links for dotween :

DOTween asset
https://www.assetstore.unity3d.com/en/#!/content/27676

Paid DOTween actions
https://www.assetstore.unity3d.com/en/#!/content/49222

Free DOTween actions
http://hutonggames.com/playmakerforum/index.php?topic=10303.msg48638#msg48638

I have not used them much myself so i can't say which are better

DIamod

  • Playmaker Newbie
  • *
  • Posts: 17
Re: Click to move and iTween alternatives?
« Reply #2 on: April 09, 2019, 11:11:37 AM »
Thanks, I ended up using "move toward" and set the max speed to 50 so it's just as good as teleporting I think.

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: Click to move and iTween alternatives?
« Reply #3 on: April 09, 2019, 11:49:13 PM »
Hi, just a follow up on this. "Normally" in teleporting, you dont need to move to (with a tween), but rather you just set a new position on your gameobject. Moving (with a tween) is for if you want a dash type effect or "walking" to the new position.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7620
    • jinxtergames
Re: Click to move and iTween alternatives?
« Reply #4 on: April 10, 2019, 01:41:12 AM »
Hi.

Indeed as tcmeric said for 'Teleporting' you can use the 'hit point' and 'Set Position'

Depending on the pivot point of your player, you might not want to position the Y direction.
If this is the case, you can use "Get Vector3 XYZ" to split the vector into floats for each direction.

Then only use X and Z on the 'Set Position' action.