Amazing, I did not see that one coming?
you are killing me harry?
Moderators: Sascha Willems, walaber
m_body.SetOwner(this);
public dNewtonBody GetBody0(global::System.IntPtr contact) {
global::System.IntPtr cPtr = NewtonWrapperPINVOKE.dNewtonWorld_GetBody0(swigCPtr, contact);
dNewtonBody ret = (cPtr == global::System.IntPtr.Zero) ? null : new dNewtonBody(cPtr, false);
return ret;
}
var handle = GCHandle.Alloc(myNewtonBody);
IntPtr myPtr = GCHandle.ToIntPtr(handle);
var handle = GCHandle.FromIntPtr(intptr);
var myBody = (NewtonBody)handle.Target;
DestroyRigidBody()
{
var handle = GCHandle.FromIntPtr(intptr);
handle.Free();
}
Ah, forgot. The GameObject can't call InitRigidBody because the world may not be created yet.
We have to call InitRigidBody manually for now.
Julio Jerez wrote:Ah, forgot. The GameObject can't call InitRigidBody because the world may not be created yet.
We have to call InitRigidBody manually for now.
I do not really see calling initRigid body as a bad thing.
I agree that before having to figure out a scene index was bad, but now that is not a requirement
we is that so onerous?
Users browsing this forum: No registered users and 14 guests