Hi, is there a way to add drag and drop properties to the hero preset in the citrus engine?
Citrus Engine Drag and Drop Hero(4 posts) (3 voices)
Nothing dealing with starling has drag and drop feature from what I can tell.
If I understand correctly that you want to be able to drag&drop a Hero object, it's possible only if you extend it.
Now Hero itself either extends NapePhysicsObject or Box2DPhysicsObject, in both cases the physical object controls the position which means you can set up a way to drag & drop the body it uses.
And that will either be a Nape or Box2D problem.
It is possible to cheat, and deactivate the physics as well as deactivate Citrus Engine updating the display using the physics position for that Hero so you can become responsible for the display object through starling , and with that solution it becomes a starling problem. But starling doesn't have a drag&drop solution by default so it also has to be coded manually.
I have not done a lot of drag&dropping with physics in CE so I would personnally choose the second solution though it might require more code than the first one, the first one depends on if you chose Nape or Box2D though.
Oh, I misunderstood the question.
Yeah, I would disable the physics while dragging.
You must log in to post.