Babylon3D: Standard Edition

Post your completed addons to share with the community

Post » Wed Jan 11, 2017 11:48 am

in other words you want to set the camera from the driver's point of view
B
18
S
3
G
1
Posts: 248
Reputation: 2,353

Post » Wed Jan 11, 2017 1:04 pm

Hmm thats actually tricky because of two main issues :
1- The example uses the C2 Car behavior which is 2 dimensional, the car goes on X and Y axis, so if you rotate the models 90 degrees on X axis, you will have problems with the car behavior, it will drive on the air.
2- The BabylonJS Camera has a fixed XYZ axis that cannot be changed, I can't make it to walk on the XZY axis.

I've got this request before in this thread about making FPS games from top down view C2 design, but I couldn't make it to work because of the engine limitations and the incompatibily with the C2 XY behaviors.

If you find any solution for this, please notify me.
Banned User
B
17
S
7
G
24
Posts: 388
Reputation: 14,494

Post » Wed Jan 11, 2017 10:40 pm

Ok thanks, I will continue researching the plugin XD
B
60
S
24
G
11
Posts: 100
Reputation: 10,177

Post » Thu Jan 12, 2017 12:07 am

Another question...

Can the camera collide with an obj-mesh object?
B
60
S
24
G
11
Posts: 100
Reputation: 10,177

Post » Thu Jan 12, 2017 8:58 am

MATAGUIRIS wrote:Another question...

Can the camera collide with an obj-mesh object?

Yes, you should activate collisons for both Camera and the object in events ( You can also activate camera collison via tab properties [Check Collisions => True )
Banned User
B
17
S
7
G
24
Posts: 388
Reputation: 14,494

Post » Thu Jan 12, 2017 11:05 am

Oh! so finally there is no way to build a FPS levels using a top view natively? I was waiting for that :( , so i guess at the end we will have to do it using the events trick.

Installed and testing the templates and realized the FPS one not have mouselock ¿? no worked at the end? I remember you made a try but still not worked properly but in this one not have nothing. You forgot it or simply was impossible to work correctly in C2? The TiAM Mouse Lock plugin works perfectly but will be great had it natively on babylon.
B
27
S
10
G
3
Posts: 607
Reputation: 4,666

Post » Thu Jan 12, 2017 11:20 am

@matriax The mouse lock works, but the camera does not exceed 360 degrees, the devs made it this way to simulate a human head , which cannot rotate 360 degrees like an owl for example. So you can look right and left but not back, if you wanna look behind you will need to step diagonally just like in real life.

Also the mouse lock works better if you go to fullscreen mode.

About the FPS problem, try setting the scene native gravity on the Z axis like (0,0,-9.8) this way the camera will drop forward, but then you will have to find a way to make the camera stand on the Z axis and not act as if its laying on the ground.
Banned User
B
17
S
7
G
24
Posts: 388
Reputation: 14,494

Post » Thu Jan 12, 2017 7:12 pm

@X3M Well i think i have it, now i can create a FPS with top down levels on C2, was more different that in the 0.2 but finally got it, also added compatibility to scaling and by default set the center of the objects in the bottom so when they are scaled in Y they always appear over the floor not floating or cutting it.

One thing i can't find in events is how to change the offset of the mesh, this:
Image

With events i can change all that appears in the image less the Offset, that will be perfect to create the grid for objects and set the floor/plants or add a pile of objects one over other. Maybe you forgot to add it or appears with other name?
B
27
S
10
G
3
Posts: 607
Reputation: 4,666

Post » Thu Jan 12, 2017 7:17 pm

@matriax I forgot about those, I'll be adding them in the next update, now I'm working on some tutorials : https://x3mworks.blogspot.com/p/babylon ... rials.html
Banned User
B
17
S
7
G
24
Posts: 388
Reputation: 14,494

Post » Thu Jan 12, 2017 7:22 pm

@x3m Ah ok! thanks!

Wow this tutorials are looking great! are the .capx available to download?
B
27
S
10
G
3
Posts: 607
Reputation: 4,666

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 5 guests