Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Is there a way to do make an variable that disabels mouse and keyboard inputs for an few seconds without an javascript? idk why but coppercube just outright refuses to even print "hello world" using java lol sooo...is there a way to do it with variables? |
||||
|
are you using javascript and not java? print("Hello, World!"); that will print to the console. umm i'd use code to do what you want, but i guess the easiest way would be for you to put all your input behaviors under a folder node and then hide the folder node so the behaviors don't work for however long you need then set them visible again. note you need the behavior to turn on/off the visibility to be outside the folder node for it to work, i guess |
||||
|
Short answer is "no". It's not possible to disable inputs for built-in behaviors at all. Though, you can attempt to workaround it using ccbEmulateKey. I haven't tried it, but I think it will not work - input for 1 frame still will be read by those behaviors. If you're using a built-in 3rd person controller, I would rewrite it in js, and add a possibility to switch all logic off using a variable like: onAnimate() { If you're using fps camera, you can switch to a simple camera which doesn't read any user input. You can also use ccbSetMousePos to set mouse cursor position in the middle of the screen. All of that requires some trial and error, and might work or not work based on your specific situation. |
||||
|
Sound like he trying do a freeze camera? If it's a freeze camera, then create a cube with a proximity. In action set change position, fixed poistion to camera, do something later after ms 3000 delete scene node cube. When the character walks on proxi then the camera freeze. Or write a Javascript for camera with fixed position target node and camera. https://samgrady.itch.io/copperc... |
|