#1
|
|||
|
|||
Moving objects together
How can I move one object based on where another object is moved?
I'm trying to simulate an object in front of a lens and the image it creates. There's one user-controlled object (A) on one side of the lens and another object (B) on the other side. When the user moves A relative to the lens I need B to 1)move a distance X (not necessarily the same distance) in the opposite direction and 2) change size based on its distance from the lens. |
#2
|
|||
|
|||
Use vizact.onupdate() or vizact.ontimer() to call a function every frame where you get the position of objectA. Based on that position or change from the previous frame you can set the new position of objectB and then scale it based on its distance from the lens.
|
#3
|
|||
|
|||
That helped out a lot. Thanks.
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Semi-circle array containing target and distractor objects | ptjt255 | Vizard | 3 | 08-04-2009 04:09 AM |
multiple objects | durf | Vizard | 1 | 04-10-2009 02:42 PM |
Lightwave objects rotation problem | hosier | Vizard | 6 | 02-13-2009 01:04 PM |
Moving multiple objects with ppt | durf | Vizard | 1 | 02-10-2009 04:03 PM |
Could not find plugin to load objects... | halley | Vizard | 1 | 05-30-2006 12:01 PM |