P
P
Pragma Games2021-06-09 13:10:53
Unity
Pragma Games, 2021-06-09 13:10:53

How expensive is it to use RaycastHit?

I use RaycastHit to detect the character by enemies, this operation is done in the update function, how bad is that? Or is it better to use a coroutine and fire a beam at certain intervals?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2021-06-09
@freeExec

And why is curutina here, you can watch at update time and start it after a certain time.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question