Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Works-In-Progress (http://www.alice.org/community/forumdisplay.php?f=14)
-   -   position cars at start (http://www.alice.org/community/showthread.php?t=4068)

captain 03-12-2010 11:23 AM

position cars at start
 
1 Attachment(s)
i have a road floating in space and 4 cars on it. this road has 4 lanes, 1 for each car in the starting block. at runtime i stretch the road to 1000's of metres and then try to position the cars at the start using relative positioning. i cant get the cars where i want them.

x2495iiii 03-12-2010 12:13 PM

Two ways you could do that:

-Vehicle the cars to the road. If they're positioned right, they should move with the edge of the road as it stretches

-At runtime, have the cars move to the center of the road, then move backwards the road's length minus the car's length (length functions can be found under each object's functions tab on the center-left side of the screen).

captain 03-12-2010 12:44 PM

[QUOTE=x2495iiii;18353]Two ways you could do that:

-Vehicle the cars to the road. If they're positioned right, they should move with the edge of the road as it stretches

-At runtime, have the cars move to the center of the road, then move backwards the road's length minus the car's length (length functions can be found under each object's functions tab on the center-left side of the screen).[/QUOTE]

1 vehicle might work but i must have the cars in exactly the right positions. and i probably cant get them there.

2 do you mean half the roads length? well i also must move the car up after that so it sits on the the road instead of half above and half below.

you take the attached a2w and see if you can position the myCar to the left lane of the road, at the back.


All times are GMT -5. The time now is 09:37 AM.

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.