A quick one: I want to fly an helicopter around a center point. To do this I merely try:
NodePath helicopter = window->load_model(framework.get_models(), "helicopter.egg");
helicopter.reparent_to(render);
// round trip for fly animation
PT(CLerpNodePathInterval) helicopter_round_interval = new CLerpNodePathInterval("helicopter_round_trip",
8, CLerpInterval::BT_no_blend, true, false, helicopter, center_point);
helicopter_round_interval->set_start_hpr(LPoint3f( 0, 0, 0) );
helicopter_round_interval->set_end_hpr(LPoint3f(360, 0, 0) );
PT(CMetaInterval) helicopter_fly = new CMetaInterval("helicopter_fly");
helicopter_fly->add_c_interval(helicopter_round_interval, 0, CMetaInterval::RS_previous_end);
helicopter_fly->loop();
The issue is that the rotation doesn’t appear to take “center_point” as the pivot point. I’m certainly missing something?