Draw Line Between 2 Objects

A quick example created for a user on the Construct 2 forums.  This example shows how to draw a line between 2 objects on the screen by using the distance(x1,y1,x2,y2) and angle(x1,y1,x2,y2) expressions.  It uses the “Drag & Drop” behaviour but can be easily changed to suit your needs.



One thought on “Draw Line Between 2 Objects”

  1. Thanks for the example! Was wondering can this be modified to work with scrolling and two objects on different layers (with different parallax values), or would that require a wholly different approach?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s