Code: Select all
List<CompoundShapeEntry> bodies = new List<CompoundShapeEntry>();
bodies.Add(new CompoundShapeEntry(new BoxShape(2.5f,0.75f,4.5f), new Vector3(0,0.5f,0),60));
bodies.Add(new CompoundShapeEntry(new BoxShape(2f, 0.75f, 2f), new Vector3(0, 1f, 0), 1));
bodies.Add(new CompoundShapeEntry(new SphereShape(0.75f), new Vector3(0, 1f, 2), 1));
CompoundBody body = new CompoundBody(bodies,61);
body.CollisionInformation.LocalPosition = new Vector3(0,0.5f,0);
body.CollisionInformation.Tag = this;
_vehicle = new Vehicle(body);
Code: Select all
Vector3(0, 1f, 2)
When i use
Target = Game.Players[0].Car.Vehicle.Body;
Code: Select all
Target = Game.Players[0].Car.Vehicle.Body;
...
Camera.Position = Target.WorldTransform.Translation - Target.WorldTransform.Forward*10+ Vector3.Up*2;
Camera.LookAt(Target.WorldTransform.Translation);
And the camera is looking towards the front.
The car goes in the opposite direction from the sphere