# Thread: GetFacing - Simple method to transform toon's facing direction based on transport?

1. ## GetFacing - Simple method to transform toon's facing direction based on transport?

So I can transform the coordinate systems easily enough, but I hadn't really thought of how to do this for my toon's pitch and rotation based on the transport's transformation matrix.

Is there a built-in helper that I'm missing w/C# to accomplish this?

I started to look at the second part of CGGameObject::GetFacing and it went a bit over my head.

~ Tanaris

2. Look at 0x0041F420 (not rebased) - specifically:
Code:
```  v2 = this;
v3 = MovementGetTransportFacing(*(_QWORD *)(this + 8));
v23 = v3;

...

CMath::normalizeangle0to2pi_(*(float *)(v2 + 32) + v23);
*(float *)(v2 + 32) = v3;```
To me it just looks like your rotation gets set += transport rotation. IIRC your pitch does not get changed with entering and exiting transport.

3. Do you know exactly where the transport's rotation is? When looking at the matrix I see 4 floats that constantly change (2 are basically opposites of each other), I'm not certain which I should be looking at.

Then I'll give that a try

4. Originally Posted by Tanaris4
Do you know exactly where the transport's rotation is? When looking at the matrix I see 4 floats that constantly change (2 are basically opposites of each other), I'm not certain which I should be looking at.

Then I'll give that a try
No idea. Just use this?
Code:
`MovementGetTransportFacing(*(_QWORD *)(this + 8))`
Edit: You could also use the vfunc @ 0xD. This is exactly what MovementGetTransportFacing does anyway though.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
All times are GMT -4. The time now is 02:20 AM. Powered by vBulletin® Version 4.2.0