Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control Camera Speed #285

Merged
merged 3 commits into from
Nov 14, 2024
Merged

Control Camera Speed #285

merged 3 commits into from
Nov 14, 2024

Conversation

simonbethke
Copy link
Contributor

@simonbethke simonbethke commented Nov 13, 2024

I added a simple slider that allows to control the camera speed. Currently it is by default set to 5m/s and it can be set between 0.1 and 30 m/s.

However, I found a bug that happens when moving forward through the scene origin. By doing that, the camera turns around and looks back to the origin. Up and Down arrows now switched directions. #286

Copy link
Member

@slimbuck slimbuck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks so much! Left a few comments - please call the variable camera flySpeed.

src/camera.ts Outdated Show resolved Hide resolved
src/ui/view-panel.ts Outdated Show resolved Hide resolved
@simonbethke
Copy link
Contributor Author

I have made those changes. However, I wish I could make the slider-control transparent for key-up/down events. Any idea how to accomplish that?

@slimbuck
Copy link
Member

Might be possible, but quite fiddly.

How about hooking + and - keys to speed camera up and down?

@simonbethke
Copy link
Contributor Author

I am not sure about this. In general, shortcut keys start overlapping. Think about "p" for picker or poly. And I would like to implement an enable / disable wasd-navigation switch

@slimbuck
Copy link
Member

I've merged the changes from yesterday's lint update into your branch.

@slimbuck
Copy link
Member

I also added the missing localisations.

Please check you're happy before I merge.

@slimbuck
Copy link
Member

I am not sure about this. In general, shortcut keys start overlapping. Think about "p" for picker or poly. And I would like to implement an enable / disable wasd-navigation switch

I mean, nothing is currently using + and - right now, but anyway these are bigger changes we can do at a later time.

@simonbethke
Copy link
Contributor Author

I think you changed every single line of code :)
All good

@slimbuck slimbuck merged commit 84cdf38 into playcanvas:main Nov 14, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants