Is it possible to control a creature object, the same way you would do for a phaser sprite?
If so, how?
Controlling a creature object in phaser
Re: Controlling a creature object in phaser
Hello,
Please take a look at the Phaser documentation for Creature here as well:
http://www.kestrelmoon.com/creaturedocs ... es%20.html
You have a lot of playback controls( including smooth animation blending ) on the Creature object itself in Phaser. You can also move the object easily by setting the transform attribute.
Cheers
Please take a look at the Phaser documentation for Creature here as well:
http://www.kestrelmoon.com/creaturedocs ... es%20.html
You have a lot of playback controls( including smooth animation blending ) on the Creature object itself in Phaser. You can also move the object easily by setting the transform attribute.
Cheers
Re: Controlling a creature object in phaser
I have seen the page and managed to control the position, animation velocity, etc.
I can't figure how to set the object velocity, flip, etc, like I would do with a phaser sprite object.
I can't figure how to set the object velocity, flip, etc, like I would do with a phaser sprite object.
Re: Controlling a creature object in phaser
Hello,
Flipping is just applying a negative scale in the axis you care about, i.e if you want to flip in X, set a negative X scale of -1.0f .
As for velocity etc., what you can do is to have a regular phaser rigid body and then attach the Creature Phaser object onto it so it follows it. Then you can apply your velocities/acceleration etc. onto that rigid body and have the Creature object follow it.
Cheers
Flipping is just applying a negative scale in the axis you care about, i.e if you want to flip in X, set a negative X scale of -1.0f .
As for velocity etc., what you can do is to have a regular phaser rigid body and then attach the Creature Phaser object onto it so it follows it. Then you can apply your velocities/acceleration etc. onto that rigid body and have the Creature object follow it.
Cheers
Re: Controlling a creature object in phaser
Thanks for the responses!