Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not use player.Rotation #9

Open
and7ey opened this issue Jun 13, 2020 · 2 comments
Open

Can not use player.Rotation #9

and7ey opened this issue Jun 13, 2020 · 2 comments
Labels
bug Something isn't working question Further information is requested

Comments

@and7ey
Copy link

and7ey commented Jun 13, 2020

Here is the code -

          player.Rotation(func(rotation float64){
                //  fmt.Printf("  player rotation: %v\n", rotation)
            })          

The error is
[LSP: Go compiler] player.Rotation undefined (type *mcwss.Player has no field or method Rotation)

@and7ey
Copy link
Author

and7ey commented Jun 15, 2020

Btw, is there any way to get not only Y-rotation, but X-rotation also?

@Sandertv Sandertv added the bug Something isn't working label Jun 15, 2020
@Sandertv
Copy link
Owner

I think that method wasn't included in the last version. Please try updating to 1.2.0 and try again.

As for the X-rotation, unfortunately this doesn't seem to be exposed. (Or wasn't last I tried anyway) I was looking for ways to get the X-rotation so you can calculate the target block of a player, but to no avail.

@Sandertv Sandertv added the question Further information is requested label Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants