A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by LukasBanana » Sun May 27, 2012 2:03 pm
Hi, I'm about to continue the work on the PlyerController again. via "NewtonCreateCapsule" I create the capsule collision and set a height for the player.
But when my player wants to crouch (or duck) I need to change the height dynamically. How can I do this?
-

LukasBanana
-
- Posts: 35
- Joined: Mon Jul 27, 2009 11:55 am
- Location: Germany
-
by Julio Jerez » Sun May 27, 2012 2:31 pm
In core newton 2.00 teh only way is by using a transform modifier and it only apply to conve shapes
Stating with with core 300, the transform is part of the collision shape instance. and teh collsion insrtance hold teh geometry of teh shape
threfore all shape inheret a transfom, you have these functions to scale, translate or rotate any shape at will
- Code: Select all
[code]void NewtonCollisionSetScale (const NewtonCollision* const collision, dFloat scaleX, dFloat scaleY, dFloat scaleZ);
void NewtonCollisionGetScale (const NewtonCollision* const collision, dFloat* const scaleX, dFloat* const scaleY, dFloat* const scaleZ);
void NewtonCollisionSetUserData (const NewtonCollision* const collision, void* const userData);
void* NewtonCollisionGetUserData (const NewtonCollision* const collision);
void NewtonCollisionSetUserID (const NewtonCollision* const collision, unsigned id);
unsigned NewtonCollisionGetUserID (const NewtonCollision* const collision);
void NewtonCollisionSetMatrix (const NewtonCollision* const collision, const dFloat* const matrix);
void NewtonCollisionGetMatrix (const NewtonCollision* const collision, dFloat* const matrix);[/code]
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by LukasBanana » Sun May 27, 2012 2:47 pm
The functions you posted are only available in Newton 3.00? Ok I think I will finally update to 3.00 but this is still alpha and I need to compile by my self.
When will you upload a final (stable) release of 3.00?
-

LukasBanana
-
- Posts: 35
- Joined: Mon Jul 27, 2009 11:55 am
- Location: Germany
-
by Julio Jerez » Sun May 27, 2012 3:30 pm
you can sinc to SVN, the demo is eassy to build.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 0 guests