Answers for "ursina"

1

ursina

from ursina import *

def update():
    if held_keys['a']:
        button.x -= 4 * time.dt
    
    if held_keys['d']:
        button.x += 4 * time.dt
    
    if held_keys['s']:
        button.y -= 4 * time.dt

    if held_keys['w']:
        button.y += 4 * time.dt        
    
app = Ursina()

button = Entity(model = "circle", color = color.red, scale = (0.5, 0.5), position = (0, 0))

app.run()
Posted by: Guest on February-19-2021

Browse Popular Code Answers by Language