Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
So I'm making a game where you click the mouse button and an object moves towards it, and for a little detail, I want to put a line between the mouse and said object. The mouse will also be moving around so the line needs to stay in between the object and the mouse no matter how far they become. Does anyone know how I can do this?
You need to set the line with these actions in every tick:
- Line set position to object(ImagePoint 0)
- Line set angle = angle(Self.X,Self.Y, Mouse.X, Mouse.Y)
- Line set width = distance(Self.X,Self.Y, Mouse.X, Mouse.Y)
Develop games in your browser. Powerful, performant & highly capable.
Thanks alot! I got it working and it's looking a lot better now.