playMaker

Author Topic: [SOLVED]Vid: Angle is wrong, operator executing prematurely,  (Read 2662 times)

mikejkelley

  • Full Member
  • ***
  • Posts: 136
[SOLVED]Vid: Angle is wrong, operator executing prematurely,
« on: January 15, 2014, 06:40:04 PM »
So much is going wrong. It's easier to explain in a short video.

Please assist, this is standing between me and game completion.

http://www.youtube.com/watch?v=QK_DqKXN5X4&feature=youtu.be
« Last Edit: January 16, 2014, 10:31:54 PM by mikejkelley »

redikann

  • Full Member
  • ***
  • Posts: 174
I am not going to tell you this is a correct solution but it is something I've used for a work around before. If I remember right I used an empty to always look at a target I needed to know an angle to and then that provided me with a correct rotation to copy  from. I seem to remember 'get angle to' action always returned 0 - 180 no matter what.

redikann

  • Full Member
  • ***
  • Posts: 174
Alright so 1 of the problems is your switch statement. You are immediately adding 90 so you will never be less than 90. Adding 90 to your original angle wont help because "Get Angle To" will always return 0 to 180.Think of it as a mirror, you might think 90 and 270 would be left and right, but get angle to will always treat left and right as 90. It does seem that your current logic will always fire and exit because your switch statement will be decided before your Get angle to has finished.
While I believe your current logic will never be right I am curious if you leave your Switch action off and change that state to an "Action Sequence" would your 2 variable add 90 correctly.
« Last Edit: January 16, 2014, 12:15:31 AM by redikann »

mikejkelley

  • Full Member
  • ***
  • Posts: 136
Cool, thanks that would explain a lot, I'll try this out first thing tomorrow!

mikejkelley

  • Full Member
  • ***
  • Posts: 136
Re: [SOLVED]Vid: Angle is wrong, operator executing prematurely,
« Reply #4 on: January 16, 2014, 10:32:39 PM »
Yeah, I needed to use get rotation instead of get angle. Thanks!