dbodysetposition() memory problem

13 views
Skip to first unread message

Barna Zoltán

unread,
Nov 7, 2009, 11:44:46 AM11/7/09
to ode-...@googlegroups.com
Hello!

I've got a dBodyID body, and I would like to set its position, like this:

dBodySetPosition(body, x_Coord, y_Coord, 0.0);

but visual studio give me this error:
Unhandled exception at 0x0040f6f6 in traffix3D.exe: 0xC0000005: Access violation writing location 0xbaadf0a5.

0xbaadf0a5 is the memory address of body, but I don't understand, why I get this error.

Please help me!

Bye,

Zoli

wb4

unread,
Nov 7, 2009, 12:40:10 PM11/7/09
to ode-users
Did you initialize body with dBodyCreate() ?

Barna Zoltán

unread,
Nov 7, 2009, 1:25:02 PM11/7/09
to ode-...@googlegroups.com
Thank you for your answer. That was the problem. I forgot to initialize it.

2009/11/7 wb4 <wbra...@gmail.com>
Reply all
Reply to author
Forward
0 new messages