[SOLVED] Adjusting Object's Angle and Size to Shoot Ray

Hey, can someone help me?

I want to make an object shoot a ray through the object’s angle by adjusting the size. I want to make this happen in the game, not the engine editor.

I want to do this:

But this is what is happening instead:

My code is simple, just adding 5 to the width and height of an object.

Thank you.

just add to the width, not height.
image

If that’s it, you’ll probably need to adjust the center/origin to be in the middle of the left edge of the object, so it doesn’t slide up or down as expanding.

1 Like

Moving the origin would definitely be the easiest way. Should you want to use a tiled sprite, this would work. I tested it with 2 slider controls. I used NewSprite for a reference position and a tiled sprite for the line. Note: it uses set centered position.

Screenshot_20241012_054833_Chrome

It just occurred to me that put around object would also work.

thank you so much for answering