Babylon3D: Standard Edition

Post your completed addons to share with the community

Post » Tue Dec 13, 2016 11:25 am

fuego96 wrote:
X3M wrote:Image
Change it to 1000,0.5,0.5


Changed the "direction" of the laser, but, it appears the laser mesh'es Y position was simply too low. Changing the laser mesh position to (0,50,0) worked for me (just how did it ever work for you???)

And on to a different subject, by the way, can you implement ShaderMaterial ? I can't wait to use some from Shadertoy :-)


@fuego96 I'm trying the laser starts from the camera to infinite and get moved and rotate with the camera pos, and rotation, to get a real aim, but i can't get it, can you?
B
23
S
10
G
3
Posts: 545
Reputation: 4,442

Post » Tue Dec 13, 2016 12:23 pm

@matriax Send me your capx. Parenting the laser to the camera should do it. But I still don't know why my demo didn't work for you, maybe Its because I'm using the 0.6 which is still in developpement.
@fuego96 Unfortunately thats not on my to do list for this particular plugin. It will be done for a different product.
Banned User
B
17
S
7
G
23
Posts: 388
Reputation: 13,994

Post » Tue Dec 13, 2016 12:40 pm

X3M wrote:...Unfortunately thats not on my to do list for this particular plugin. It will be done for a different product.

Roger.

matriax wrote:@fuego96 I'm trying the laser starts from the camera to infinite and get moved and rotate with the camera pos, and rotation, to get a real aim, but i can't get it, can you?

Will try when i get home.
I don't need a better iPhone, I need to be better.
B
25
S
10
G
20
Posts: 68
Reputation: 11,888

Post » Tue Dec 13, 2016 2:45 pm

X3M wrote:@matriax Send me your capx. Parenting the laser to the camera should do it. But I still don't know why my demo didn't work for you, maybe Its because I'm using the 0.6 which is still in developpement.
@fuego96 Unfortunately thats not on my to do list for this particular plugin. It will be done for a different product.


@X3M Oh well! if you are using a 0.6 version then i guess is fixed. This is my .capx:
https://dl.dropboxusercontent.com/u/659 ... ycast.capx

I guess this is not how have to be done but is the unique way comes to my mind.

BTW, this have to be more easy. Some Raycast/AIM behaviour on we can add to the camera and options to pin to Position/Rotation and set the position of the screen where the aim center is on our game and forgot to do all this events. Or add the behaviour to the Mesh.Laser and a field to set the parent object you said as: "Camera".
B
23
S
10
G
3
Posts: 545
Reputation: 4,442

Post » Tue Dec 13, 2016 3:03 pm

matriax wrote:@fuego96 I'm trying the laser starts from the camera to infinite and get moved and rotate with the camera pos, and rotation, to get a real aim, but i can't get it, can you?


@matriax Aiming and firing a short laser pulse toward the box and having both the box and laser disappear works fine. The only thing missing is the "Look At" (mesh) action that "NewCamera" or "Camera" objects don't seem to have (but regular Mesh objects seem to have) :-)

So, at the moment, you'll have to formulate your own trig functions to point the camera toward the Box OR parent (I'm not sure if you can parent a mesh to the NewCamera) a dummy box (with visibility 0) that is sitting at the exact XYZ position as the NewCamera (and use its "Look At" action) OR pose the following question to X3M:

@X3M the Mesh object has the Babylon Matrix's "Look At" (mesh) action. Would it be possible to add it to Camera or NewCamera (for the aforementioned purpose)?

EDIT: Sorry, what was i thinking? It's the Laser that needs to point to the Box, not the camera. So, just position the Laser to NewCamera's XYZ position, then user the action Laser --> Look At (Box.MeshX, Y and Z) to point the NewCamera to the Box. Firing it toward that angular trajectory is another matter.
Last edited by fuego96 on Tue Dec 13, 2016 3:57 pm, edited 3 times in total.
I don't need a better iPhone, I need to be better.
B
25
S
10
G
20
Posts: 68
Reputation: 11,888

Post » Tue Dec 13, 2016 3:17 pm

Code: Select all
Camera->Set position target (0,0,0)

Will make the camera look at the pos 0,0,0
Banned User
B
17
S
7
G
23
Posts: 388
Reputation: 13,994

Post » Tue Dec 13, 2016 3:25 pm

@X3M I found a rather catastrophic bug (brings down the C2 app).

How to reproduce:
1. Open the "Laser or Raycast.capx" file (the one you did initially)
2. Add action --> NewCamera --> (Babylon Camera) "Zoom on mesh", select "Box" and hit "Done" button.

I got:
Image

Hit "Abort" and then I get "Construct 2 game creator has stopped working". And quits to desktop.
Last edited by fuego96 on Tue Feb 14, 2017 6:22 pm, edited 1 time in total.
I don't need a better iPhone, I need to be better.
B
25
S
10
G
20
Posts: 68
Reputation: 11,888

Post » Tue Dec 13, 2016 3:31 pm

X3M wrote:
Code: Select all
Camera->Set position target (0,0,0)

Will make the camera look at the pos 0,0,0


Aw man... LOL
<sarcasm>Thanks for that.</sarcasm>
I don't need a better iPhone, I need to be better.
B
25
S
10
G
20
Posts: 68
Reputation: 11,888

Post » Tue Dec 13, 2016 3:36 pm

fuego96 wrote:@X3M I found a rather catastrophic bug (brings down the C2 app).

How to reproduce:
1. Open the "Laser or Raycast.capx" file (the one you did initially)
2. Add action --> NewCamera --> (Babylon Camera) "Zoom on mesh", select "Box" and hit "Done" button.

I got:
Image

Hit "Abort" and then I get "Construct 2 game creator has stopped working". And quits to desktop.


Yep thats the way C2 tells us not to mess with the Object param <b></b>, ITS MINE !!!11!!
In a serious note, I will stop using those bold brackets or whatever they're called. They only cause trouble.
Fix:
Step 1-search line : Zoom on mesh <b>{0}</b> in the common.js file on the camera plugin.
Step 2- turn it into : Zoom on mesh {0}


Well turns out that the zoom on mesh function is not available anymore in the library, I'll PING the devs about it.
For now avoid using zoom functions.
Banned User
B
17
S
7
G
23
Posts: 388
Reputation: 13,994

Post » Tue Dec 13, 2016 3:50 pm

X3M wrote:Well turns out that the zoom on mesh function is not available anymore in the library, I'll PING the devs about it.
For now avoid using zoom functions.

Roger.
I don't need a better iPhone, I need to be better.
B
25
S
10
G
20
Posts: 68
Reputation: 11,888

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 8 guests