Avatar
Welcome, Guest

Topic: WHEN TO USE TIME.DELTATIME AND WHAT IS THE REASONING OF MULTIPLYING BY TIME.DELTATIME ?

Posts: 4 Likes: 1

OFFLINE

Can somebody explain to me a bit how Time.deltaTime works?
I find people multiplying by Time.deltaTime for moving object positions objects.
what would the difference be between these two snippets of code : 
________________________________________________________
transform.position = Vector3.Lerp(transform.position, target, smoothing * Time.deltaTime);
______________________________________________________
transform.position = Vector3.Lerp(transform.position, target, smoothing);

Posted : 3 weeks 1 day ago top

Posts: 1 Likes: 0

OFFLINE

Time.deltaTime is the time to render one particular frame i.e. 60 frames/1 sec. It can be used for time related functions!

Posted : 2 weeks 6 days ago top

2 Item(s)

per page
Copyright 2017, GameGorillaz.
Game Gorillaz name and logo is registered trademark of Miracle Studios Pvt Ltd.