❔ How can I find all the whole number vectors between two points?
Vector2(-8, -8)
Vector2(8, 8)
How can I find all the whole number vectors between two points?
14 Replies
The vectors above should return a total of 256 points.
So you want vectors with x-coordinates of -8, -7,... 7, 8? Have you come across loops?
my code is as follows
This does not give me the desired output
Well, it starts at 0 rather than -8
oh, hm.
so dynamically speaking, x should equate startPosition.x?
I'm not sure what dynamically speaking means here
dynamically, meaning not dealing with a hard coded 8.
Is that where you wave your hands a lot?
It's kinda hard to answer when we don't know why your code doesn't produce the result you want
Looks about right, besides that you might want to min/max width/height
So you want all points between currentPosition and buildObjectStartPoint?
Yes, that's right.
In which case start at currentPosition and keep incrementing until you reach buildObjectStartPoint. Bear in mind that currentPosition might be > than buildObjectStartPoint, so make sure you handle that
I see.
Thank you both for your help, I realize what to do now. @thinker227 @canton7
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.