Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9203289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:26:26+00:00 2026-06-17T23:26:26+00:00

I loaded some objects via OBJLoader , loaded object contain one parent and multiple

  • 0

I loaded some objects via OBJLoader , loaded object contain one parent and multiple childs; then I apply Raycaster and find clicked child.

Then I want to update position of child object, but initial position comes zero for all childs.

var intersect = intersects[0].object;
intersect.position.y = intersect.position.y + 5; // 0 + 5 

But in my scene all looks fine. Also, If i remove clicked object, actually it is removed from scene. I think I missed some point their positions cant be (0,0,0). How can I reach their relative position ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:26:27+00:00Added an answer on June 17, 2026 at 11:26 pm

    Try this, then read position(). I had the same issue, got an answer here. (geom is your Meshes geometry.)

    objMesh.centroid = new THREE.Vector3();
    for (var i = 0, l = geom.vertices.length; i < l; i++) {
      objMesh.centroid.add(geom.vertices[i].clone());
    }
    objMesh.centroid.divideScalar(geom.vertices.length);
    var offset = objMesh.centroid.clone();
    
    objMesh.geometry.applyMatrix(new THREE.Matrix4().makeTranslation(-offset.x, -offset.y, -offset.z));
    
    objMesh.position.copy(objMesh.centroid);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I loaded some content in a DIV with AJAX. Then, i loaded different content
I have a Linq-To-SQL object obj of type MyClass that I have loaded via
I'm trying to reference an object loaded via a classloader in a class that
The tree-view is loaded with some data from a DB. I want to filter
I have some data loaded as a np.ndarray and need to convert it to
Using jQuery 1.7 I'm having trouble binding a Click event to some dynamically loaded
I have a page, when loaded it does some stuff with JQ. In the
I'm using GCD's dispatch_after method when my application is being loaded to perform some
I have some code the requires the application to be completely loaded and compiled
In a DIV I place some text/html code which get loaded from a database.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.