These forums are CLOSED. Please visit the new forums HERE
Physical movement - Vehicle quirks? |
|
|
Hg Beeks
llGetElement(80);
Join date: 13 Apr 2006
Posts: 134
|
04-18-2007 01:34
Hey everyone. I've been hoping to start making a project that involves a physical object that moves about on its own; Since I have some experience with the vehicle system, I figured simply setting the item as a vehicle and making the movement motor pushes would work; However, it seems like it will not move unless there is an agent sitting on it; Is this true, or can I get around this?
|
|
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
|
04-18-2007 07:22
Vehicle movement works whether or not someone is sitting on it.
That is, it can be scripted to move on its own using vehicle physics. |
|
Hg Beeks
llGetElement(80);
Join date: 13 Apr 2006
Posts: 134
|
04-18-2007 13:22
Well, that's what I assumed... However, when I had a normal forward movement on a timer, it would only go forward when an agent was sitting on it, or right after it had been touched.
The front does have more prims than the back; Could it be causing unbalance that keeps it from moving? CODE
|
|
Hg Beeks
llGetElement(80);
Join date: 13 Apr 2006
Posts: 134
|
04-18-2007 17:26
No ideas? I've tried messing with the size of the base prim, but that didn't seem to help...
|
|
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
|
04-19-2007 13:02
I see you're having the vehicle "Driven" with a timer loop.
Reading your move() command, it looks like it's setting angular_motor to <0,0,0> since it's benig redefined everytime the command is given, and then it might subtract one from the z value, or it might not (if I'm reading the way the function is set up properly). Perhaps if you defined the angular_motor vector as a global variable so that it's value would persist between calls of the move() function it might work? also the first section of your if statement (less than 50) has a line that will be overridden by the second one. in effect you're doing: CODE
as you can see you're redefining the vehicle flag twice to two different values so the first call to define the flag isn't occuring at all. I don't have acess to SL at the moment, but this is how I would revise the move command and see if it works: CODE
_____________________
My SLExchange shop
Typos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not. The function is working perfectly fine. It's just not working the way you wanted it to work. |
|
Hg Beeks
llGetElement(80);
Join date: 13 Apr 2006
Posts: 134
|
04-20-2007 00:57
I see you're having the vehicle "Driven" with a timer loop. Reading your move() command, it looks like it's setting angular_motor to <0,0,0> since it's benig redefined everytime the command is given, and then it might subtract one from the z value, or it might not (if I'm reading the way the function is set up properly). Perhaps if you defined the angular_motor vector as a global variable so that it's value would persist between calls of the move() function it might work? also the first section of your if statement (less than 50) has a line that will be overridden by the second one. in effect you're doing: CODE
as you can see you're redefining the vehicle flag twice to two different values so the first call to define the flag isn't occuring at all. I don't have acess to SL at the moment, but this is how I would revise the move command and see if it works: CODE
The problem being that I have really very little idea of how vehicles work; I just lifted the lines from a vehicle script, to be honest. I thought that VEHICLE_ANGULAR_MOTOR_DIRE CTION controlled the turning, and VEHICLE_LINEAR_MOTOR_DIREC TION controlled forward/back movement. The idea here is that it has a 50 (-ish) percent chance of turning, and a 50(-ish) percent chance of just moving forward. The thing is, even just the moving forward doesn't work, which is why I'm confused. |
|
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
|
04-20-2007 01:00
The problem being that I have really very little idea of how vehicles work; I just lifted the lines from a vehicle script, to be honest. I thought that VEHICLE_ANGULAR_MOTOR_DIRE CTION controlled the turning, and VEHICLE_LINEAR_MOTOR_DIREC TION controlled forward/back movement. The idea here is that it has a 50 (-ish) percent chance of turning, and a 50(-ish) percent chance of just moving forward. The thing is, even just the moving forward doesn't work, which is why I'm confused. ah. vehicles are a fairly tricky thing to get a handle on, and I've found it fairly hard to get ahold of a heavily commented vehicle script that doesn't have so many bells and whistles you loose sight of the actual vehicle code. When I have time to log into SL (probably not till tomorrow), I'll try and dig up and/or write a bare bones vehicle script that does what you're trying to do and comment it heavily so you can see how it all works. _____________________
My SLExchange shop
Typos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not. The function is working perfectly fine. It's just not working the way you wanted it to work. |
|
Hg Beeks
llGetElement(80);
Join date: 13 Apr 2006
Posts: 134
|
04-20-2007 02:05
That'd be fantastically appreciated. I'm busy up through Sunday myself, only able to check in late at night, and sacrificing sleep time to do so. X3
|
|
Sterling Whitcroft
Registered User
Join date: 2 Jul 2006
Posts: 678
|
04-20-2007 15:45
Senuka,
That would be a TREMENDOUS contribution to the Scripts Library! hint, hint, hint ![]() |
|
Hg Beeks
llGetElement(80);
Join date: 13 Apr 2006
Posts: 134
|
08-07-2007 11:48
Figure I'll try to revive this thread, since my problem was never addressed. The only hint I seem to have is that it can only move when it's already moving - Touching it or sitting on it causes it to adjust for physics, and it then becomes mobile. If it's already moving when the next move is called, it will continue. However, the second it stops, it will not run.
|
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
08-07-2007 11:54
Figure I'll try to revive this thread, since my problem was never addressed. The only hint I seem to have is that it can only move when it's already moving - Touching it or sitting on it causes it to adjust for physics, and it then becomes mobile. If it's already moving when the next move is called, it will continue. However, the second it stops, it will not run. Try also subtly changing the color of one face of the prim, or anything else that forces an update to the viewer, when you update the motors. |
|
Hg Beeks
llGetElement(80);
Join date: 13 Apr 2006
Posts: 134
|
08-07-2007 21:41
I tired that, but didn't get any results. Thanks for the advice, though!
|