Hi Everyone,
I’m a bit of a noob. still learning.
I have read like to make it moving things not depend on framerate, multiplying it to Time.deltaTime makes it do not depend on framerate.
For navmeshagent movement(like agent.destination = destination; )
Do i need that Time.deltaTime thing to make it non depend? or not?
If yes how do i do it?
In this case you don’t need to do that because the movement is processed by the navmesh itself and it takes care of it.
You only need to do that when you’re calculating the values and do the movement yourself.
In this case you only give a location (preferably one time and not every frame).
On my project use like a click then the character tries to go to that location. so the destination is set once.(but called many times).
but i’m worried like on other computers with fast framerate. the character goes faster.
is it fine i put the
agent.destination = destination; in the update method?
how do i make it do 1 step to go to destination? without just setting it again like the one above(agent.destination = destination; )
like a function to do it?
This is setting the destination only once: when you hit the mouse button. This is good. As I said, you should set a destination once. If you click again, you should set it again.
Hi Lurking Ninja,
Thank you for responding again.
Sorry i was not able to understand it at first.
Now i understand a bit.
This is the thing i was looking for.