-
Posts
4,816 -
Joined
-
Last visited
Community Answers
-
AggrorJorn's post in Problem with publish was marked as the answer
When you play the game via the editor, your game starts with the currently opened map in the editor. When you publish a game, the main.lua file opens the map specified with
Map:Load("Maps/start.map") If left unchanged this will be start.map which is the scene with the 2 boxes.
-
AggrorJorn's post in Collision Camera?? was marked as the answer
You can do a camera pick (so the pick starts from the camera point of view) https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_Camera_Pick.
The pick returns true or false. when pick is true, you can also retrieve information from the pickinfo object. In this object you find the position of the pick, normal etc. https://www.leadwerks.com/learn?page=API-Reference_Object_PickInfo
-
AggrorJorn's post in Center Player Character Controller?? was marked as the answer
Either adjust the pivot position in Blender or make the character model a child of the player and move it upwards. The physics controller remains on the parent.
-
AggrorJorn's post in Modify game information and icon was marked as the answer
In the root of your project you can find a 'YourProjectName.werk' file were you can edit Author name etc. In the root of your project you can find a 'thum.jpg' that has your games icon for the project manager. To replace the ico of your exe, you can use an installer tool (for example www.jrsoftware.org/isinfo.php). But you can also edit it directly. I would just google that last option since there are various ways to do this. -
AggrorJorn's post in all information of PickInfo() was marked as the answer
Can't find it either. This is the old documentation:
Here: https://www.leadwerks.com/learn?page=API-Reference_Object_PickInfo
Vec3 position Vec3 normal Entity* entity Surface* surface Face* face int triangle Mat4 mat -
AggrorJorn's post in Sounds not working was marked as the answer
You can convert them to different bitrates using Audacity. While you are at it, change it to ogg format. Saves you a lot of space.
-
AggrorJorn's post in Leadworks & Perforce was marked as the answer
It looks somewhat similar to SVN so you are good to go. Just remember that map files can't be merged, but code files are no problem.
Other version systems that works well are SVN, git and mercurial.
-
AggrorJorn's post in Concentration Game was marked as the answer
Pseudo approach
Create a vector3 that represents your mouse in 3d. Use this https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_Camera_UnProject By changing the Z value of the above vector you determine how far the pick goes. Your raycast now 'shoots' from the mouseposition to the direction the camera is looking at with a given (z axis) length. -
AggrorJorn's post in Scripting a Character Controller in Lua was marked as the answer
This API command comes with a complete sample on how to set up a basic character controller.
https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_SetInput
Alternatively you can look at or use the FirstPerson script. This script is located in the scripts folder in any project which uses the game template "FirstPersonShooter"