I am trying to learn programing for the first time with panda and python, and I have two questions.
- I am trying to display the coordinates of the mouse on the screen as text. Attached is my attempt, cobbled together from the tilting ball maze tutorial.
my code doesn’t work. What is the bare minimum code required to do this?
from direct.showbase.ShowBase import ShowBase
from panda3d.core import TextNode
from direct.gui.OnscreenText import OnscreenText
class MyApp(ShowBase):
def __init__(self):
ShowBase.__init__(self)
if base.mouseWatcherNode.hasMouse():
OnscreenText(text = base.mouseWatcherNode.getMouseX(), pos = (.5, .5), scale = .1, mayChange = True)
OnscreenText(text = "yet Even MORE EPICfail!!!!", pos = (.5, .5), scale = .1, mayChange = True)
app = MyApp()
app.run()
- What kind of language is created without any expletives? They are always the first things you learn.
Thanks for having a look