the mousemove isn’t really working. It works in the origianal box, where the the camera isn’t moved, but outside of it, it does not work. Mousemove is set to in game…
The X and Y output seem fine, so it must be something to do with the expression once you get into negative x or something like that. I’m on mobile atm so I’m unable to check exactly what’s happening.
Also game link:
It’s inside the player, inside the hammer calculations. The math seems fine, just the angles given are wrong.
@CodeAlpaca, can you help figure out the problem?
The code is in the player, in the hammer calculations
I was going to look into it but I’m getting a crash that I can’t replicate, and it’s coming from your hammer Y velocity input? If you have this crash, I suggest telling Grazer because there’s no cause for it.
Whatt… I swear this was working last time I edited the code. What happened. I’ll look into it, and tell you when it’s fixed. Sorry about that.
Yes, you’re right, it is something very weird. The number it is outputting to the y velocity of the hammer is infinity, but it shows a number (not infinity) in the bundle.
Ok, I figured it out. I fixed the crashing. Now
@JR01, @CodeAlpaca can you help me solve the problem
This happens because mousemove doesn’t calculate camera zoom, it’s easier to see if you have a test object set to the mouse position set to game coordinates.
I actually made a bundle to fix this shortly after the zoom was added to the camera behavior. Only thing with this one is that you will have to send the x, y and zoom camera outputs to a global to use it, as well as the game width and height. Using this bundle should fix the mousemove incorrect values.
{"data":{"behavior":{"v":"2","nodes":[{"inputCount":5,"outputCount":2,"name":"Mouse to Zoom","behaviorType":"logic.NodeGroup","x":-810,"y":160,"group":"a199d52dde839844","id":"c5cf5b0948cb7a4d","notes":"If the mouse position is off, reload this game after setting the Screen size.","n_o":0,"isMenuItem":false},{"inputCount":0,"outputCount":2,"name":"MouseMove","behaviorType":"logic.triggers.MouseMove","x":360,"y":-128,"group":"c5cf5b0948cb7a4d","id":"c5cf5b098f9f3248","gameCoords":false},{"inputCount":0,"outputCount":1,"name":"Bundle Input","behaviorType":"logic.NodeGroupInput","x":540,"y":64,"group":"c5cf5b0948cb7a4d","id":"c5cf5b09b909e64a","portId":"c5cf5b0948cb7a4di0","tag":"Width","dataType":2},{"inputCount":0,"outputCount":1,"name":"Bundle Input","behaviorType":"logic.NodeGroupInput","x":540,"y":128,"group":"c5cf5b0948cb7a4d","id":"c5cf5b09498c0849","portId":"c5cf5b0948cb7a4di1","tag":"Height","dataType":2},{"inputCount":0,"outputCount":1,"name":"Bundle Input","behaviorType":"logic.NodeGroupInput","x":540,"y":192,"group":"c5cf5b0948cb7a4d","id":"c5cf5b09ce869746","portId":"c5cf5b0948cb7a4di2","tag":"Cam X","dataType":2},{"inputCount":1,"outputCount":0,"name":"Bundle Output","behaviorType":"logic.NodeGroupOutput","x":990,"y":-128,"group":"c5cf5b0948cb7a4d","id":"c5cf5b093475b841","portId":"c5cf5b0948cb7a4do0","tag":"X","dataType":2},{"inputCount":1,"outputCount":0,"name":"Bundle Output","behaviorType":"logic.NodeGroupOutput","x":990,"y":64,"group":"c5cf5b0948cb7a4d","id":"c5cf5b091370cb4e","portId":"c5cf5b0948cb7a4do1","tag":"Y","dataType":2},{"expression":"(A*(100/D)-((((B*32)*(100/D))/2)-(B*16)))+C","default0":0,"default1":28,"default2":0,"default3":100,"default4":0,"default5":0,"params":4,"version":2,"tag":"","inputCount":5,"outputCount":1,"name":"Expression","behaviorType":"logic.logic.Expression","x":810,"y":-128,"group":"c5cf5b0948cb7a4d","id":"c5cf5b0a43245043","notes":"((Mouse X/Y) * Zoom Multiplier - (Screen Length/Width) * Zoom Multiplier /2 - (Screen Length/Width) /2 ) + Camera Offset\r\n \r\nZoom Multiplier = 100/Zoom","n_o":1},{"expression":"((A*(100/D))-((((B*32)*(100/D))/2)-(B*16)))+(C)","default0":0,"default1":21,"default2":0,"default3":100,"default4":0,"default5":0,"params":4,"version":2,"tag":"","inputCount":5,"outputCount":1,"name":"Expression","behaviorType":"logic.logic.Expression","x":810,"y":64,"group":"c5cf5b0948cb7a4d","id":"c5cf5b0a646cf545"},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":540,"y":-128,"group":"c5cf5b0948cb7a4d","id":"c5cf5b0aeef62b48","startVal":0,"roundMode":1},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":540,"y":-32,"group":"c5cf5b0948cb7a4d","id":"c5cf5b0a3cc7034f","startVal":0,"roundMode":1},{"inputCount":0,"outputCount":1,"name":"Always","behaviorType":"logic.triggers.Always","x":360,"y":-32,"group":"c5cf5b0948cb7a4d","id":"c5cf5b0a542fab4e"},{"inputCount":0,"outputCount":1,"name":"Bundle Input","behaviorType":"logic.NodeGroupInput","x":540,"y":256,"group":"c5cf5b0948cb7a4d","id":"c5cf5b0a9931f949","portId":"c5cf5b0948cb7a4di3","tag":"Cam Y","dataType":2},{"inputCount":0,"outputCount":1,"name":"Bundle Input","behaviorType":"logic.NodeGroupInput","x":540,"y":320,"group":"c5cf5b0948cb7a4d","id":"c5cf5b0a426a0249","portId":"c5cf5b0948cb7a4di4","tag":"Zoom","dataType":2}],"links":[{"input_id":"c5cf5b0aeef62b48i0","output_id":"c5cf5b098f9f3248o0"},{"input_id":"c5cf5b0a3cc7034fi0","output_id":"c5cf5b098f9f3248o1"},{"input_id":"c5cf5b0a43245043i1","output_id":"c5cf5b09b909e64ao0"},{"input_id":"c5cf5b0a646cf545i1","output_id":"c5cf5b09498c0849o0"},{"input_id":"c5cf5b0a43245043i2","output_id":"c5cf5b09ce869746o0"},{"input_id":"c5cf5b093475b841i0","output_id":"c5cf5b0a43245043o0"},{"input_id":"c5cf5b091370cb4ei0","output_id":"c5cf5b0a646cf545o0"},{"input_id":"c5cf5b0a43245043i0","output_id":"c5cf5b0aeef62b48o0"},{"input_id":"c5cf5b0a43245043i4","output_id":"c5cf5b0aeef62b48o0"},{"input_id":"c5cf5b0a646cf545i0","output_id":"c5cf5b0a3cc7034fo0"},{"input_id":"c5cf5b0a646cf545i4","output_id":"c5cf5b0a3cc7034fo0"},{"input_id":"c5cf5b0aeef62b48i1","output_id":"c5cf5b0a542fab4eo0"},{"input_id":"c5cf5b0a3cc7034fi1","output_id":"c5cf5b0a542fab4eo0"},{"input_id":"c5cf5b0a646cf545i2","output_id":"c5cf5b0a9931f949o0"},{"input_id":"c5cf5b0a43245043i3","output_id":"c5cf5b0a426a0249o0"},{"input_id":"c5cf5b0a646cf545i3","output_id":"c5cf5b0a426a0249o0"}]}}}
Thank you, I’ll try it out tomorrow!