Sanjin1

Untitled

Sep 28th, 2021
1,046
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from ursina import *
  2.  
  3. app = Ursina()
  4.  
  5. circle = Entity(model = 'sphere',
  6.                 collider = 'box',
  7.                 color = color.green,
  8.                 scale = 1,
  9.                 position = (0,3,0),
  10.                 texture = 'grass')
  11.  
  12. square = Entity(model = 'cube',
  13.                 collider = 'box',
  14.                 color = color.yellow,
  15.                 scale = (3,1),
  16.                 position = (0,2,0),
  17.                 dy = -0.01,
  18.                 texture= 'brick')
  19.  
  20. circle = Entity(model = 'sphere',
  21.                 collider = 'box',
  22.                 color = color.pink,
  23.                 scale = 1,
  24.                 position = (0,-2,0),
  25.                 texture = 'sky_sunset')
  26.  
  27. def update():
  28.     square.y += square.dy
  29.    
  30.     hit_info = square.intersects()
  31.     if hit_info.hit:
  32.         square.dy = -square.dy
  33.        
  34. EditorCamera()        
  35.  
  36. app.run()
RAW Paste Data