Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Invictum's avatar
Invictum
Honored Guest
10 years ago

Unity5 / DK2

Since the unity site is down for some big announcement :x

I was wondering if anyone could help point me in a good direction, I currently have modified the OVRPlayerController, I have model attached to forward and then have a head script that is able to follow the camerarig center and adjust accordingly works great except for occasional hiccups where the rig seems to adjust height on play even though that option is off, so grabbing initial positions for shoulder/neck bones doesn't quite line up.

I also have a 3d mouse to interact with so basically I have hmd controlling move direction and mouse is for interacting not turning. But the controller unable to rotate except q and e input.

My goal was to have the body begin to rotate inline with camera when going forward or backwards, I wanted to execute something like StartCoroutine("CharacterLerp", fromRot ,toRot , time);

But getting the to rotation is problematic, I've looked at tons of ways and I think I am overcomplicating it as some of the simpler solutions lookroatation/lookat get me closer, I don't think it would require clamping anything? I have went over the quaternion / vector math documentation and everything has clicked really easy except this problem is driving me batty.

I am new to 3D programming so I am not up to par where I should be I assume, but I have lots of years programming boring business software and dealing with all sorts of API's/SDKs :mrgreen: .

Gracious if you could tell me where my thought train is derailing or oversight.

Thanks!

3 Replies

Replies have been turned off for this discussion
  • Eesh I found it after going further after adding the rigidbody I can go off velocity :roll:
  • Ohh nice!, It does I was going Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(Vector3(groundedrigidvelocity)),time) but your suggestion seems to be a lot less processing, and cleaner.

    Gracias!