Make a sprite orbit another sprite (without HINGE or JOINT/JOIN)

Check the projects code to see

There is a “Joint/Hinge” ability in Ready, but this is a bit glitchy on its effects on the sprites involved.

This code makes a sprite orbit another sprite, while both sprites are independent.

The ABSTRACT BALL can easily be coded to orbit other sprites during a game and isn’t locked to the ABLE EYE sprite. And the Distance from the ABSTRACT BALL to the target sprite can be
controlled with code. Hinge/Joint action is affected by the current distance the sprites involved are from each other when activated, unlike the code in this project.

@Ready
https://ready.app.link/RNOFBptSTP

1 Like

Hi @Suzzy-Grey! This is not surprising, since the two conditions fall into the “Update”. And in this case one of the two contradictions always wins. I’ve confused the code a bit more so that the result is even more unpredictable:

https://ready.app.link/UthUxPI3TP

As can be seen from this example, with the help of contradictory conditions, we can achieve a result that is absolutely unpredictable. So one of the conditions partially blocks the other and affects the third. By the way, it can sometimes be used in your projects, when you need to solve the problem in an unusual way. To anticipate the work of such conditions is very difficult. If we create logic, we think it over and do not do something like that if there is no such need.

1 Like

Here is an example of a game where we use this logic to lengthen the lasso:
https://ready.app.link/7tBlvtm4TP

1 Like

Thanks. I’ll check it out.
(that’s a pretty fun game!)
Maybe in a later Ready update, the size of a sprite can be set to a Variable (distance) from one sprite to another, and the Z layer

1 Like

Yes, we are currently search ideas on how best to compute the distance between the objects. I’m sure it will definitely appear in the future!

1 Like