Jump to content

Camera yaw move directions not exactly going to position?


Nebulae

Recommended Posts

Hello,

 

I can't seem to figure out why my script will not move my camera yaw to the exact position I want. I never noticed an issue with this before and it seemed to work fine but now it will sometimes be off ~6 degrees give or take. This is weird because in my script every loop I have it check to make sure the getCamera().getYawAngle() is equal to my desired angle. This is why I find itw eird it won't move the camera because I even put a logger into the section and it should be executing the moveYaw method but it doesn't appear to do anything. This results in repeated camera yaw check fails and throws off clicking spots.

 

Is there anyway like with creating a walking destination that you can set the min move to 0 so it will exactly move to it?

Link to comment
Share on other sites

9 hours ago, Juggles said:

It has a margin of +-6 

Hey, I can't seem to figure out another weird bug wondering if you have any input on it kind of related to this I guess.

 

When using gRandom (I know it's deprecated) I set it using gRandom(0, 6) sometimes it appears to generate 10 or other numbers outside of its bounds. An example of what I was doing would be like (1000 + gRandom(0, 6)) this will sometimes output 1011 etc...

Link to comment
Share on other sites

26 minutes ago, Nebulae said:

Hey, I can't seem to figure out another weird bug wondering if you have any input on it kind of related to this I guess.

 

When using gRandom (I know it's deprecated) I set it using gRandom(0, 6) sometimes it appears to generate 10 or other numbers outside of its bounds. An example of what I was doing would be like (1000 + gRandom(0, 6)) this will sometimes output 1011 etc...

isn't it gRandom(standard Deviation, mean) ?
Should only give you 1006 every time then 

Link to comment
Share on other sites

22 hours ago, Juggles said:

isn't it gRandom(standard Deviation, mean) ?
Should only give you 1006 every time then 

 

Output from

log(gRandom(0, 1))
[INFO][Bot #1][09/26 11:36:37 PM]: 1
[INFO][Bot #1][09/26 11:36:37 PM]: 0
[INFO][Bot #1][09/26 11:36:38 PM]: 0
[INFO][Bot #1][09/26 11:36:38 PM]: 2
[INFO][Bot #1][09/26 11:36:40 PM]: 1
[INFO][Bot #1][09/26 11:36:40 PM]: 1
[INFO][Bot #1][09/26 11:36:41 PM]: 0
[INFO][Bot #1][09/26 11:36:41 PM]: 1
[INFO][Bot #1][09/26 11:36:43 PM]: 1
[INFO][Bot #1][09/26 11:36:43 PM]: 0
[INFO][Bot #1][09/26 11:36:44 PM]: 1
[INFO][Bot #1][09/26 11:36:44 PM]: 2

 

Just to verify doing gRandom(0, 0.5) works the way I want it to.

Edited by Nebulae
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...