Skip to content

u/Scolas3

In this archive from Aug 2021 to Sep 2022

0
posts
9
comments
0
media
13
score

Top comments

Remove the faulty semi colon on your last line. Also currently your speed value of 0.1 f means that per update you move that amount.

You should add a „ * Time.DeltaTime „ and normalize your moveDirection as currently you d move faster diagonally. (The magnitude of your vector would be higher then 1)

Also make sure that your monobehaviour is attached to your game object.

Additionally, you could cache your transform on top of your class but I think you don’t have to do that anymore as unity does it somewhat automatically for performance increase. (Isn’t extremely significant for one instance.

Also, write your Script names with uppercase letters. ( just a Convention, not Beck Breaking if you don’t)

Ex. Move PlayerManager GameManager ObjectMovesCircular

3 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.