So this might be a simple question but I have not been able to find an answer for it. If I have a map that I have created myself in Maya, how do I then make it solid so that a player character can move up and down on it, and then how do I make the character fall when it's not walking on something solid?
To explain a bit further: I'm making a game map, in this map the player should be able to fall through objects that break when walked on, for example a bridge. But right now when I walk around with the character it just walks on the same height, ignores objects that i have given Physics actors and just walks through everything.
Thanks in advance!
You can approach this in two ways either using a Physics based mover with proper programming as in these series.
https://www.youtube.com/watch?v=KuN6H7SQMrM
Normally kinematic actors don't take into account the physical external forces except of explicit collision. so they don't fall with gravity. What you can do is to have dynamic actor set to the character and switch it to be kinematic or dynamic based of its collision with the ground or objects below. As in this tutorial.
https://www.youtube.com/watch?v=8chYAf-F11U
Hopefully it'll helps
//I figured out what the problem with the scripting was. Ignore the reply below.
Hi and thank you for the answer!
While coding though i ran into this problem, on row one it says: <expression> expected near '['. Which is weird since I did exactly the same as in Dan Matlack's video.
Hello again.
After some more testing it turned out it did not work entirely. After having made the scripts and the level flow I tested the level and got this error:
This is what my code looks like:
global.script_flow_nodes
flow_callbacks.lua
well that error is common, and you can neglect that primarily the global script flow nodes is called by project.lua when the game will run, but not implicitly . so it just throws the error telling it cannot execute function as it's not present . and normally whenever you plug any function with unit spawned that flow function gets trigger even in, editor so technically it will see as if you've added a function which is not present, i hope autodesk look into this but what you can do is that instead of calling the function as unit spawned you can trigger that by some other ingame event, for instance it's ok to let it be dynamic when it spawns in level, and you can then call the function with some other in-game event like keybutton or so, because by default dynamic actors are sleeping initially so it won't be of much problem and ok if its dynamic in few starting frames, then you can call the set kinematic function by some other in game calls.
Can't find what you're looking for? Ask the community or share your knowledge.