Closed VegeTato closed 3 years ago
Great work @VegeTato! I am going to look at this (hopefully) tonight. Based on our discussion on Discord, here are some ideas I will look into:
Good news, I got all my desired functionality working! @VegeTato this version will let you use multiple objects at the same time on the same center object, but you will need to specify a StartingOffset and use a unique OrbitID string.
Run this extension on every frame to make the orbiting objects move. This extension will create/delete orbiting objects to match the quantity specified. Use the delete function or set quantity to 0 to remove orbiting objects.
Extension parameters include:
Example uses:
OrbitingObjectsExtension_0.3.0.json.zip
https://victrisgames.itch.io/extension-orbiting-objects
https://user-images.githubusercontent.com/8879811/114340990-ff9c8b80-9b15-11eb-9bbe-f3d827a13bca.mp4
WOW ! it looks just PERFECT ! ❤️ great work ! Thank you for upgrading it to the MAXIMUM level ! 😄 hopefully they add it in the extensions of Gdevelop ^_^
@4ian - This extension is ready for your review. Thanks!
When a variable is directly passed to an action, take the type directly.
Rotation speed of objects (angle)
Angle of what?
This can be reused.
Starting offset (degrees)
=> Starting offset (angle in degrees)
Layer that orbiting objects will be created on
=> Add somewhere that the default layer will be used, maybe use the wording like in center camera action
(base layer if empty)
There is a way to add long descriptions on input fields. You can use it for explain more how to use OrbitID on both actions.
Looks like a great extension! Happy to add it. Bouh remarks would be good to address. A rotation speed is indeed something that should be in "degrees per second".
Starting offset (angle in degrees)
I would rather say Angle start offset (in degrees)
? We always put just the unit in parenthesis. E.g: (in pixels), (in degrees), (in degrees per second)...
There is a way to add long descriptions on input fields
Yep that's good to use I think. :)
The example is nice in any case! We could also include it in GDevelop examples.
I will update this extension tonight with the wording suggestions, and with using the long description (as needed).
I'll tag 4ian again when I have the new version uploaded. Thanks for the review and kind words!
Excellent!
OrbitingObjectsExtension_0.3.1.json.zip
@4ian this is ready for another round of reviews. :)
There is a slight problem, __OrbitingObjects.OrbitQuantity can get out of sync if the user deletes an orbiting object. This makes the extension believe there is a specific amount of objects when there isn't.
Replicate: Take the example from @tristanbob, add this event: Start a preview, hover over a few dinos, then play with the quantity slider. As you can see, it doesn't reflect the amount of objects anymore.
This is tricky to fix, the only way I can think of is to convert this to a behavior (you attach it to an object that you want to rotate, and can add an onDelete to update __OrbitingObjects.OrbitQuantity)
Interesting use-case, thanks for testing!
Do you think I should be able to count the number of OrbitingObjects that are linked to each CenterObject?
ForEach(CenterObject):
Condition:
Take Into Account "OrbitingObjects" Linked to "CenterObject"
Action:
Set Variable(CanICountThisWay) to count(OrbitingObjects)
I think I have tried this method but it didn't work. :-/
I have rewritten this extension to use the Count() function to track linked objects, instead of using a manual variable. The makes the extension smaller and simpler. However, I am going to pause working on this extension until I learn more about this bug:
Alright, I've made a lot of improvements and I'm ready for more excellent feedback!
OrbitingObjectsExtension_0.5.0.json.zip
After a quick look, this looks good to me!
Thanks for reviewing this @arthuro555!
@4ian We are ready for your review of this extension.
Great! I'll check that :) 👍👍
I've made a few changes in the description ("Run this extension" => "Run the action" (an extension is a set of action/condition/behavior, but we don't say to users to "run an extension", this can be confusing)). But apart from that this is very nice! Added it to the registry 👍
Thanks all!!
Describe the extension
This extension will help in making objects rotates around another objects(could be player) or any object for example: making shields that rotates around the player to protect him from enemies upcoming bullets Can take up to 3 objects to rotates Users can set the Speed of the rotating objects around the player *Users can set the Distance between the objects and the player
Checklist
Extension file
Rotate Objects around player Extension.zip