Crystal Space
Welcome, Guest. Please login or register.
December 22, 2014, 08:54:36 pm

Login with username, password and session length
Search:     Advanced search
9032 Posts in 2046 Topics by 9305 Members
Latest Member: Fabiorzad
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  Strange occurence with move callbacks
« previous next »
Pages: [1] Print
Author Topic: Strange occurence with move callbacks  (Read 1267 times)
koocake
Jr. Member
**
Posts: 54


View Profile
« on: February 15, 2006, 06:31:17 pm »

I have set up a move callback class in a similar way to the collision callback class i defined before.
My class looks like this:


#include "car_move_callback.h"

SCF_IMPLEMENT_IBASE(Car_Move_Callback);
SCF_IMPLEMENTS_INTERFACE (iDynamicsMoveCallback);
SCF_IMPLEMENT_IBASE_END;

void Car_Move_Callback::Execute (iMeshWrapper* mesh, csOrthoTransform& t)
{
  csPrintf("Car moved!");
}

void Car_Move_Callback::Execute (iLight* light, csOrthoTransform& t)
{
}

void Car_Move_Callback::Execute (iCamera* camera, csOrthoTransform& t)
{
}

void Car_Move_Callback::Execute (csOrthoTransform& t)
{
}


However, when I set the move callback to the car's iRigidBody, upon starting the application, the car gets placed at a strange location stuck in the wall of the room, rather than its usual place. When I comment out the code to set the move callback, the car is positioned as normal. This is the code with the move callback set commented out.

 
  iDynamicsCollisionCallback* ccb = &collCallback;
  //iDynamicsMoveCallback* mcb = &moveCallback;
  car->SetCollisionCallback(ccb);
  //car->SetMoveCallback(mcb);
  car->Update();


Any idea as to what is happeneing here?

regards,
Kate
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 5.249 seconds with 16 queries.