Player Controller/Timer Nodes

Thank you! Does that mean I have to update Armory?

no no no, armory is good, the nodes need to be updated, maybe you can use an older armory build.

Alright, where can I find it? I was only able to discover the source codes.

I just looked at your console log. The problem is not your PlayerController node, it is caused by a CameraController node.

About the Problem:
About 6 lines from the top it states Armory v0.4.
In that version the lerp function (the one it’s complaining about) was static meaning that it could be called directly. But a few days ago this changed in the armory github repository.
After @Monte_Drebenstedt 's bug report I made adjustments to the node to make it work with the armory git version. But this has probably broken compatility with the older versions of armory.

About a Solution:

  • One Solution would probably be to use an older version of the node, I could upload it here and you would have to replace the file in your logic_pack directory.
  • Another Solution would be to update armory. As far as I know there is a builtin updater in the addon settings. I think it pulls the bleeding edge version from git, but I have never used it myself. This would most likely remove the error, but may introduce instabilities. (There also is the a download section on armory3d.org with a link to itch io, where you can get a 0.5 version. However, these are only blender 2.7 and also come with the old lerp function.)
1 Like

Great, thank you for the awesome reply! I’ve tried with Armory3D version 0.5, but it still doesn’t work. It would be amazing if you could upload an older version of the node!

Have you actually replaced the library files with the new ones from @zaethan in your project. You would need to download the new logic pack files and copy them into the library folder in your specific project. I am not having any issues with version 5 for 2.7. The new files are working perfectly.

The logic pack files are separate from the updates that armory does inside blender. you would need to download and replace them manually.

No I haven’t replaced the library files yet because I don’t know what I should replace them with. Should I get an updated version of the nodes or an older one?

Here is the old CameraController before the Lerp change.
CameraController.hx (2.8 KB)

To use it, navigate to your .blend file. There is the Libraries folder next to it. Inside that one navigate to Sources, then armory and finally logicnode. This is where you want to copy this file to, replacing the other CameraController.hx which is already in there.

If you don’t want to play around with the source files, you can also head over here https://github.com/armory3d/logic_pack/tree/fd8a5d046cd1ca2e5095a18f2ed73b0b37d41417, which is an older version of the repository and download it as a zip. Then simply extract that zip file into the Libraries folder and override / remove the old logic_pack folder (or whatever it was called before).

As a bit of background information about the problem: (for those who are interested)
Previously the lerp function was defined as public static, which means it could be called like Quat.lerp(...)
However, in the latest commits, the function definition changed to public inline. The static keyword is gone, which means the function needs to be called this way new Quat().lerp(...) (or using another Quat object). This syntax however is incompatible with the old static function.
This means that the node is either incompatible with the development code, or with the released 0.4/0.5 versions.

1 Like

Hey! Thank you so much it finally worked and I can perfectly keep working on the game. I have just one more question for the Camera Controller. Is it possible that I can hide my mouse cursor while I play the game? Otherwise the camera won’t move further as soon as my cursor hits the edge of the screen.

Wasn’t able to send a screenshot because it automatically hides the cursor for the picture.

Yes that’s possible. However this functionality is not integrated into the CameraController itself. There are extra nodes for this, namely Show Mouse, to show / hide the cursor, and Set Mouse Lock, to lock it to the center of the window. They are both found in the input category. Using these with an On Init node is enough, the mouse will stay locked and hidden.
Like this:

Thanks for the response. I tried adding the nodes to the camera but it doesn’t work. I thought in fullscreen it would probably work but not sure how to Play the game in fullscreen. Any suggestions?

set the render resolution to the full resolution of your screen.

I’m sorry, but what exactly does not work?
Is only locking / hiding the camera infunctional?
Or did the whole Controller stop working?

A few ideas:
If you created another NodeTree, did you add all of them? I always forget that part. Did you, at some point, rename the NodeTree? If so, make sure that you also change that in the “Traits” section.

As for fullscreen, there should be an option in the “Render” tab, under “Armory Project”

I’ve locked the cursor and added the show mouse node. Unchecked the Show Checkbox. I checked the traits to make sure that I’ve assigned them correctly. When I tried to Play the game. Krom starts, but instantly closes. Leaving no crash report or anything behind.

These are the Resolution Settings I’ve adjusted:

These are the traits and the nodes for the cursor:

Looking at your settings, it seems like everything is alright, so I guess the issue is caused by any of the nodes.

You might want to try disconnecting single nodes to find out which one is causing the issue (or disconnect all of them and reconnect them one by one).
The baviour that you describe actually remembers me of when I had problems with hiding the mouse cursor. Locking it was fine, but I could not hide it, as it would crash Krom (But I thought it was caused by my setup, as I it did not seem like anyone else had the problem.). So you might want to start by disconnecting the Show Mouse node and see if that helps.

i was trying to use the gamepad coord node but it is not working