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

[Community] [Point and Orbit] Add the ability to point towards an angle (useful for gamepads) #1281

Merged
merged 2 commits into from May 15, 2024

Conversation

tristanbob
Copy link
Contributor

  • Add the ability to point towards an angle (useful for gamepads)
  • Converted events to use the new method to reference parameters directly
GDevelop_67OhgpPNlW.mp4

@tristanbob tristanbob requested a review from VegeTato May 10, 2024 02:21
@tristanbob tristanbob self-assigned this May 10, 2024
@tristanbob tristanbob requested a review from a team as a code owner May 10, 2024 02:21
"shortDescription": "Point an object toward a position or angle while orbiting that object around a position.",
"version": "1.1.0",
"description": [
"# User can",
Copy link
Contributor

@D8H D8H May 10, 2024

Choose a reason for hiding this comment

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

The wiki uses # for page title. Titles in description should be ##, but "User can" will look a bit silly in a summary. I think it's better to not use titles in descriptions.

Also, either use "you can" or "It allows" instead of "user can". You won't see "user" anywhere in the wiki (if you do, please report it).

Edit: I realized that you are not the initial author of the extension. It's not mandatory to change it.

@D8H
Copy link
Contributor

D8H commented May 10, 2024

Why would someone make the object rotate at a given speed when it moves instantly. I guess it would look weird, wouldn't it?

@tristanbob
Copy link
Contributor Author

Why would someone make the object rotate at a given speed when it moves instantly. I guess it would look weird, wouldn't it?

Good point! I copied your math from the Turret extension and got this working. Thanks for catching this oversight!
I also updated the wording of the extension.

Err... do you think we should merge this into the Turret extension?
It has some similarities, but I guess turrets usually don't orbit another object.

GDevelop_KjFscSGBcb.mp4

@D8H
Copy link
Contributor

D8H commented May 11, 2024

Good point! I copied your math from the Turret extension and got this working. Thanks for catching this oversight!
I also updated the wording of the extension.

Sorry, my point was more about removing the speed parameter. To me, this extension purpose is just to squash "put around" and "change angle" to avoid to fill the direction 2 times.

I'm not prod of what I've done for the Turret extension. It will need some complete rework.

@tristanbob
Copy link
Contributor Author

@D8H do you mind if I keep this "speed" feature? I think it is a fun and easy mechanism that could be useful in games.

Any other thoughts or comments before I merge this?

@D8H
Copy link
Contributor

D8H commented May 11, 2024

I think it's over-complexifying the extension for maybe no value.

What uses-cases do you see for it?

@tristanbob tristanbob merged commit 8a35791 into main May 15, 2024
4 checks passed
@D8H
Copy link
Contributor

D8H commented May 15, 2024

ok... nice discussing with you too... 😕

Did you miss my last message?

@tristanbob tristanbob deleted the point-and-orbit-angle branch May 17, 2024 16:31
Comment on lines +259 to +261
"description": "Pointing speed (in deg/second)",
"longDescription": "Set to 0 for an immediate pointing.",
"name": "PointSpeed",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this handled by your change?

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