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

Added zooming and offset to collision #9

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

ScorpionInc
Copy link

@ScorpionInc ScorpionInc commented Oct 1, 2020

Thanks for the script! I first used it back in 2018 and wanted to add some of the little things I did to it. If these changes are not wanted or are not implemented as well as could be I appologize for using your time.

I added the ability to use actions to change the distance by a percentage of the 'distance' variable value so you can scroll your mousewheel to zoom in and out of whatever your looking at.

Also added an easy to access offset to the ray trace collision position towards the privot to prevent visual clipping. That is to say when you collide with the box to help prevent seeing through the box when at an angle. I realize an offset to the position is probably not the best solution to the clipping but it worked well for most of my use cases, it was simple to implement, and not alot of overhead. The better solution might be to use additional rays to determine if you'd be clipping the object if the camera is at the position but I'm to tired to mess with rays.

Regardless of wether this ends up being useful or not hope you have a good one.
Edit: Readabilty hopefully.

Added collision buffer distance, zoom to control distance with keys/mouse wheel, Some comments
Added Zoom and buffer controls to GUI
Increased Window height to 740 to allow GUI to be seen a TODO for later might be to make it a scrollContainer
Added script parameter values for action string for zoom
Added documentation for the stuffz I added. Including Collision buffer distance, and zoom
Small typo.
Small typo.
Triggered check
When starting with a privot defined, and the camera in the wrong resultant position, the displayed result would remain incorrect until the first input event was received to properly define the _triggered boolean. By forcing an update after enabling the script before the first input event is required corrects this bug.
@Maujoe
Copy link
Collaborator

Maujoe commented Oct 24, 2020

Hey, thanks for submitting this nice features and sorry for the late response.
Sadly I'm currently very busy and I doesn't have found the time to take a closer look to it (or do godot-stuff in generell).
But I will definitely take a look to it if I have more time again. :)

@ScorpionInc
Copy link
Author

No worries and no rush :) Glad to contribute to a script I used for so long thanks for sharing it.

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