Jump to content

Mesh Position in World cooridnates


nodejs
 Share

Recommended Posts

Hello, i am again...

i have a realy noob question but cant find an answer.

Since i playing with this Playground i try to figure out how i can get the position of the car (mesh = carBody ?)

Im not successful.

Line 42 - 44

scene.registerBeforeRender(function(){
        console.log("Poisition", carBody.position);
});

The only thing that changes is when i turning the steering wheel.
Nothing about the position on the ground...

I tought the carBody "merge" all meshes into one and move them around with them.
So that the positions property on child meshes a relative to the parent mesh.

I dont get it...

Link to comment
Share on other sites

Youre right buddy,

but i tryed this befor and nothing has changed. Only when i turn the steering wheel. This is the axis of rotation if i undertsand it correct.

There only move when my stering is 0, but i need the position of the centre from the car. at any time

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...