论坛

由用户创建的信息 PAT31
19 December 2019 19:14 [ON MODERATION]
Hello,
First please excuse me for my english [slightly-frowning]
1/ B4W is far better for animation than BGE but not for simulation. B4W Physics Engine is not very realistic particularly for collisions.
2/ I suggest for object "shot" in tab Physics 'Actor' checked but not 'Ghost'.
3/ For object "Cube" in tab Physics
Type 'Rigid Body'
'Sleeping' checked but not 'Ghost'
'Collision Bounds' checked
'Box' and 'Margin' = .03 (for stability).
Unfortunately the two objects melt in the collision and "Cube" doesn't go very high…
Have a good day.
02 December 2019 20:57 [ON MODERATION]
I DO NOT UNDERSTAND why this post is on moderation.

Hello,
First please excuse me for my english
1/ B4W is far better for animation than BGE but not for simulation. B4W Physics Engine is not very realistic particularly for collisions.
2/ I suggest for object "shot" in tab Physics 'Actor' checked but not 'Ghost'.
3/ For object "Cube" in tab Physics
Type 'Rigid Body'
'Sleeping' checked but not 'Ghost'
'Collision Bounds' checked
'Box' and 'Margin' = .03 (for stability).
Unfortunately the two objects melt in the collision and "Cube" doesn't go very high…
Have a good day.
18 September 2019 23:55 [ON MODERATION]
+1
13 August 2019 13:57
Hi Walrus, I found your message recently.
I dynamically constructed a labyrinth. Each element (wall) was copied from a reference with new name.
The new object was then translated.

<The function>
// uses modules scenes, objects and transform.
var n = -1 //global

function DuplicateMX(x, y) {
var obj = m_scs.get_object_by_name("MX"); // reference object
var new_obj_name = "MX" + n++;
var new_obj = m_obj.copy(obj, new_obj_name, true); // new object(mesh) with new name (deep copy)
m_scs.append_object(new_obj);
m_trans.set_translation(new_obj, x-9, y-5, z); // new position
}
</The function>

The copy is a new mesh and should carry the same properties (except name).
It is required to enable the "Rendering Properties > Dynamic Geometry checkbox" for the source object in blend file.
Re-reading json is not necessary.

I hope it will be usefull.
17 July 2019 20:31
Hello GaryDev
With a mobile device I use Javascript and the event model. You can find in the SDK a tuto "making a game". In part 4 there is how use keyboard (PC) and mobile. I tested (drone driving). It really works.
Have a good day.
Pat.