|
Dazzo Street
Registered User
Join date: 1 Aug 2004
Posts: 71
|
07-03-2007 06:22
ok I'm trying to make a flying ghost. I need to apply impulse in a dynamic direction, So here is what I was trying.. doesnt seem to work though. startpos = llGetPos(); ^this part is in state entry everything below is in a timer target = llRot2Euler(llGetRot() * llRotBetween((<1,0,0>  * llGetRot(), startpos - llGetPos())); llApplyImpulse(target,FALSE); It applies the impulse and everything, there just seems to be no rhyme or reason to which way it decides to go which leads me to think that I overlooked something in the "target" equasion. Any help would be muchly appreciated =3 oh and I probably should have mentioned that the idea here is to make it apply impulse toward the "startpos" it gets in state entry when it either rezzes or the script resets.
|
|
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
|
07-03-2007 07:24
Well, the easiest thing to tell you is that when you have an issue like this, what I recommend is that prior to calling the llApplyImpulse command, you add an llOwnerSay((string)target); for debugging so you can see exactly what force it's applying. By looking at what you have there, it appears to me as if your results are going to be fairly odd and almost random in appearance. I stink at rotational math, however, so that may not be entirely true. I would also suggest if you haven't looked at: http://rpgstats.com/wiki/index.php?title=LlApplyImpulsethat you see if maybe that can't help work around the issue with what you get from the debugging lines.
|