HowToC:FollowAnObject

From S2PLOT

Revision as of 23:35, 19 August 2008; view current revision
←Older revision | Newer revision→
Jump to: navigation, search

How to follow an object with the camera

Using handles, you can easily detect when an object has been right-clicked. With two pretty simple bits of code, you can then make the camera keep focussed on that object.

1. use a handle callback to register the most recently selected handle:

void pickcb(int *id) {
}
Personal tools