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
New extension: Bounce Raycasts #1238
base: main
Are you sure you want to change the base?
Conversation
I realised how to add one feature. If anyone is currently testing this, give me a moment. |
!update |
❗ No updates found. Please check your file. |
Stupid bot, Updated extension: Sometimes the ray might not hit the object. I updated the extension so that it checks for that. If the ray doesn't hit anything, the extension will calculate the end position of the ray. |
Thank you for submitting an extension. Are you using this extension for your project? If you have a public build or some gameplay footage, feel free to add links. It will help reviewers. |
Preview.of.Pug.Pong.2024-04-07.11-56-38.mp4Preview.of.Bounce.raycasts.extension.2024-04-07.12-24-12.mp4Preview.of.Bounce.raycasts.extension.2024-04-07.12-36-09.mp4I also updated the extension to include 2 more things: Obstacle angle (used for the platformer example) and a toggle to check for the total distance travelled by the ray instead of a per bounce basis. Useful when there should be limited distance because normally each ray is separated. The second ray example: Preview.of.Bounce.raycasts.extension.2024-04-07.13-09-21.mp4I also really wanted this extension to check grenade throws in one of my games. My solution back then was to just simulate all of the possible grenade throws. This will allow for a much easier and faster way to do this. |
Updated example and extension: |
Thank you for the explanations. If I understand correctly, the main purpose of this extension is to:
It allows to:
Limitations:
Do you see something to add or to correct? |
I tested the bounce extension, the trajectories do seem to match somewhat well. It's more to do with the fact that a raycast doesn't use a collision mask, so the trajectories will change because of that. It does seem to adjust and go a little offsync repeatedly. Sometimes it's pretty much spot on, sometimes (most likely due to tilted walls) it seems to skew a little but it also seems to slightly return to the ray trajectory over time. Generally it does a pretty neat job at predicting bounces (I tested this on a square with a resolution of 10x10). |
I updated the extension to support shapecasting too. |
Description
This extension adds the functionality to simulate bouncing raycasts with a maximum amount of bounces set by the user.
How to use the extension
This extension adds 3 actions:
Bounce raycasts
- simulates bouncing raycasts with a maximum amount of bounces.Bounce and draw raycasts
- simulates bouncing raycasts and immediately draws the bounces using a shape painter object.Draw raycast bounces from a variable
- allows the user to draw the bounces from a previously saved simulation using a shape painter object.The raycast results are stored in a structure variable.
Checklist
What tier of review do you aim for your extension?
Community (Unreviewed)
Example file
BounceRaycastsExample.zip
Extension file
BounceRaycasts.zip