Jump to content

Get Entity Z


Abuse

Recommended Posts

Hey, I am working on a middle mouse button camera rotation class,

 

I have been able to calculate the required camera yaw angle to get the entity into the gameview however I am having troubles calculating the pitch angle.

 

I need a function that can return me the local 'grid' Z position of an entity, just like getCamera().getZ() does.

 

I've noticed that entities have getGridX() and getGridY() functionality, but I couldn't find anything that returns the Z value (Unless its always the same as position.getZ()

 

Best case scenario would be finding Z position relative to my player (or camera)

 

Edited by Abuse
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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