#Cannot find value time in this scope

10 messages · Page 1 of 1 (latest)

cold osprey
#

I have some code from a tutorial and i have this time.delta_seconds but im getting an error saying time doesnt exist. How do i fix this?

rigid void
#

you fix it by not using a value that doesn't exist
with what little you've shown, that's really the only answer we can give you here

cold osprey
#

heres the line of code if u want it: ``transform.translation += direction * PLAYER_SPEED * time.delta_seconds();`

#

im getting an error on the time part

rigid void
#

and why are you expecting there to be a time value that you can use?

cold osprey
#

idk bc it was in the tutorial??? it was a tutorial for bevy 0.10 so something probably changed

rigid void
#

a lot of things have changed between bevy 0.10 and bevy 0.13

#

but I don't think any of them would cause this specific error
you must not have followed the tutorial correctly, missing the part where time is declared

cold osprey
#

aight ill look back on it

#

i found the part. I couldve sworn he never said anything about time in it😭