Jump to content

vector


Adem
 Share

Recommended Posts

:)hy guys, i have problem with the mesh going in the specified direction, the bullet in this code goes along x axis :-

BABYLON.SceneLoader.Load("Building/", "Building.babylon", engine, function (scene) {
            // Wait for textures and shaders to be ready
            scene.executeWhenReady(function () {

     
//bullet
 var bullet = BABYLON.Mesh.CreateSphere('bullet', 3, 0.5, scene);
    
var sphere2 = BABYLON.Mesh.CreateSphere("sphere1", 16, 0.5, scene);

bullet.position = new BABYLON.Vector3(0, 0, 0);;
bullet.parent = sphere;
sphere2.position.y = 2;
sphere.parent = scene.activeCamera;
sphere.position = new BABYLON.Vector3(0, 0, 1);

scene.registerBeforeRender(function () {

bullet.position.z += 0.05;
 
});

Link to comment
Share on other sites

@Adem: I have no idea what you are trying to do with this code but I don't claim to be a great coder . But let us look at what you have written :

6 minutes ago, Adem said:

the bullet in this code goes along x axis

but your code has :

bullet.position.z += 0.05;

Then let us look at your other code:

8 minutes ago, Adem said:

bullet.parent = sphere;
sphere2.position.y = 2;
sphere.parent = scene.activeCamera;
sphere.position = new BABYLON.Vector3(0, 0, 1);

Where is this sphere defined in your code - not sphere2 - sphere?

cheers, gryff :)

Link to comment
Share on other sites

@gryff Oh  that was a typing error, but it's still not working:wacko:

BABYLON.SceneLoader.Load("Building/", "Building.babylon", engine, function (scene) {
            // Wait for textures and shaders to be ready
            scene.executeWhenReady(function () {

     
//bullet
 var bullet = BABYLON.Mesh.CreateSphere('bullet', 3, 0.5, scene);
    
var sphere2 = BABYLON.Mesh.CreateSphere("sphere1", 16, 0.5, scene);

var sphere = BABYLON.Mesh.CreateSphere("sphere", 16, 0.5, scene);

bullet.position = new BABYLON.Vector3(0, 0, 0);;
bullet.parent = sphere;
sphere2.position.y = 2;
sphere.parent = scene.activeCamera;
sphere.position = new BABYLON.Vector3(0, 0, 1);

scene.registerBeforeRender(function () {

bullet.position.z += 0.05;
 
});

Link to comment
Share on other sites

Adem - please be careful about keeping on pinging someone. We all volunteer to help when and if we can. Our time is given freely and with grace but we are not at anybody's beck and call. If you behave as if we can be summoned as and when you need us you will end up alienating those who would help you.

Link to comment
Share on other sites

P.s. If you are starting to agitate people more then I do on this forums then it would be best to slow your roll.  Honestly if I was a moderator I would have prolly given you a content warning two weeks ago with that splurge of repeat threads.  But that's non of my business... anyways...

 

what i I am seeing with you bro is a lack of direction and guidance.  Soooo as much as it does not excite me send me a private message let's get you on track and on a set development path with a project list for you to complete so you can gain the general competence needed to start doing something with the engine.  Think of it as a private tutorship.  But do not take this as me adopting you.  It's going to be on you to figure out what I assign you and I will make sure you have all the information and resources at your disposal to learn correctly.  But like I said it will be on you to learn I'm not gonna hold your hand but I will point your head in the right direction.  

 

Balls in your court msg me if your down if not then just ignore this, but I would recommend not continuing to rub people's feathers (unintentionally I know) in this manor.  

Peace out, sincerely

WuWong

Link to comment
Share on other sites

Eh, little to no f***s given I make moves and get people talking and have helped more people then most so your constant  pretentious attitude tword me can jog off.

btw I like you a lot @adam and enjoy reading your script I do not understand why more often then not your general attitude with me is kinda pissy.

sorry if I ever rubbed you wrong but I'm just doing me. And if any moderator has ever felt inclined to warn me for any of my content I would adimatly support them and maybe learn something from being reprimanded.  But as it goes I talk to the moderators, and as far as I know though I annoy them at times but word on the street is people think I'm harmless so...

much love for calling me out though everyone deserves to be checked.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...