[SOLVED] weird ?angle problem with draw step (blurred/transparent copy on mirrored angle)

p4stoboy

Member
Instead of drawing once correctly it is drawing two of each segment on like a 20 degree angle adjacent to each other (the V shape which is more prominent the slower the segment is moving).

It's like the b position vector changes every other frame. It's definitely something to do with me updating that because it's the bvector end of the object that is shifting. I just don't understand how; the angle doesn't change value when the segment isn't moving.

Edit - although it doesn't happen to the front dude which is the only one following the mouse so maybe it's the actual x/y coordinates of the parent objects (the "back" end of each segment is where the origin is and the segment behind it is its child) that are screwing things up.


Video (watch fullscreen):

EDIT - fixed, see bottom, I no longer wish to share the code.
 
Last edited:

p4stoboy

Member
Okay so I have logged the x/y positions of each segment each step (while the objects are stationary):

1: x/y means those are the coordinates for segment 1, etc.
Code:
1: x:640.29 y:553.79
2: x:590.45 y:550.41
3: x:542.12 y:536.88
4: x:494.20 y:523.67
5: x:451.57 y:496.68
6: x:413.51 y:465.23
7: x:387.63 y:421.67
8: x:372.91 y:374.83
9: x:349.95 y:330.71
1: x:639.98 y:556.77
2: x:590.81 y:547.43
3: x:541.58 y:539.83
4: x:495.03 y:520.78
5: x:450.32 y:499.41
6: x:415.31 y:462.83
7: x:385.35 y:423.63
8: x:375.66 y:373.64
9: x:347.31 y:332.13
1: x:640.29 y:553.79
2: x:590.45 y:550.41
3: x:542.12 y:536.88
4: x:494.20 y:523.67
5: x:451.57 y:496.68
6: x:413.51 y:465.23
7: x:387.63 y:421.67
8: x:372.91 y:374.83
9: x:349.95 y:330.71
1: x:639.98 y:556.77
2: x:590.81 y:547.43
3: x:541.58 y:539.83
4: x:495.03 y:520.78
5: x:450.32 y:499.41
6: x:415.31 y:462.83
7: x:385.35 y:423.63
8: x:375.66 y:373.64
9: x:347.31 y:332.13
1: x:640.29 y:553.79
2: x:590.45 y:550.41
3: x:542.12 y:536.88
4: x:494.20 y:523.67
5: x:451.57 y:496.68
6: x:413.51 y:465.23
7: x:387.63 y:421.67
8: x:372.91 y:374.83
9: x:349.95 y:330.71
1: x:639.98 y:556.77
2: x:590.81 y:547.43
3: x:541.58 y:539.83
4: x:495.03 y:520.78
5: x:450.32 y:499.41
6: x:415.31 y:462.83
7: x:385.35 y:423.63
8: x:375.66 y:373.64
9: x:347.31 y:332.13
1: x:640.29 y:553.79
2: x:590.45 y:550.41
3: x:542.12 y:536.88
4: x:494.20 y:523.67
5: x:451.57 y:496.68
6: x:413.51 y:465.23
7: x:387.63 y:421.67
8: x:372.91 y:374.83
9: x:349.95 y:330.71
1: x:639.98 y:556.77
2: x:590.81 y:547.43
3: x:541.58 y:539.83
4: x:495.03 y:520.78
5: x:450.32 y:499.41
6: x:415.31 y:462.83
7: x:385.35 y:423.63
8: x:375.66 y:373.64
9: x:347.31 y:332.13
1: x:640.29 y:553.79
2: x:590.45 y:550.41
3: x:542.12 y:536.88
4: x:494.20 y:523.67
5: x:451.57 y:496.68
6: x:413.51 y:465.23
7: x:387.63 y:421.67
8: x:372.91 y:374.83
9: x:349.95 y:330.71
1: x:639.98 y:556.77
2: x:590.81 y:547.43
3: x:541.58 y:539.83
4: x:495.03 y:520.78
5: x:450.32 y:499.41
6: x:415.31 y:462.83
7: x:385.35 y:423.63
8: x:375.66 y:373.64
9: x:347.31 y:332.13
As you can see the coordinates change and then change back every other step, I cannot figure out what is causing the position to recalculate.

I cannot figure out what is causing the position of each object to change every step, here's the step event as it currently stands:

Code removed.
 
Last edited:

TsukaYuriko

šŸŒ 
Forum Staff
Moderator
move_towards_point does not automatically cause the calling instance to stop when arriving at the destination. That's your job. ;)

It also does not put the instance exactly at the position, but steps past it, given sufficient speed - this is also up to you to take care of.
 

p4stoboy

Member
move_towards_point does not automatically cause the calling instance to stop when arriving at the destination. That's your job. ;)

It also does not put the instance exactly at the position, but steps past it, given sufficient speed - this is also up to you to take care of.
Both of which I have done, the distance check is far higher than the object speed and I have set speed to 0 when the distance condition is met... It's just not hitting the else statement; the way I'm using lengthdir in the move_toward_point call must be cooked.

Edit - If you have another look at the coordinate logging you'll see y steps back when x steps forward and vice versa, it's the angle of the object's position that is changing, it's not hammering back and forth like it's stepping over a target point. They're changing because their parent is doing the same thing when it should actually be at speed = 0.
 
Top