User posts Cluetrekk
15 January 2016 04:15
Hmmm…still no success.
I've created a simple scene to test it in another environment and it was not successful. I put the console() log in the .js file (assuming it is in the correct location (I'm new to this coding thing)). I've attached the simple blend file and the corresponding .js file in case you (someone) has a minute to look it over.
Thanks,
Cluetrekk
I've created a simple scene to test it in another environment and it was not successful. I put the console() log in the .js file (assuming it is in the correct location (I'm new to this coding thing)). I've attached the simple blend file and the corresponding .js file in case you (someone) has a minute to look it over.
Thanks,
Cluetrekk
14 January 2016 03:31
Thanks Evengy.
I changed the door physics to allow object physics with a static physics type but left the special collisions on the material as that was needed for other parts of the scene. This worked like a charm and the door opens and I can pass through easily .
The sound is still not occurring when the can drops. The name of the can is "Beer_Can", the name of the speaker is "Can_Fall_Speak" and the material ID for the floor is "ROOM" and the ID for the can is "CAN". The following code was inserted into the .js file.
Any further ideas?
I changed the door physics to allow object physics with a static physics type but left the special collisions on the material as that was needed for other parts of the scene. This worked like a charm and the door opens and I can pass through easily .
The sound is still not occurring when the can drops. The name of the can is "Beer_Can", the name of the speaker is "Can_Fall_Speak" and the material ID for the floor is "ROOM" and the ID for the can is "CAN". The following code was inserted into the .js file.
Any further ideas?
var m_ctl = require("controls");
var m_scs = require("scenes");
var m_sfx = require("sfx");
var speaker = m_scs.get_object_by_name("Can_Fall_Speak");
var beer_can = m_scs.get_object_by_name("Beer_Can");
var sensor = m_ctl.create_collision_sensor(beer_can, "CAN", false);
var callback = function(obj, id, pulse, param) {
m_sfx.play_def(param);
}
m_ctl.create_sensor_manifold(null, "ROOM", m_ctl.CT_SHOT,
[sensor], null, callback, speaker);
13 January 2016 06:32
Thanks for the help; however, I did not have much success with this.
With regards to the door opening issue, it made sure the material was set to Special: Collision but the problem persisted. I did some testing by moving the room forward and left the door behind and I was able to go through the opening. It seems that once the door moves, it seems to leave behind a 'ghost' of itself which continues to block the opening. I have attached the blend file.
Regarding the beer can dropping, I have placed the code in the .js file and ensured the objects were named appropriately. I left the sensor manifold ID as "SOME_UNIQUE_ID", assuming that it was not important what it was called. However, I still did not hear any sound when the can falls. I noticed that the var_sensor is set to 'false', is this correct? (The beer can is the one that rolls off the right side of the table when the scene opens)
Your help on this matter is much appreciated.
Thanks again,
Cluetrekk
With regards to the door opening issue, it made sure the material was set to Special: Collision but the problem persisted. I did some testing by moving the room forward and left the door behind and I was able to go through the opening. It seems that once the door moves, it seems to leave behind a 'ghost' of itself which continues to block the opening. I have attached the blend file.
Regarding the beer can dropping, I have placed the code in the .js file and ensured the objects were named appropriately. I left the sensor manifold ID as "SOME_UNIQUE_ID", assuming that it was not important what it was called. However, I still did not hear any sound when the can falls. I noticed that the var_sensor is set to 'false', is this correct? (The beer can is the one that rolls off the right side of the table when the scene opens)
Your help on this matter is much appreciated.
Thanks again,
Cluetrekk
12 January 2016 06:19
I have created a first person type of scene where the character (long UV sphere) moves forward and a door is opened by clicking on it. The door width is significantly wide (about 4 times wider than the character and about twice the height); however the character/camera won't pass through. If I make the opening what I would call extreme, it will pass through the space, but this is not realistic. Is there some setting on the character or camera or in the .js code that should be changed to reduce it in size and allow it to pass through? I used the settings that were described in the First Person tutorial
Also, is there any way to associate sound with the physics. I have a beer can falling off a desk, but it makes no sound. Is there a way to have it make a sound when it impacts the floor?
Thanks,
Cluetrekk
Also, is there any way to associate sound with the physics. I have a beer can falling off a desk, but it makes no sound. Is there a way to have it make a sound when it impacts the floor?
Thanks,
Cluetrekk
04 January 2016 21:21
Assuming all of the JS coding is done in a separate application, I am puzzled how it is possible to go back into Blender to make additional 3D modifications and still keep any code modifications made through the separate application. Once the changes are made in Blender and a new JSON file is exported, all previously added code through a third application is lost (i.e. replaces previous one).
Does all of the modeling etc have to be completed in Blender prior to any coding. Perhaps there a way to edit the code within Blender?
I have tried to follow the documentation; however, it is still not clear.
Thanks
Does all of the modeling etc have to be completed in Blender prior to any coding. Perhaps there a way to edit the code within Blender?
I have tried to follow the documentation; however, it is still not clear.
Thanks
27 December 2015 22:31
Is there a better way to install the newest update to Blend4web? I just downloaded the B4W SDK and unzipped it and replaced the files and folders in the 'blend4web_sdk_free' folder. However, I am using a Mac and unlike Windows, selecting 'replace existing files and folders' does not leave the personal newly created files under the Blender folder (.blend files, audio files, texture files, etc) and the 'app' folder untouched, but rather permanently deletes and replaces all folders/files with the B4W zipped content . To recover the personal project files was difficult and costly. Other than removing these files before unzipping, is there a better way to 'install' the upgrade?
Thanks for all your help,
Cluetrekk
Thanks for all your help,
Cluetrekk
22 December 2015 17:02
22 December 2015 05:28
I've been trying to set up an interactive scene and everything has been working fine and suddenly none of my newly created objects are appearing in the HTML render and Fast preview from the development server. All objects appear in the 3D viewport of Blender under all viewport shading settings as well as in the final render view (F12). The outliner view shows all objects are visible (eye and camera showing). In the object setting the Duplication is set to none for all objects. The actual files (blend file and all textural images) are all in one location, but it may be important to note that they were not always together but were moved together some time earlier.
If anyone has any suggestions as to how to have the new objects show up, please let me know.
Much appreciated,
Cluetrekk
Attached is the Blend file without the image textures.
If anyone has any suggestions as to how to have the new objects show up, please let me know.
Much appreciated,
Cluetrekk
Attached is the Blend file without the image textures.