Jump to content

jargo91

Resident
  • Posts

    5
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks that is some sound advice for it did sound like i was over complicating it and by using those two vectors it should work! Thanks a lot and I'll let you know how it goes!
  2. Sorry Should say i'm trying to make a mini golf course. the float being a varible type like 1.0 to hold the strength so it's varible so i can have a small shot by one then 10 would be a powerfull shot. Channels is the channel feature of lsl so the club that gets the strength vaule passes this onto the ball through channel -9991. So all i want from the ball is to make it putt. So instead of putting then the ball being on the otherside of the course I wanted it to slowly roll down. Think that this is due to an miscalculation in my angles or strength as i'm mutiplying the vector of the angle by 1-10. The angle i got was by looking between the avatars position and the golf ball. The physics based mesh is just that it's a mesh uploaded with a physics model so the ball can hit the walls instead of hovering above it. Will try your advice and feedback must be some calculational fault in the math. Thanks and sorry about that and thanks for the help
  3. Sorry not the best explainer Well I have a ball and a seperate club once I hold down the mouse button it gets a float determied by how long I held down the mouse button 1-10 that is then passed on via channels to the ball and the ball then shoots. The maths to shoot the ball is the angle between the vectors between the avatars position and the ball calcuated by getting distance from the two points the ball and the avatar float fDistance=llVecDist(<objectPosition.x,objectPosition.y,objectPosition.z>,<avatar.x,avatar.y,objectPosition.z>); making sure to make a flat z plane. From there getting the angle from vector angle= llVecNorm(<fDistance,0,(float)objectPosition.z - (float)d.z>) *llRotBetween(<0,0,1>,llVecNorm(<objectPosition.x - d.x,objectPosition.y - avatar.y,objectPosition.z-avatar.z>)); Then I use the strength vaule got by the club to times the angle vector to get the varying strength. I have tried push force and impulse but all I get is the ball I think going too fast and looking like it just teleports to the ending position. the varibles have been checked and all of them are right so it has to be the algorithm I'm applying but I just can't put my finger on it Is there any way to alter the magitude or is that tied to the vector i am applying? So i want the ball to gradually roll down the physics based mesh I am using in the angle of the avatar to the ball then gradually lose momentum. Many Thanks Jargo91
  4. Hey all, I'm trying to make a ball shoot depening on angle of the avatar and power from holding down the mouse. I have used vectors to calculate all those and they should be working my main problem is I can't seem to gradaute the speed of the ball instead of rolling down slowly it instantly disspears then re-appears where it should be I have tried push,impulse and force none seem to work so far as the avatar could be anywhere in channel range of the ball to shoot then could this be a magitude problem? Thanks Jargo91
  5. Hey all, I'm trying to make a ball shoot depening on angle of the avatar and power from holding down the mouse. I have used vectors to calculate all those and they should be working my main problem is I can't seem to gradaute the speed of the ball instead of rolling down slowly it instantly disspears then re-appears where it should be I have tried push,impulse and force none seem to work so far as the avatar could be anywhere in channel range of the ball to shoot then could this be a magitude problem? Thanks Jargo91
×
×
  • Create New...