Skip to content

XML-Element "body" not found in Logo.xml #55

Description

@MasterFlu

Hi.
First of all thank you for that grad tool/plugin.
Now back to my problem:
i built a scene in Unity and the exporting worked fine. I compiled my project and it runs.
but if i add a cube to this scene and give him this script i get the exception: XML-Element "body" not found in Logo.xml

Here the script:

using UnityEngine;
using System.Collections;

public class moveToPoint : MonoBehaviour {

public int speed = 1;
public int targetRadius = 3;
private Vector3 target;
public RaycastHit hit;



// Use this for initialization
void Start () 
{
    //rigidbody.freezeRotation = true;
    target = transform.position;
}

// Update is called once per frame
void FixedUpdate () 
{
    //target.y = transform.position.y;

    foreach (Touch touch in Input.touches)
    {
        if (touch.phase == TouchPhase.Began)
        {
            Ray ray = Camera.main.ScreenPointToRay (touch.position);

            if(Physics.Raycast(ray, out hit))
            {
                target = hit.point; 
            }
        }
    }

    if (Vector3.Distance(transform.position, target) > targetRadius) 
    {
        //animation.Play("Default Take");
        transform.LookAt(target); 
        transform.Translate(0,0,speed);                 
    }
}

}

what going wrong in here. hope someone can give me a solution for that. first i thjougt i forgot a rigidbody but this was not the mistake.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions