Hi, ok i sort of understand what you mean. ill have to do a bit of research.
The only reason i need the platform as the parent is that when the player jumps up and down (when on the platform) they move with the platform horizontally too.
this is the script im currently using for my moving platform (works ok), can this be achieved in playmaker alone? behavior is like itween ping pong.
using UnityEngine;
using System.Collections;
public class MovingPlatform : MonoBehaviour {
public Transform DestinationSpot;
public Transform OriginSpot;
public float Speed;
public bool Switch = false;
void FixedUpdate()
{
// For these 2 if statements, it's checking the position of the platform.
// If it's at the destination spot, it sets Switch to true.
if(transform.position == DestinationSpot.position)
{
Switch = true;
}
if(transform.position == OriginSpot.position)
{
Switch = false;
}
// If Switch becomes true, it tells the platform to move to its Origin.
if(Switch)
{
transform.position = Vector3.MoveTowards(transform.position, OriginSpot.position, Speed);
}
else
{
// If Switch is false, it tells the platform to move to the destination.
transform.position = Vector3.MoveTowards(transform.position, DestinationSpot.position, Speed);
}
}
}