Jump to content

Rotate player with his camera


JAY.ANN

Recommended Posts

Is it real to make player rotate with his camera as it realized in GTA VC and GTA III?

I tried to use getCameraRotation() but it didn't give a good result - player had a right rotation, but his animations were broken and inverted.

I guess it's all about the game engine's features. I noticed that while the player is on ground and uses camera rotation as rotZ coordinate he bugs himself.

Edited by JAY.ANN
Link to comment
  • Moderators
8 hours ago, JAY.ANN said:

Is it real to make player rotate with his camera as it realized in GTA VC and GTA III?

Not sure, but this is how you can get the camera rotation:

local cameraElement = getCamera()

--

local x, y, z = getElementRotation(cameraElement)

--

 

 

Link to comment
1 hour ago, IIYAMA said:

Not sure, but this is how you can get the camera rotation:

local cameraElement = getCamera()

--

local x, y, z = getElementRotation(cameraElement)

--

 

 

It's not the answer - player won't stand on the ground correctly

Link to comment
  • Moderators
1 hour ago, JAY.ANN said:

It's not the answer - player won't stand on the ground correctly

It is a bit tricky, but not impossible. And if the rotation is inverted, then invert the rotation.

But yes, changing the engine is not possible, there will always be some limitations.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...