Offset vectors

Hi I’d like to offset vectors like in the image. Any ideas to do that

???

Can you be a bit more specific? Generally speaking, to offset a vector, you would add another vector to it.

Yes but its hard to determine in cross roads. So for my case its good to specify at least three points a then offset to inside them like inset in blender. But hard for me to calculate it.

Ok, like inset face in blender? But what do you want to do it to? A mesh? A texture?..

I want to offset locations of building to spawn them from roads.

Are you roads splines? X is forward, so the left and right of the road would be offsets in Y.

I might be able to help, but I need to see what you have so far…

So I’ve made Idea What it should look like. There is no blueprinting yet just I took vertices from procedural mesh and manuely attached spline points.

If you just need to calculate the point, you should create a function that does scaling.

For any scaling you need a pivot point so your function should probably take in a pivot input then an array of the points, and the scale factor. Then you just subtract all the point locations by the pivot location, then multiply those new vectors by the scaling factor (which is a float) and then add the pivot location to all the vectors again. Then return the array of new points and that should be what you need.

To find the pivot for that image example you posted in a comment, you could just average those vectors to get the center point (add them up and divide by the number of vectors, 3 in this case)

Thanks, for hint it will work but with pivot point. Ideal for me would be without it because i need function like inset in blender Clockwork Ocean mentioned. Pivot point will have to be calculate also .

Yes, you can scale in given those 3 points. Let me think a bit. The pivot needs to be in the center for it to work.

I think it could just be the average of the 3 vectors ( ignoring Z ).

If it’s not that, you might just want to find an easier way of doing it:

Yeah, it’s just the average of the vectors:

IT WORKS THANK YOU FOR HELP !!!

THANK YOU FOR HELP !!!