|
Ernst Osterham
Registered User
Join date: 29 Oct 2008
Posts: 26
|
07-03-2009 16:45
I'm trying to make a ground vehicle that doesn't move, but can rotate either side to side or tilt up and down (like a gun barrel) only I'm somehow not able to get this behavior. Is what I'm looking for possible or can vehicles only affect one axis of rotation?
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
07-03-2009 17:08
if it's not moving position (just rotation) the vehicle functions may not be the way to go... llRotLookAt and take controls may be a better option for you.
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
07-04-2009 00:55
Yeah. Just set the angular motor parameters (you can use them to rotate about any axis). You might want to turn off banking and the vertical attractor and all of that.
|
|
Ernst Osterham
Registered User
Join date: 29 Oct 2008
Posts: 26
|
07-04-2009 23:39
I actually tried llRotLookAt, the problem is that when in mouselook it is so twitchy it pretty much starts a feedback loop where the gun is impossible to control as any movement just feeds on itself via llRotLookAt until the entire thing is spinning out of control.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
07-05-2009 03:15
From: Ernst Osterham I actually tried llRotLookAt, the problem is that when in mouselook it is so twitchy it pretty much starts a feedback loop where the gun is impossible to control as any movement just feeds on itself via llRotLookAt until the entire thing is spinning out of control. odd but understandable... perhaps a lower poling interval on the not_at portion (forcibly slowed by llSleep... I'm not great with vehicle functions, so I can't say, but heewees suggestion looks sound.
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Ernst Osterham
Registered User
Join date: 29 Oct 2008
Posts: 26
|
07-05-2009 12:04
Ok, I've been trying llRotLookAt some more, and what I'm trying to do is only rotate the gun on its local y axis, that seems like it would make it much more stable. Unfortunately the code I have doesn't seem to work quite right. Is there a way to do this without converting the rotations into euler form and back again? I have a feeling that is what is screwing it up. I keep trying to post the code I have here but for some reason every time I do so I get an error when hitting "submit reply."
|
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
07-05-2009 12:23
From: Ernst Osterham I keep trying to post the code I have here but for some reason every time I do so I get an error when hitting "submit reply." The SL forums cough up if they encounter certain embargoed word pairs in a post. They also have a fit if you try to post the characters " < " or " > " without spaces around them. That is very annoying if you are posting a script with vectors in it. 
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....  Look for my work in XStreetSL at 
|