WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-19-2020, 09:54 AM
josephredfern josephredfern is offline
Member
 
Join Date: Sep 2019
Posts: 8
Rotating objects about a point

Hello,

I have have a list of nodes (returned from viz.addChild). I wish to rotate all of these models about the Y axis of a single point (specifically, 180 degrees). What is the best way to do this? I've tried using setCenter (setting the new center to the position about which I wish to rotate each model) in combination setEuler without success...


Thank you,
Joe

Last edited by josephredfern; 02-19-2020 at 09:58 AM.
Reply With Quote
  #2  
Old 02-19-2020, 11:02 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can parent all the nodes to a group node and set its position to the point you want the nodes to rotate around.
Reply With Quote
  #3  
Old 02-20-2020, 02:15 AM
josephredfern josephredfern is offline
Member
 
Join Date: Sep 2019
Posts: 8
Hi Jeff,

Thank you for your reply.

I've ended up doing the following:

* Create a group
* Set center (not position) of group to rotation point
* Add objects to scene (viz.addChild), specifying position and setting parent to the newly created group

Setting the position of the group rather than the centre made the models be added relative to the new position -- unless I was missing something.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rotating an object around a point BWhiteDerby Vizard 1 08-25-2015 05:37 PM
joints/spin objects rmcconnell11 Vizard 0 02-17-2014 08:13 AM
Semi-circle array containing target and distractor objects ptjt255 Vizard 3 08-04-2009 04:09 AM
Lightwave objects rotation problem hosier Vizard 6 02-13-2009 01:04 PM
Could not find plugin to load objects... halley Vizard 1 05-30-2006 12:01 PM


All times are GMT -7. The time now is 04:23 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC