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

Tools for 3D #1050

Closed
3 tasks done
VanCastar opened this issue Oct 13, 2023 · 3 comments
Closed
3 tasks done

Tools for 3D #1050

VanCastar opened this issue Oct 13, 2023 · 3 comments
Labels
✨ New extension A new extension

Comments

@VanCastar
Copy link

VanCastar commented Oct 13, 2023

Description

A collection of small tools for 3D that are missing in the core functionality.

Tools For 3D includes.

  • Return the Distance between 3D positions.
  • Return the Tilt / Vertical Angle between 3D positions.
  • Places a 3D Object around a specified point, angles and distance.
    Orientation of the 3D object can also be set.
  • Check if the 3D position is inside the 3D Object.
    This check is rudimentary for mostly upright objects.
    The check works properly on Objects rotated only on Z-axis.
    To get the the check against MODEL correct, the Origin needs to be set on bottom middle.
  • Check collision between 3D Objects.
    Perfect for checking collision with 3dBoxes used for floors, walls, bridges, and upright obstacles like characters, furniture, pillars, etc.
    This check is rudimentary for mostly upright objects.
    This check works properly on Objects rotated only on Z-axis.
    To get the the MODEL collision correct, the Origin needs to be set on bottom middle.
    Or you use a hidden 3D Box as a collision mask for the model, just like done sometimes with 2d sprites.

Combines and replaces Extension suggestions #1039 #1046 #1048

How to use the extension

Put object around a 3D Position.

  • Use the event to place the 3D Object around a 3D Position space with desired angle, distance and orientation.

Test if the Position in 3d to is inside a 3D Object.

  • Returns True if the point is inside the given object boundaries.
  • Some limitations are that object needs to be upright so that rotation in X/Y axis aren't made.

Distance Between 3D Positions.

  • Returns a value of a distance between 3D Positions.

Tilt Between 3D Positions.

  • Returns a Tilt/ Vertical Angle value in degrees between 3d Positions.

Check collision between 3D Objects.

  • Returns True if the 3D Objects are colliding with eachother.
    Use for checking collision with 3dBoxes used for floors, walls, bridges, and upright obstacles like characters, furniture, pillars, etc.
    This check is rudimentary for mostly upright objects.
    This check works properly on Objects rotated only on Z-axis.
    To get the the MODEL collision correct, the Origin needs to be set on bottom middle.
    Or use a hidden 3D Box as a collision mask for the model, just like done sometimes with 2d sprites.

Checklist

  • I've followed all of the best practices.
  • I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

What tier of review do you aim for your extension?

Reviewed

Example file

ToolsFor3DExample.zip

Extension file

ToolsFor3D.zip

EDIT:
The example now includes all extension usage as well as grabbing, moving and dropping objects.

Link to example to run in gd.games.
https://gd.games/instant-builds/3341ba35-f62d-46c6-946e-fb883ab1d92c

@VanCastar VanCastar added the ✨ New extension A new extension label Oct 13, 2023
@github-actions
Copy link
Contributor

Hi @VanCastar! 👋 This submission has passed all required tests, and has been moved to a PR as part of our submission pipeline. You can see the progress of your submission on this page. Community submissions are not reviewed by default, so your extension should be added once we've checked that your submission doesn't contain malicious code without further intervention on your part. If you wish for your extension to be reviewed (and thereby moved to the list of reviewed extensions), please follow the instructions written on the README. Thanks again for your contribution to GDevelop!

1 similar comment
@github-actions
Copy link
Contributor

Hi @VanCastar! 👋 This submission has passed all required tests, and has been moved to a PR as part of our submission pipeline. You can see the progress of your submission on this page. Community submissions are not reviewed by default, so your extension should be added once we've checked that your submission doesn't contain malicious code without further intervention on your part. If you wish for your extension to be reviewed (and thereby moved to the list of reviewed extensions), please follow the instructions written on the README. Thanks again for your contribution to GDevelop!

@github-actions
Copy link
Contributor

Hi @VanCastar! 👋 This submission has passed all required tests, and has been moved to a PR as part of our submission pipeline. You can see the progress of your submission on this page. Community submissions are not reviewed by default, so your extension should be added once we've checked that your submission doesn't contain malicious code without further intervention on your part. If you wish for your extension to be reviewed (and thereby moved to the list of reviewed extensions), please follow the instructions written on the README. Thanks again for your contribution to GDevelop!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ New extension A new extension
Projects
None yet
Development

No branches or pull requests

1 participant