GML Animation update intercepting bug?!

L

lukbebalduke

Guest
Hey Folks! There is a strange issue in my game right now: There are two OBJ_PLAYER in a room, each of them has it own local variable M, that points to the direction where the player is looking at.

At the OBJ_PLAYER animation update the angle of a certain bone is set to M. Both OBJ_PLAYER has the same sprite.

Code:
var head_dsmap = ds_map_create();
    skeleton_bone_data_get("Bone_head", head_dsmap);
    ds_map_replace(head_dsmap, "angle", M);
    skeleton_bone_data_set("Bone_head", head_dsmap);
    ds_map_destroy(head_dsmap);
The issue: the first player looks to where the second player's M points, and vice-versa.

 

YoSniper

Member
Just curious: have you tried this with a different set of inputs?

Something else that could be the issue here is vertical flipping due to the positive y direction being down instead of up.

Try using angles like 45 and 150. The thing about 60 and 300 is that one is 60 degrees above horizontal and the other is 60 degrees below horizontal.
 
L

lukbebalduke

Guest
Just curious: have you tried this with a different set of inputs?

Something else that could be the issue here is vertical flipping due to the positive y direction being down instead of up.

Try using angles like 45 and 150. The thing about 60 and 300 is that one is 60 degrees above horizontal and the other is 60 degrees below horizontal.
Yes i did, all kind of values. Even priting the local var M right before the ds_map_replace the value looks right, although heads still 'changed'
 
Top