- Home /
no errors but not working The one who answers, i give him 2 reputation points
no errors but not working
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class player : MonoBehaviour
{
// Start is called before the first frame update
private void start()
{
//old position = new pos
transform.position = Vector3(0, 0, 0);
}
private Vector3 Vector3(int v1, int v2, int v3)
{
throw new NotImplementedException();
}
// Update is called once per frame
private void Update()
{
}
}
,I am new in unity, there are no errors though my code doesn't work. using System; using System.Collections; using System.Collections.Generic; using UnityEngine;
public class player : MonoBehaviour
{
// Start is called before the first frame update
private void start()
{
//old position = new pos
transform.position = Vector3(0, 0, 0);
}
private Vector3 Vector3(int v1, int v2, int v3)
{
throw new NotImplementedException();
}
// Update is called once per frame
private void Update()
{
}
}
I downvoted because you get 5 times more reputation points from one upvote, than what you are proposing. Also, I answered you a long time ago, but you didn't respond.
Why not just set transform.position to Vector3.Zero
Answer by Llama_w_2Ls · Jan 22, 2021 at 12:32 PM
What is your code supposed to do? Your function 'Vector3', which is poorly named, throws a NotImplemented Exception, so it does nothing. Why not just set transform.position to Vector3.Zero
Answer by GDGames0302 · Jan 26, 2021 at 01:11 PM
Hi. You can do the following thing: private void Start() { transform.position = new Vector3(0, 0, 0); } This moves your object that has this script attached to 0, 0, 0.
Answer by eggsit100701 · Jan 23, 2021 at 10:52 AM
@Llama_w_2Ls it s supposed to make my object move to x0 y0 z0.
Answer by eggsit100701 · Jan 25, 2021 at 08:08 AM
The one who answers, i give him 2 reputation points
private Vector3 Vector3(int v1, int v2, int v3)
{
return new Vector3(v1, v2, v3);
}
Your answer
