Change origin at runtime

0 favourites
From the Asset Store
Antisuspend Plugin
$7.20 USD
20% off
Antisuspend Plugin for Construct 3 prevents the runtime from getting suspended.
  • I can't guarantee that changing the origin at runtime is actually ever going to work. The entire engine has been designed with the assumption that origins do not change. In particular you may end up getting strange results with the collision cells optimisation and render cells. There is a lot of non-obvious engine code that depends on this stuff as you appear to be finding. So why do you need this anyway? Can't you work around it with events?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • R0J0hound you're right. It won't update unless a rotation or scaling is performed, so I will use your solution as a workaround!

    Ashley thank you very much for taking the time to reply! I perfectly understand that changing the origin at runtime can break many things. The thing is that I'm doing an application, not a game, and I only really need the collision box to register mouse clicks and for the drag & drop behaviour. It's a simplistic keyframe animation app in which changing the origin is a needed feature. I currently handle this with invisible sprites to perform rotations and do linear interpolations between keyframes.

    But I have just added a feature to assign parent-child relationships to sprites (to make it easier to animate) and i get very strange values in the interpolated frames. I suspect that is because of the "fake" origin points I'm using and that's why I'm seeking a way to implement "proper" origin points.

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