ahmed0saber

Position of camera in Python

May 7th, 2021
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. from ursina import *
  2.  
  3. def update():
  4.     global speed
  5.     cube.x+=time.dt*speed
  6.     if abs(cube.x)>3:
  7.         speed*=-1
  8.  
  9. app=Ursina()
  10. speed=1
  11. cube=Entity(model="cube",color=color.rgb(0,0,100),scale=(2,2,2))
  12. camera.position=(-3,2,-25)
  13. app.run()
Advertisement
Add Comment
Please, Sign In to add comment