yes collision mask sets in Defold and walker.script need to get all masks group from collision object
It’s not about TrenchBroom, but a more common case. The case step by step in the Defold Editor:
-
@Alexander_Bulatov placed few collision objects on the level with different collision groups “
ground
” and “platform
”. - Added the capsule collision object to the player and set “
ground, platform
” to its mask. - Added
walker.script
to the player and set the url of the capsule to its go.propertycollision_standing
. - In runtime,
walker.script
wants to use the mask of the capsule to detect a ground or ceiling with raycasting. - This is currently implemented with the collision_mask message which the user have to post by himself. But would be great to read it from the capsule collision object automatically during initialization of
walker.script
without additional message passing.
But what is the capsule used for if you use ray casts for collision detection?
A capsule used to resolve all the collisions with obstacles. Ray casting is used only to check the ground, ceiling and stairs to prevent unnecessary collision resolving and to better understand the current state for jumping, sliding, falling, etc.
For example, if the player walks on the ground there is no need to fall inside the ground and resolve collision with getting the body up every frame. Another example, it’s more easy to understand can the player stand up when crouching or not by this way.
Some screenshots of rays:
Could you tell me please if I need to somehow update the project to the new realities with the fixed_update()
method?
@Pkeod found that the kinematic walker capsule shakes against the walls on modern computers with Windows. But everything is fine on Macbook Air 2012 (!) and Macbook M1 2021.
The project has a kinematic body, manual collision resolution in on_message()
and position updating in update()
. The current code doesn’t contain the fixed_update()
function at all.
Current Defold project settings:
- Vsync is on;
- Update frequency is 0;
- Fixed update frequency is 60;
- Use Fixed timestamp is off;
- Max fixed timestamps is 2;
Somebody please make a basic tutorial on 3D and how to unite all three of the basic components, the Kinematic Walker, Illumination and Operator TOGETHER in one project.
I mean, these are the basic building blocks, they all belong in one setup.
I’m migrating my game project from Godot, and while 2D dev in Defold is well covered, the 3D aspect is quite daunting and shrouded in mystery. Heck, I can’t even find proper camera control in editor perspective view, like, is there a free look mode? How can I rotate camera? There seems to be zero info on that in the docs. Only 2D (although the description says that Defold is essentially a 3D engine, yeah, that’s good to know but…)
I haven’t felt so helpless in quite a while, feeling like I’m ready to hire a commercial dev to help me out with this.
This is the game prototype I’ve made in Godot, and I need to rebuild it in Defold.
Looks like all three components I need are there. How do I bring them together in one project?
Perhaps @astrochili can provide some pointers? Or maybe someone has already made this work and would be willing to share their setup?
There is some mention of scene view navigation here: Editor overview
- Pan: Alt + left mouse button.
- Zoom: Alt + Right button (three button mouse) or Ctrl + Mouse button (one button). If your mouse has a scroll wheel, it can be used to zoom.
- Rotate in 3D: Ctrl + left mouse button.
And we almost have WASD movement ready. Not sure of the status @jhonny.goransson ?
Definitely looks doable in Defold!
Thanks for the info!
The Illumination example project contains all these components in one level collection. So my advice would be to just look at the example that comes with the library . Or even use it as a starting point.
@electroskeptic But Illumination support only pre-baked shadows. For dynamic shadows, you should look at defold-light-and-shadows, as well as an example of crossing it with Illumination - defold-illumination-new. It takes a bit more effort and study to make it work the way you need it to, so it’s better to start with small steps.
If you encounter some difficulties, tell about it here or in the Illumination thread, depending on the context, then it will be clear how to help you.
There is no full tutorial on how to build a 3D project with these libraries, although I certainly dreamed that “it would be nice someday” to record tutorial video about it.
Wow, thanks for this info! I’m delving deep on docs now, then I’ll complete a couple of 2D tuts available to get the hang of the overall workflow and then get to the new templates you mentioned.
I’m so in love with Defold web 3D performance and footprint I’m pretty determined to make my game work in it.
Yes, the shadows and light are very important (most of the gameplay mechanics is exactly about the play of light and dynamic shadows).
Is there anyhing like light detection possible at this point?
Like having a sort of sensor which is triggered whenever there’s light around it?
You can implement this using a collision body in the shape of a cone with a trigger
type and place its pike at the ligth source position.
The cone collision body can be created with blender (defold-blender-convex-hull, dae2collision), trenchbroom (trenchfold), or manually (Convexhull shape in 3D).
thanks!
@astrochili
just for confirmation. is it expected that a box shape collision object will not work properly as a collision? what I see is that the player passes through it. if I jump over the cube instead, the collision works correctly.
EDIT: no sorry I’m an idiot. mask must be set to walker. the jump probably works because it’s a raycast - it doesn’t care about group and mask, it just finds something and sits on it
hei @astrochili
just wanted to let you know that walker and operator they were essential for my gamejam submission and i would like to thank you your name is also mentioned in the in-game hud
Does anyone experience this bug in the html5 demo where if you keep rotating around one way or another or back and forth sometimes it suddenly snaps/jolts another amount of distance? Difficult to exactly reproduce but it happening is really consistent.
I have a problem like this when I press Escape
to unlock the cursor. Is this it?