0
Cannot Reproduce

Mouse Position not working inside State Graph

Oliver Krauleidies 2 years ago updated 2 years ago 3

Hello there,
i'm not sure, but i assume i found a Bug.
I've made a Script to control a Player Character in top-down Style. At first i had everything set up in a normal Macro, however i wanted to put everything into a State Graph (to give the Player states such as alive or dead etc.) After a few changes to some things (Variables and such) i've come across the problem, that the "Input Mouse Position" does not work everytime.
To clear things up in how the Script works: I've made a Simple GUI Button (Game Start), that when pressed, triggers the Transition from the Start State of the player to the Alive State (which basically everything happens).
After that in some cases everything works fine. I can move the Player, rotate and so on. But in most Cases ( I assume around 50-60 %) the Input Mouse Position does not work, and thus the player does nothing and basically everything is broken. I have to restart the Game (1 or more times) until it works again.
I've made a few Pictures of the Graph, so it may help in finding a Solution.
Thanks anyway for any Help ;-)


Edit: I just found out, after experimenting with setting and getting the mouse position in a Variable, that the problem seems to be the Screen Point to Ray. As shown in the Picture, the Get Mouse Position gets the Input and i can set and get it to/from Variables. However as soon as i want to put it into the Screen Point to Ray, the Script won't get anything.

Bolt Version:
1.4.0f7
Unity Version:
2018.2.16f1
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Pending Review

Hi Oliver,

Sorry you're experiencing this issue.

  1. Do you get any errors or warnings in the console?
  2. Can you give me step by step instructions to create a small set of graphs that reproduces the issue?

From those screenshots, I don't see why the variable wouldn't get fetched. It seems required so Bolt should be fetching it dynamically.

Cannot Reproduce

Closing this as I cannot reproduce the issue from the information provided. Feel free to comment again if you can provide reproduction steps.

Sorry for answering this late, haven't watched the Forum for a little while.

I'm actually not on this anymore, however i was able to Bypass this problem. I simply put everything inside the Calculate MoveSpeed Super State out of that. Apparently it won't work inside the State. 
But as i just mentioned i'm currently working on something else and didn't had this in mind anymore.

I'll look into it of i can reproduce this again.