Crashing stopped, but I can't see any wheels on my car:
#include "engine.h"
int main(){
Initialize();
RegisterAbstractPath("c:/program files/leadwerks engine sdk");
Graphics(800,600);
TFramework fw=CreateFramework();
TBody fuselage=CreateBodyBox();
EntityType(fuselage,1);
SetBodyMass(fuselage,1);
TVehicle veh=CreateVehicle(fuselage);
AddVehicleTire(veh,Vec3(-1,-1,0));
DebugPhysics();
MoveEntity(GetLayerCamera(GetFrameworkLayer(0)),Vec3(0,0,-10));
TBody ground=CreateBodyBox(1000,1,1000);
MoveEntity(ground,Vec3(0,-5,0));
EntityType(ground,1);
Collisions();
while(!KeyHit()){
UpdateFramework();
RenderFramework();
Flip();
}
return Terminate();
}
In MoveEntity, the Vec3 is declared as Float Ptr, why not in AddVehicleTire also?
Function MoveEntity_(entity:TEntity,p:Float Ptr,glob:Int=0) "win32"
GCEnter()
?debug
If Not EntityExists(entity) RuntimeError "Invalid object."
?
entity.move(p,glob)
EndFunction