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

3D Movement on local axis #1162

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

PANDAKO-GitHub
Copy link
Contributor

This extension provides behaviors that allow you to translate and rotate 3D objects along local axes.

Add the "Movement 3D on local axis" behavior to your 3D box or 3D model. The following actions will then be available:

  • Translate by distance
  • Translate by speed
  • Rotate by angle
  • Rotate by speed

Example

https://editor.gdevelop.io/?project=https://raw.githubusercontent.com/PANDAKO-GitHub/GDevelop-examples/3D-Movement-on-local-axis-Example/examples/3d-movement-on-local-axis/3d-movement-on-local-axis.json

@PANDAKO-GitHub PANDAKO-GitHub requested a review from a team as a code owner February 8, 2024 03:42
@D8H
Copy link
Contributor

D8H commented Feb 8, 2024

Thank you for submitting an extension.

Why do you need JavaScript for this extension?
I guess the same features can be done using something like forces but for 3D. Mah started to work on an extension for 3D forces:
https://discord.com/channels/258623956158906368/936338995875577926/1204096159279226940

About the rotation, I think it would need acceleration feature to worth an extension. Otherwise, it can be done by using built-in actions and TimeDelta().
A bit like this extension but on 3 axis:
image

@PANDAKO-GitHub
Copy link
Contributor Author

Thank you for checking.

The feature of this extension is that it uses local axes.
It allows for control not possible (or very difficult) with built-in actions and other extensions that always use global axes.

For example, it will be easier to control an aircraft that can move and rotate 360 degrees, and the bullets fired from it.
This is very difficult to do with built-in actions and extensions designed for platformer games.

The reason I used Javascript is that it is inefficient to reproduce functionality that Three.js already has in place using events.

@D8H
Copy link
Contributor

D8H commented Feb 9, 2024

The feature of this extension is that it uses local axes. It allows for control not possible (or very difficult) with built-in actions and other extensions that always use global axes.

For example, it will be easier to control an aircraft that can move and rotate 360 degrees, and the bullets fired from it. This is very difficult to do with built-in actions and extensions designed for platformer games.

I see. Do you think there is other cases where the actions can be useful? Because if it's mostly used for spaceships/planes movement, I guess it could be easier for users to have a full behavior that handles acceleration and maximum speed.

@PANDAKO-GitHub
Copy link
Contributor Author

This extension can also be used when the user wants to have different speed performance for each axis of the object.
This extension can also be used when users want to perform relative object placement.

I created this thinking I need to provide basic actions to the user.
I think it's good that a separate extension is created that can handle acceleration and top speed.

@D8H
Copy link
Contributor

D8H commented Feb 11, 2024

I created this thinking I need to provide basic actions to the user.

That sounds fair. I'll wait to review the 3D force extension, because I guess that the translate actions could be one of the way to add forces.

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.

None yet

2 participants