0
\$\begingroup\$

Before posting, I've already tried parenting the camera to the Character mesh head and setting controller yaw, that didn't work, in fact it invalidated my blueprint to set my Mouse X and Y for the pitch and yaw that allowed me to move my camera in the first place. So I need a different method to make my character follow the way my camera is facing whenever I rotate, otherwise when I turn around I just face my Character.enter image description here

\$\endgroup\$
0
\$\begingroup\$

NOTE: I've assumed you've set up your camera so it can freely rotate around the character mesh and you want the character to rotate with it.

Although costly, the quickest way to achieve what you're after would be to use the Tick function inside your character blueprint.

On tick, get the rotation of the camera then set the rotation of the mesh to the same.

You might need to make an adjustment in your calculations, making one of the axes -180° to get the mesh to point the right way but once you've got it, it should work fine.

\$\endgroup\$
0
\$\begingroup\$

In software have you thought to use a Circularly Linked Dynamic Queue Template (CLDQueue below), that contains views of your sprite abstract data type? This one is really simple...

/* Description: Initial condition

    1
 2     6        Tail =  6
                Head =  1
 3     5        Index = 6
    4

A new ring is created counter clockwise. The first call to fetch(no_rotation) will return the last value enqueued

*/

template class CLDQueue { public:

enum ROT    { clockwise, counterclockwise, no_rotation };

CLDQueue()  {head = NULL; tail = NULL; }
virtual ~CLDQueue() { if (!IsEmpty()) MakeEmpty(); }


void   Enqueue    ( qtype &an_item );
qtype& Fetch      ( enum ROT rot );
BOOL   IsEmpty    ( void );
void   MakeEmpty  ( void );

private:

struct cell
{
    qtype value;            // generic queue object
    cell *clockwise;         
    cell *counterclockwise;
};
cell *head, *tail;          // used by enqueue and make_empty operations
cell *index;                // used for fetch operations, clockwise, current and previous

};

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.