L
L
LittleBob2021-12-13 21:25:01
Unity
LittleBob, 2021-12-13 21:25:01

How to make a check in if that the object does not move?

It is necessary to somehow write in the if condition that the transform.position does not change, that is, the object does not move. How to do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nekit Medvedev, 2021-12-14
@LittleBob

https://docs.unity3d.com/ScriptReference/Transform...
I don't know how this property will react to RigidBody, but judging by the description, this is what you need.

F
freeExec, 2021-12-13
@freeExec

transform.position == old_position => object_didn't move

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question