Created
July 25, 2011 15:43
-
-
Save supereggbert/1104419 to your computer and use it in GitHub Desktop.
Defining a car through the API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var wheel1 = new GLGE.PhysicsWheel(); | |
wheel1.setRadius(0.5).setLocX(1.4).setLocY(-0.2).setLocY(0.9); | |
var wheel1Obj=new GLGE.Collada(); | |
wheel1Obj.setDocument("wheel.dae"); | |
wheel1.addCollada(wheel1Obj); | |
var wheel2 = new GLGE.PhysicsWheel(); | |
wheel2.setRadius(0.5).setLocX(1.4).setLocY(-0.2).setLocY(-0.9); | |
var wheel2Obj=new GLGE.Collada(); | |
wheel2Obj.setDocument("wheel.dae"); | |
wheel2.addCollada(wheel2Obj); | |
var wheel3 = new GLGE.PhysicsWheel(); | |
wheel3.setRadius(0.5).setLocX(-1.7).setLocY(-0.2).setLocY(0.9); | |
var wheel3Obj=new GLGE.Collada(); | |
wheel3Obj.setDocument("wheel.dae"); | |
wheel3.addCollada(wheel3Obj); | |
var wheel4 = new GLGE.PhysicsWheel(); | |
wheel4.setRadius(0.5).setLocX(-1.7).setLocY(-0.2).setLocY(-0.9); | |
var wheel4Obj=new GLGE.Collada(); | |
wheel4Obj.setDocument("wheel.dae"); | |
wheel4.addCollada(wheel4Obj); | |
var carObject=new GLGE.Collada(); | |
carObject.setDocumet("car.dae"); | |
var car = new GLGE.PhysicsCar(); | |
car.addCollada(carObject); | |
car.addPhysicsWheel(wheel1).addPhysicsWheel(wheel2).addPhysicsWheel(wheel3).addPhysicsWheel(wheel4); | |
scene.addChild(car); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment