I need your help for “TaskMgr” used in samples for in C++.

I want to move an “Actor” after the simulation’s start but the actor’s move is random. So I use TaskMgr to call a function to move the actor.
But I don’t know wath header have been including ?

Thank’s, sorry for my bad english, I am french !!

PS : What have the manual for C++ or only for Python ?

Hmm, I’m a little confused. Although we’re writing a C+±based task manager now, the current task manager class is only implemented in Python, so there is no TaskMgr (that I know of) in any of the C++ samples. For that matter, there’s not an Actor either.

But the only C++ samples I know of are the ones that appear in the manual, under topics named CXX, for instance A Panda “Hello World” using CXX. If you’ve already found these, then you already know the answer to your second question:

Some parts of the manual cover use of C++.


Yes my question isn’t good.

I see the samples in python (Asteroid ) and I discoverd TaskMgr. Now I want to used TaskMgr in C++ to move an “actors” but after the simulation’s start. So I can’t used Interval like in the sample

Hmm, if you really want to use a task manager in C++, you will need to compile a version of the CVS trunk of panda3d, where the new task manager is currently. As far as I know the current 1.5.3 release doesn’t have the new c++ task manager yet.

Though, you can normally put calls to functions you would normally add as tasks in your main loop; this approach works fine for most simple purposes.
You might also want to take a look at the Roaming Ralph in C++ sample:
It’s not written very well, I must agree, but it can give you a basic idea.

Thank’s Pro-rsoft for you Roaming Ralph in C++ sample,

yet when I want move my actor, I used set_pos like in sample, but if I used in an other function that the creating-actor’s function the programme ( not the compilator ) awser :

Assertion failed: !is_empty() at line 872 of panda/src/pgraph/nodePath.cxx

I don’t understand because, for the camera, there is no problem whith set_pos.

It means the NodePath you are trying to move is empty, so it’s throwing this assertion.
Did you get any other messages at the command line, such as “Could not find model blah blah” ?
In any case, the problem must actually lie before the line that’s erroring out.