Forum rules - please read before posting.

How does AC create the FacingAngle float for sprites?

Hey guys,

I'd like to move away from adventure creator for my sprites but cannot for the life of me recreate the FacingAngle float so I can have direction sprites.
It seems to be calculating its angle based on the rotation of the main camera but Im not super sure how it does it. I can't just feed it the objects rotation as I have many different static cameras.
I'll be creating the logic in Playmaker so any help would be appreciated!

Thanks

Comments

  • Even 2D characters have an internal vector to represent which way they're facing. The sprite angle is calculated by comparing this with the direction of the MainCamera - which GameCamera it's currently attached to isn't involved.

    If you're looking for the code, it's chiefly the calculation of "spriteAngle" in the Char script's PrepareSpriteChild function.

  • Oh thats good too know. Thanks!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.