Skip to content

2 lines of redundant code in EditorCamera #821

@GeorIsay

Description

@GeorIsay

I was looking at how the editor camera is configured (ursina/prefabs/editor_camera.py) and saw a couple of lines of code that do nothing in method input(key) (92, 93 in master branch). Here it is:

                target_position = self.world_position
                self.world_position = lerp(self.world_position, target_position, self.zoom_speed * time.dt * 10)

Since target_position is assigned the current self.world_position, the lerp() interpolates a value with itself and thus does nothing. It's only written in if key == 'scroll up' and not in if key == 'scroll down'. It's nothing critical, but since I noticed it, I thought it was worth reporting. These lines appear to be leftover code from this commit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions