Alternatively, could I set the actor as 'manipulatable' - some how prevent
the stage from receiving input and send synthetic drag signals to the
actors? Seems to me that it would be easier and more logical to not set
actors as manipulatable and simply move them around using clutter functions
(I did try this by the way but it seems if I don't set an actor's mode, it's
not visible at all).

Looking forward to hearing back.

Thanks and great work.

On Sat, Aug 23, 2008 at 12:03 PM, Saul Lethbridge <[EMAIL PROTECTED]
> wrote:

> I've made some changes to the example provided with clutter-box2d to
> illustrate my issue. You'll notice that you can see the left most hand
> 'attempt' to move but doesn't (or can't).
>
> **************
> scene-table.c (I also changed util.c [add_hand function] to name the
> actors)
> **************
>
> #include <clutter/clutter.h>
> #include "clutter-box2d.h"
> #include "blockbox.h"
>
>
> ClutterActor *move;
>
> gboolean moveactor(void)
> {
>     printf("TIMEOUT\n");
>     gint x,y;
>     clutter_actor_get_position (move, &x, &y);
>     printf ("X: %i Y:%i\n", x, y);
>     clutter_actor_set_position (move, x + 1, y - 1);
>
>     return TRUE;
> }
>
>
> void
> scene_table (Scene *scene)
> {
>   ClutterActor *stage;
>   ClutterActor *group;
>   ClutterVertex gravity = {0,0};
>   gint          i = 10;
>
>
>   stage = clutter_stage_get_default ();
>
>   group = clutter_box2d_new ();
>   add_cage (group, TRUE);
>
>   scene->group = group;
>
>   clutter_group_add (CLUTTER_GROUP (stage), group);
>   clutter_box2d_set_simulating (CLUTTER_BOX2D (group), simulating);
>
>   g_object_set (group, "gravity", &gravity, NULL);
>
>   while (i--)
>     {
>       gint x, y;
>       x = clutter_actor_get_width (clutter_stage_get_default ()) / 2;
>       y = clutter_actor_get_height (clutter_stage_get_default ()) * 0.8;
>
>       clutter_container_child_set (CLUTTER_CONTAINER (scene->group),
>                                    add_hand (scene->group, x, y),
>                                    "manipulatable", TRUE,
>                                    "mode", CLUTTER_BOX2D_DYNAMIC,
>                                    NULL);
>
>     }
>   move = clutter_container_find_child_by_name (    CLUTTER_GROUP (stage),
> "hand");
>   g_timeout_add (1000, moveactor, NULL);
>
>
>
>
> }
>
> On Fri, Aug 22, 2008 at 8:17 PM, Øyvind Kolås <[EMAIL PROTECTED]> wrote:
>
>> On Fri, Aug 22, 2008 at 1:40 AM, Saul Lethbridge
>> <[EMAIL PROTECTED]> wrote:
>> > Hi,
>> >
>> > Should I be able to control my actors with standard clutter commands
>> when
>> > simulating them? I can' manipulate my actors with the mouse (which I
>> want to
>> > prevent), but I can't move them using standard clutter functions.
>> >
>> > Can anybody shed any light?
>> >
>> > a. How do I move my actors around (and still simulate)
>>
>> You should be able to set the position and rotation of the actors
>> using clutter_actor_set_position, clutter_actor_set_rotation like
>> normal. ClutterBox2D doesn't mirror the complete set of
>> transformations possible using the ClutterActor properties, for now
>> only position and rotation is honored.
>>
>> > b. How do I prevent users from manually grabbing actors and moving them
>> > around.
>>
>> This only happens when the ClutterBox2d-container child property
>> "manipulatable" is set.
>>
>> /Øyvind K.
>> --
>> «The future is already here. It's just not very evenly distributed»
>>  -- William Gibson
>> http://pippin.gimp.org/ http://ffii.org/
>>
>
>

Reply via email to