View Full Version : ODE, Basic start on Linux with Lazarus
I have problem to make simplest application using ODE on Linux.
Do somebody have some working source code?
If I wrote in OnFormCreate:
I've got Acces Violation at rune time. Before it I creating World, and Body...
01-07-2007, 06:18 PM
Can you post some more code (i.e the form create).
I seem to remember this problem when I started out with ODE. But I can't remember what fixed it....
procedure TForm1.FormCreate(Sender: TObject);
BackBuff := TBitmap.Create;
with BackBuff do
Width := BackBuf_W;
Height := BackBuf_H;
Canvas.Pen.Width := 2;
Canvas.Pen.Color := clYellow;
Canvas.Brush.Color := clBlack;
World := dWorldCreate();
Space := dHashSpaceCreate(nil);
ContactGroup := dJointGroupCreate (0);
Body1 := dBodyCreate (World);
dMassSetBox (_m,1,SIDE,SIDE,SIDE); // Acces Violation
dMassAdjust (_m,1); // Acces Violation
Timer.Enabled := True;
01-07-2007, 06:35 PM
Can't see anything wrong with the code.
Do you have the correct version of ODE compiled and installed?
You are great! :D
I had 5.5-5 ODE version from Ubuntu repository. I've removed it and installed newest 0.8 and now it pretty works.
Thanks a lot.
Another basic problem.
Body2 := dBodyCreate (World);
Joint1 := dJointCreateBall (World, 0);
dJointSetBallAnchor (Joint1, 1, 2, 0);
dJointAttach (Joint1, Body2, nil);
Joint1 should make Body2 unmovable in point x=1, y=2, z=0 but this body fly to the point 0,0,0. Function dJointSetBallAnchor isn't for this?
03-07-2007, 11:58 AM
I'm not totally sure how to use Joints, so I can't help there I'm afraid (I avoided joints totally when I was using ODE)
Anyone else got any ideas?
I have an idea 8)
First I have to write dJointAttach, and after attaching dJointSetBallAnchor. It is not clear to me why but it works in this order.
Powered by vBulletin® Version 4.1.10 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.