Discuss Scratch

The_Blue_J
Scratcher
1000+ posts

Change "distance to" block to "distance to center of" block.

I, having been here for 3 years, discovered for the first time, what the “distance to” block measures
(distance to [Sprite1 v]) :: sensing :: reporter

The “distance to” block seems the measure the distance between the CENTERS of the 2 sprites, not the vectors (visible object that can be edited in the costume editor), and will not change no matter how you change the position of the vectors in the costume editor.

So to ease the burden on New Scratchers and beginners alike, I suggest the ST to change the above to
(distance to center of [Sprite1 v] :: sensing :: reporter

in order to clear this discrepancy.

Last edited by The_Blue_J (Dec. 29, 2024 17:58:45)

MagentaDude1359
Scratcher
100+ posts

Change "distance to" block to "distance to center of" block.

full support for the reason in the op. maybe under the surface it would still be “distance to”, but it would show up as “distance to center of” in the editor.
The_Blue_J
Scratcher
1000+ posts

Change "distance to" block to "distance to center of" block.

MagentaDude1359 wrote:

full support for the reason in the op. maybe under the surface it would still be “distance to”, but it would show up as “distance to center of” in the editor.
Please elaborate, what do you mean by “under the surface”, there are no blocks in the costume editor.
The_Blue_J
Scratcher
1000+ posts

Change "distance to" block to "distance to center of" block.

Bump
SpyCoderX
Scratcher
1000+ posts

Change "distance to" block to "distance to center of" block.

But what if the center isn’t aligned with the sprite?
The_Blue_J
Scratcher
1000+ posts

Change "distance to" block to "distance to center of" block.

SpyCoderX wrote:

But what if the center isn’t aligned with the sprite?
It checks the shortest distance between the centers of 2 sprites, it always aligns, unless I am missing something…
ametrine_
Scratcher
1000+ posts

Change "distance to" block to "distance to center of" block.

The_Blue_J wrote:

SpyCoderX wrote:

But what if the center isn’t aligned with the sprite?
It checks the shortest distance between the centers of 2 sprites, it always aligns, unless I am missing something…
what if the sprite isn't snapped to the + thing in the costume editor
SpyCoderX
Scratcher
1000+ posts

Change "distance to" block to "distance to center of" block.

ametrine_ wrote:

The_Blue_J wrote:

SpyCoderX wrote:

But what if the center isn’t aligned with the sprite?
It checks the shortest distance between the centers of 2 sprites, it always aligns, unless I am missing something…
what if the sprite isn't snapped to the + thing in the costume editor
Yea that’s what I mean. The costume can be offset from the sprites center by moving it in the costume editor.

The_Blue_J
Scratcher
1000+ posts

Change "distance to" block to "distance to center of" block.

SpyCoderX wrote:

ametrine_ wrote:

The_Blue_J wrote:

SpyCoderX wrote:

But what if the center isn’t aligned with the sprite?
It checks the shortest distance between the centers of 2 sprites, it always aligns, unless I am missing something…
what if the sprite isn't snapped to the + thing in the costume editor
Yea that’s what I mean. The costume can be offset from the sprites center by moving it in the costume editor.

This is why we need to clear the descrepancy…
The block measures the distance between the two +'s (centers) of the sprites, irrespective of is it snapped or not snapped.
It already does that, all we need is a name change…
AHypnoman
Scratcher
1000+ posts

Change "distance to" block to "distance to center of" block.

The_Blue_J wrote:

SpyCoderX wrote:

ametrine_ wrote:

The_Blue_J wrote:

SpyCoderX wrote:

But what if the center isn’t aligned with the sprite?
It checks the shortest distance between the centers of 2 sprites, it always aligns, unless I am missing something…
what if the sprite isn't snapped to the + thing in the costume editor
Yea that’s what I mean. The costume can be offset from the sprites center by moving it in the costume editor.

This is why we need to clear the descrepancy…
The block measures the distance between the two +'s (centers) of the sprites, irrespective of is it snapped or not snapped.
It already does that, all we need is a name change…
But the proposed name change doesn't account for off-centre costumes, as the people you have quoted pointed out.

And I don't think a

(distance from the vector centre point of this sprite to the vector centre point of [sprite1 v], not accounting for offset::sensing)

block would be practical or make sense to most new users.
The_Blue_J
Scratcher
1000+ posts

Change "distance to" block to "distance to center of" block.

AHypnoman wrote:

The_Blue_J wrote:

SpyCoderX wrote:

ametrine_ wrote:

The_Blue_J wrote:

SpyCoderX wrote:

But what if the center isn’t aligned with the sprite?
It checks the shortest distance between the centers of 2 sprites, it always aligns, unless I am missing something…
what if the sprite isn't snapped to the + thing in the costume editor
Yea that’s what I mean. The costume can be offset from the sprites center by moving it in the costume editor.

This is why we need to clear the descrepancy…
The block measures the distance between the two +'s (centers) of the sprites, irrespective of is it snapped or not snapped.
It already does that, all we need is a name change…
But the proposed name change doesn't account for off-centre costumes, as the people you have quoted pointed out.

And I don't think a

(distance from the vector centre point of this sprite to the vector centre point of [sprite1 v], not accounting for offset::sensing)

block would be practical or make sense to most new users.
It does, it checks the center of the sprites, based on the +
ametrine_
Scratcher
1000+ posts

Change "distance to" block to "distance to center of" block.

The_Blue_J wrote:

It does, it checks the center of the sprites, based on the +
again, it won't be detecting the distance to the center of the sprite if the sprite isn't snapped to the +.
The_Blue_J
Scratcher
1000+ posts

Change "distance to" block to "distance to center of" block.

ametrine_ wrote:

The_Blue_J wrote:

It does, it checks the center of the sprites, based on the +
again, it won't be detecting the distance to the center of the sprite if the sprite isn't snapped to the +.
By center, I mean the +, which it already does.

Powered by DjangoBB