Forum

Camera in box.

04 August 2015 11:57
Good day, Masters!

How can I prevent to moveing camera through the mesh (walls of simple box)?

In BGE I used
Camera: Rigid Body, Actor
Wall(Cube):Static

In Blend4web I tried:
Camera: Rigid Body
Cube: Static, Ghost, Id: FURNITURE, style Eye.

and many other variants,
without success.
?
04 August 2015 15:14
Hi, and welcome to the forum!
You need to enable Object Physics flag on the camera and create some static physics objects on your scene which you don't want the camera to pass through. Please, take in mind that this method won't give descent results if the camera is being moved to fast.
04 August 2015 17:35
Thank You - Evgeny!

You write:
You need to enable Object Physics flag on the camera and create some static physics objects on your scene which you don't want the camera to pass through.

I have made so, of course! But without success, some two days experiments.

I put here attachement my .blend
05 August 2015 10:26
Hello and sorry for waiting.

Take a look at this images:
1) camera physical settings



2) house settings



I inverted the house's normals. Here your corrected file is: room (1).blend
05 August 2015 11:54
Thank You!

But the camera in Your room(1).blend after export to .html moves in all my three browsers in Linux Mint out from room,
keys W,S,D, A


My browsers:
Firefox 36.0.4.
cromium 34.0.1847.116 Built on Ubuntu 14.04, running on LinuxMint 17 aura (260972)
Chrome Versioon 41.0.2272.101 (64-bit)

05 August 2015 12:27
Ok, I'll check it
Stop. There's no physical simulation in the html-export. You need .json-export to enable physics
10 August 2015 07:33
Thank You!
I understand, I must export .json. This step i passed!

But next step - insering .json in html is sad.
I know network and local work of browser and can laod your exaple96 with cube.
But I have texture, camera animation and physiks of objects.
Application examples 24.2 and 24.3 too simple for me?

Must I I use "24.4 Developing Apps Within the SDK" for generating html?

Now I am konfused. I read:
"Option "-p" points at the name of the directory where the project is."
What is the project? . Perhapse /deploy/assetsTMy project? Or project.py?
more:
"Option "-a" (not necessary) points at the html file relative to which the app will
be constructed."
Is it Html lik 24.3 "Creating Apps Quickly"?
more:
"With the "-b" parameter (optional) the engine’s directoryable options: link (default) - the engine file is linked from"
What is engine?
10 August 2015 15:47
Hello.
You do not need to use compilation of your application to watch a scene.
Take a look at this tutorial, please. But this example does not use a physical simulation. For using the physical simulation, you should add "physics_enabled: true," in the "init" - function.

Try to use this example: app_example.zip

And don't forget to setup your browser for loading local resources to watch the example


12 August 2015 11:15
Thank You, Roman!
You made, that I needed!
http://talgujad.tartu.ee/agu3D/room/room.html

Further problem is to find the method for better adjustment of camera.
I put sound in .html bacgriund. I was not able put sound in .json.

i hope- You have some good ideas for camera adjusting?
12 August 2015 14:13
Hello.

I put sound in .html bacgriund. I was not able put sound in .json.

.json file includes paths to audio files, you can use speaker objects in Blender to add sound to your application.

Take a look at this example. Use "W", "A", "S", "D", "SPACE" for moving.
app_example.zip
 
Please register or log in to leave a reply.