PDA

View Full Version : Point objects at null with a smooth orientation



OcatilloPicture
10-03-2018, 04:36 PM
Hi,

Lw 11.6

I have a project where I need to have push-pins fly in and mark points on a spinning earth globe. I know I should be able to put a null in the center of the globe and have the push pins all orient so their points face the center of the globe. However, damned if I can figure out how.

Assuming that there is a "point at" feature that I am missing, my hope is that I can place all my pins at the right locations on earth, assign a spin to the null that matches the earth's spin, and then merely offset the pins in Z from the null at the start of the scene and have the pins return to rest to affect the "push pin" aspect of my animation. Sort of a sub-issue: if offsetting in Z won't make the pins move outward from the null along a vector that points at the center of the earth, what setting will move the pins away from the Null?

My previous attempt to have the pins point at a null sort of worked, but they would only respond in increments of 90 degrees, which is kind of useless.

Any suggestions will be greatly appreciated.

Thanks.

Terry

Kryslin
10-03-2018, 05:26 PM
Bring up your push pins motion properties ("m") in layout.

There should be a drop down at the top of the panel for "Target item". Choose your null as the target, and your object is oriented towards your null.
Your push pin should be modeled so that your needle points along the +z axis. You will need to use local coordinates to translate the push pin down it's z-axis towards the object.

- - - Updated - - -

Bring up your push pins motion properties ("m") in layout.

There should be a drop down at the top of the panel for "Target item". Choose your null as the target, and your object is oriented towards your null.
Your push pin should be modeled so that your needle points along the +z axis. You will need to use local coordinates to translate the push pin down it's z-axis towards the object.

MonroePoteet
10-03-2018, 09:26 PM
You might find it easier to implement the full scene using a Null hierarchy for each PushPin. LW11.6 sample scene attached:

142983 142984

142988

By implementing the null hierarchy, adding any number of PushPins to specific locations around the Globe is very easy. The Null hierarchy for each PushPin under the Globe is:


A PinBase Null, which is at the center of the Globe and parented to the Globe
A PinNull, which has been moved in Z to the edge of the Globe and parented to the PinBase
The PushPin geometric object, parented to the PinNull
A Text label created in Modeler for the PushPin, parented to the PushPin and moved out with negative Z


142994

Because the PinNull is parented to PinBase, PinNull is moved to the edge of the Globe along Z, and the PushPin is modeled down the Z axis, unless you rotate PinNull or PushPin away from HPB(0,0,0) each PushPin will point to the center of the Globe.

For each additional PushPin, in Layout you use Items=>Clone=>Clone Hierarchy on the PinBase, paste in the Heading and Pitch of the new PinBase null for the new Latitude & Longitude (Lat = Pitch, Long = -Heading), create a new Text label in Modeler, and then keyframe the PushPin object to reach its final position at the frame you desire.

This setup has the advantage of being able to use real-world Latitude & Longitude for each PushPin. By looking up the Lat&Long in Wikipedia, you can simply Copy&Paste the Latitude value into the PinBase's Pitch and the Longitude value into the Pinbase's Heading (negating the Longitude / Heading).

142990 142991 142992

142994

For animating each PushPin, determine the frame where you want it to "stick" and keyframe it there on the surface of the globe. Also keyframe it there five (or so) frames earlier, then move it out in (negative) Z so it shows being stuck into the Earth rather than sliding in from the side. Then, maybe 40 or more frames previously (as desired), use negative Z, Y and X to position it away from the Earth, using intervening keyframes to adjust the trajectory. Fine tune as needed.

Have fun!
mTp