|
Astolfo Forcella
Registered User
Join date: 23 May 2007
Posts: 7
|
01-11-2008 06:34
Hello, I would apply an impulse to an object along the direction in which the avatar it is oriented, whit a custom force.
|
|
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
|
01-11-2008 14:12
Does it matter if he uses the inside or outside of his foot?  . Anyway, if there is a script in the ball (one way to do this), it will have to detect a collision with the avatar. get the rotation and position of the avatar. apply an impulse using the avatars rotation. Is that what you have in mind? Search for llDetected and llApplyImpulse in the Wiki. good luck.
_____________________
So many monkeys, so little Shakespeare.
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-11-2008 15:27
Once you use a sensor/collision with llDetectedRot(), or use llGetObjectDetails(), or whatever, you can get the direction the avatar is facing using llRot2Fwd(). If we call the avatar's rotation 'avRot', then the avatar's forward direction (x-axis) is 'llRot2Fwd(avRot)'. Note that if the avatar is in mouselook, this represents the direction the camera is facing, which may have an up/down component. If you want a horizontal direction instead, you could do something like: vector avX = llRot2Fwd(avRot); vector avXHoriz = llVecNorm(<avX.x, avX.y, 0.0>);
|