[ad_1]
Game Development Stack Exchange is a query and reply website for skilled and unbiased sport builders. It solely takes a minute to enroll.
Anybody can ask a query
Anybody can reply
The greatest solutions are voted up and rise to the highest
Asked
Viewed
7 instances
Im making an attempt to maneuver my Character on the worlds XYZ Axis.
however how do i get them?
I do this as a result of my Player is kinda kind of a Sphere and is rolling round, so is xyz instructions are rotating.
I believed i can repair it when i let him transfer with the worlds xyz.
Does somebody understand how or perhaps understand how else to get this?
Silwan is a brand new contributor to this website. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
2
This is my present code to maneuver my Playerobject:
public float playerSpeed = 20;
public float verticalInput;
public float horizontalInput;
// Update is named as soon as per body
void Update()
{
verticalInput = Input.GetAxis("Vertical");
remodel.Translate(Vector3.ahead * Time.deltaTime * playerSpeed * verticalInput);
horizontalInput = Input.GetAxis("Horizontal");
remodel.Translate(Vector3.proper * Time.deltaTime * playerSpeed * horizontalInput);
}
however how i already mentioned;
My object clearly rotates and thats completly fantastic however i dont need that the Axis rotates with it as a result of if the axis rotates it stucks within the floor when it is going to go ahead.
I hope you unterstand what i strive xD
Silwan is a brand new contributor to this website. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
You should log in to reply this query.
Not the reply you are on the lookout for? Browse different questions tagged .
lang-cs
[ad_2]