Object Position Through Plugin

This forum is currently in read-only mode.
From the Asset Store
I-Spy (Hidden objects)
$34.30 USD
30% off
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • 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:

    pRuntime->UpdateBoundingBox(object);

    After modifying a value.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Awesome, that fixed it! Thanks.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)