Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
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
Okay, so I know how to do object positioning through a plugin, but I've kind of got a snag. Here's the relevant code from my IK plugin:
// Correctly position the second bone
objBT->info.x = objBO->info.x + cos(objBO->info.angle / R) * (objBOW + RD);
objBT->info.y = objBO->info.y + sin(objBO->info.angle / R) * (objBOW + RD);[/code:7gn99nrj]
This positions the second bone to the end of the first. Everything seems to work fine for the most part. Yet it doesn't.
If, using events, I have the first bone constantly positioned to another object, once the bones move too far from their starting position, the second bone will just disappear. I can do a check on the coordinates for the second bone, but they're where they're supposed to be. The thing just vanishes. Is this a flaw in my coding, or a bug in Construct?
If you want to update an object's position/size/angle via the SDK, you have to call:
After modifying a value.
Develop games in your browser. Powerful, performant & highly capable.
Awesome, that fixed it! Thanks.