1 registered members (SBGuy),
652
guests, and 3
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Newton 2 wrapper
[Re: VeT]
#259615
04/06/09 22:02
04/06/09 22:02
|
mercuryus
Unregistered
|
mercuryus
Unregistered
|
Hi VeT!
You definitly did a great job with this wrapper! I like it very much!
Is there a way to adjust the elasticity/friction/.. per entity also?
mercuryus
|
|
|
Re: Newton 2 wrapper
[Re: VeT]
#263878
05/02/09 20:26
05/02/09 20:26
|
Joined: Jul 2007
Posts: 959 nl
flits
User
|
User
Joined: Jul 2007
Posts: 959
nl
|
maby you can make a var to change the gravety now i did it like this
void onforceandtorque(NewtonBody* body)
{
float mass, ixx, iyy, izz;
NewtonBodyGetMassMatrix(body, &mass, &ixx, &iyy, &izz);
ENTITY *entity = (ENTITY*)NewtonBodyGetUserData(body);
NewtonBodySetForce(body, vectorf(0,0,gravity_z * mass));
}
overal i cant seem to find any bugs accept that i dont understand the joints parts sometimes thx flits
"empty"
|
|
|
Re: Newton 2 wrapper
[Re: flits]
#263905
05/03/09 01:26
05/03/09 01:26
|
Joined: Aug 2004
Posts: 1,345 Kyiv, Ukraine
VeT
OP
Serious User
|
OP
Serious User
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
|
yes, there are almost no documentation, it made my work harder... about your code: why you use
ENTITY *entity = (ENTITY*)NewtonBodyGetUserData(body);
? Seems that you dont need entity in this function at all
|
|
|
Re: Newton 2 wrapper
[Re: VeT]
#263967
05/03/09 14:42
05/03/09 14:42
|
Joined: Jul 2007
Posts: 959 nl
flits
User
|
User
Joined: Jul 2007
Posts: 959
nl
|
i modifed it inside the forum i dont seem to able to add foce inside a function so i use skills tat add the force inside the loop onforceandtorque en therefore i need the entity pointer
"empty"
|
|
|
|