Static View Type

CurioShelf

New member
Good afternoon,

Thanks for moving this to the correct location.
For context incase this helps anyone else. I’m trying to work through the example view type posted in the documentation. Based on our conversation in the general forum, m_transform.forward and m_charactertransform.forward should not be used instead with V3 it should be “m_Rigidbody.rotation * Vector3.forward”.

I was following your instructions to add "m_Rigidbody.rotation * Vector3.forward;" to the camera view type example. No Errors occurred but in game when I press W A S D the character only walks in whatever direction he is facing. He does noes not follow the "Third Person Adventure" movement scheme.
I'm a bit lost on this.

Any advice would be appreciated.
 
Last edited:
The Third Person Adventure movement type uses the look source to determine the direction. My guess is that you'll need to create a new movement type that returns a different value within GetDeltaYawRotation.
 
Currently the documentation has an example of a camera that keeps the same position/rotation.
In V2 I was able to use the example view type with the Third Party Adventure Movement and get the results I needed. In V3 the example does not compile due to m_charactermovement. If I remove m_charactermovement and replace it with m_transform.forward it works as intended with the Third Party Adventure Movement. However, when I apply "m_Rigidbody.rotation * Vector3.forward;" it compiles but does not move based on the camera look direction. Any chance of that example being updated?

Let me look at creating a new movement type for the aim facing.

I appreciate your support.
 
Last edited:
return m_CharacterRigidbody.rotation * Vector3.forward;

Thank you for the update to the example code. The camera is now doing what I was hoping for. Now to keep digging through the rest of the documentation.
 
Glad you got it working. I think that once the bug fixing settles down I'll add a static view type to the third person movement types section since I have seen it mentioned a few times.
 
It's really handy to be certain. Just needs a few small changes to make it perfect.
For example, I have mine switching between different cameras and adopting the new camera's view transform and rotation using
return m_Transform.parent.rotation; and return m_Transform.parent.position;.
Just as an FYI it doesn't react well to switching to first person and back so be aware it may cause a few bugs. I'm working through that now as well as what happens when you move from one camera to another how does that impact player input. Can't have players walking in circles. o_O
 
Last edited:
Top