Collision between models

Nov 21, 2012 at 5:00 PM
Edited Nov 21, 2012 at 5:00 PM


I have been learning to use Nine engine these couple of days and i am at the point where i want to test thing with the phyics. I started with wrapping 2 model with each there own modelcollider.

Problem is that when i change the position of 1 of the models it just moves through the other model, even if i give a model a rigidbody the same thing happens. Is there another way of handeling this or am i overlooking something? 


<Group  Transform.Position="15, 5, 45">  
	<Model  Source="{ContentReference Models/Props/wall1}"/>             
	<ModelCollider Source="{ContentReference Models/Props/wall1}"/>    

<Group Transform.Position="7, 0, 27">        
	<Model  Source="{ContentReference Models/Props/wall1}" />       
        <ModelCollider Source="{ContentReference Models/Props/wall1}" />   
        <my:Pcon Speed="5"/>    
Nov 21, 2012 at 11:10 PM

I am sorry for my late answer but how does Pcon handle movement?

Nov 22, 2012 at 11:14 AM

Pcon moves my  group  with :

var transform = Parent.Transform;

if (keyboardState.IsKeyDown(Keys.Left))
                transform.Translation += Speed * (float)elapsedTime.TotalSeconds * Vector3.Left;

I saw that with the sample 12.physics if i move a group i can move the model but not the modelcollider. Am i overlooking something?

Nov 22, 2012 at 3:18 PM

Look at the ExamplePhysicsController in the Tutorial. Try getting the ModelCollider instead and using "RigidBody.ApplyImpulse( ... )".