K
K
Komoro4eK2021-03-09 02:26:42
C++ / C#
Komoro4eK, 2021-03-09 02:26:42

Unity doesn't see Input.GetAxis / Time.fixedDeltaTime?

When writing a script, the unit does not highlight this even in the tooltip, but in the script it generally highlights "Time.fixedDeltaTime" and "Input.GetAxis" as a variable (like speed, movement, etc.)
Here is the script:
using System.Collections.Generic;
using System.Collections;
using UnityEngine;

public class CarPhysics : MonoBehaviour {

public Rigidbody2D frontWheel;
public Rigidbody2D backWheel;
public float speed = 100;
private float movement;
void start () {

}
void update () {
movement = Input.GetAxis("Horizontal");
}

private void FixedUpdate()
{
backWheel.AddTorque(movement * speed * Time.fixedDeltaTime);
frontWheel.AddTorque(movement * speed * Time.fixedDeltaTime);
}
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
GavriKos, 2021-03-09
@GavriKos

So, are there any compilation errors? Which?
The fact that your ide does not understand UnityEngine is only an ide problem.
By the way, Start and Update are capitalized

A
Andrey Nikolaev, 2017-12-28
@BimkY

Try like this:

$sql = "SELECT
  `login`,
  `prava`,
  CASE
    WHEN prava=1 THEN 'Модератор'
    WHEN prava=3 THEN 'Ст. Модератор'
    ELSE 'Не определены'
  END user_role
FROM accounts
WHERE prava >= 1";

$prava = R::getAll($sql);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question