G
gamer_essence
Guest
So when I create an object it moves around a revolute joint for testing purposes. The problem arises when I increase the image_xscale. The user gets to specify how long to make the obj_wood that revolves around the joint which can be done by altering the xscale upon creation. The longer the piece of wood the larger the problem is. The problem is a grey rectangle just appearing? The images below show this. The grey rectangle is where the object should be?
The creation event in obj_wood
The creation event in obj_wood
Code:
image_xscale = round(point_distance(obj_mouse.start_x,obj_mouse.start_y,obj_mouse.finish_x,obj_mouse.finish_y) /64);
//dictates how long the object is
var o_id;
o_id=inst;
physics_joint_revolute_create(o_id, id, inst.x, inst.y, -360, 360, 0, 1000, 1000, 0, 0); //creates it at the desired x and y
Attachments
-
5.3 KB Views: 1
-
11.2 KB Views: 2
-
17.6 KB Views: 1