-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDelta
More file actions
15 lines (12 loc) · 758 Bytes
/
Delta
File metadata and controls
15 lines (12 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
hello my friends, like you i was often confused by when i should use delta, and am still learning, but this is what i have been taught so far.
let V : Velocity
let P : Position
let D : Delta
using (move_toward, move_and_collide, ect)
- Calculating the effect of acceleration (units/second^2) over time. ✅ (V += *D, V -= *D)
- Setting an instantaneous speed (e.g., jump, dash start). ❎ (V = *D)
- Calculating the distance to move this frame from a speed (units/second). ✅ (P += *D)
using (move_and_slide)
- Applying acceleration (e.g., gravity) to your velocity vector. ✅ (V += *D, V -= *D)
- Setting a new speed (e.g., a jump or a constant movement speed). ❎ (V = *D)
- Passing the final, calculated velocity to the function. ❎ (V *= D)