Jump to content




Detecting where the player is looking


  • You cannot reply to this topic
4 replies to this topic

#1 Hackingroelz

    Peripheral Designer

  • Members
  • 213 posts
  • Locationthe Nether(lands)

Posted 16 March 2012 - 07:30 PM

Hello

I've been working on a peripheral that adds more ways to interact with the computer. The problem I'm having is that I can't find out how to detect where the player is looking. Could sombody please tell me if there is a way to detect this? Thanks in advance.

#2 rerere284

  • New Members
  • 15 posts

Posted 16 March 2012 - 08:42 PM

I know that in NBTedit, there is a variable for which way the player is facing in the same section as the player's velocity and position.

#3 ComputerCraftFan11

  • Members
  • 771 posts
  • LocationHawaii

Posted 16 March 2012 - 08:46 PM

In the F3 menu, there is a variable called F that shows the direction your facing, you can try to make your peripheral get the value of F.
(it might be EntityPlayer.getF or something)

#4 6677

  • Members
  • 197 posts
  • LocationCambridgeshire, England

Posted 16 March 2012 - 11:03 PM

Not to direct traffic away from this forum but how about asking the guys on the main minecraft forum. Way more modders to help get the code snippet you need.

#5 Casper7526

    OG of CC

  • Members
  • 362 posts

Posted 17 March 2012 - 01:23 AM

I sorta agree with 6677 only because your not asking anything relating to peripherals, your asking a general minecraft modding question.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users