简体   繁体   中英

Ursina FirstPersonController camera moving way too fast

from ursina import *
from ursina.prefabs.first_person_controller import FirstPersonController


class Voxel(Button):
    def __init__(self, position):
        super().__init__(
            parent=scene,
            position=position,
            model='cube',
            origin_y=0.5,
            texture='white_cube',
            color=color.white,
            highlight_color=color.lime
        )


app = Ursina()
for z in range(8):
    for x in range(8):
        voxel = Voxel(position=(x, 0, z))

player = FirstPersonController()
app.run()

I'm following this tutorial on a basic Minecraft clone to learn Ursina, but when I add the FirstPersonController class like he does in the tutorial, and launch the game, the slightest mouse movement rotates the camera a trillion times over. It also points straight down and no matter how I move them mouse the camera rotates while looking down. Also I have this error:

Known pipe types:
  glxGraphicsPipe
(4 aux display modules not yet loaded.)
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
:pnmimage:png(warning): iCCP: known incorrect sRGB profile

but the actual window still works so I've just been ignoring it. It's raised even with just

app = Ursina()
app.run()

Don't know if that's important, thought I would just mention it.

if the first person controller is to fast i would change the player speed by using the command

player.speed=your speed choice i recommend 1 for slow

but if dont want to do that that then i have no answer for you

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM