This is for racer v0.8.33 and up !!!
Movables in Racer are objects that are dynamic, so they can move, bounce, ...
There are 4 types of movables in Racer:
- Physics object
- Skinned mesh with bone animation
- Skinned mesh with bone physics (ragdoll)
- Skinned mesh with bone physics AND bone animation
for more information, take a look at: http://www.racer.nl/reference/animation.htm
Car movables are just like movables on a track.
The only difference is that their position is locked to the the car. So you can have all kinds of fun with it.
Convertible roofs, passengers, ...
Movables with physics dont make much sense since they will not follow the car's position (unless they have a joint connection with the car, but that requires scripting).
Only the animated movables will follow the car !
The best way to create your car-movable (skinned object) is to follow the steps to add a movable on a track (http://racer.nl/tutorial/animation.html ), and when all goes well, paste all the data to your car.
Follow the steps to add movables to a track described in the tutorial.
Now copy all the data from the track's geometry.ini to car.ini.
copy the tree of the movable and paste it in car.ini.
The name of the tree changes to model< n > and the tree must be located under 'graphics.movable'
for example:
copy the above and paste it in car.ini
Now add the following script in <cardir>/scripts/paint
create a file movable.rsx and paste this code in the file
Add your shader data to car.shd .. and voila ! You should have (in my case) a dancing guy on the top of the roof of a lambo.
Hoora !
Movables in Racer are objects that are dynamic, so they can move, bounce, ...
There are 4 types of movables in Racer:
- Physics object
- Skinned mesh with bone animation
- Skinned mesh with bone physics (ragdoll)
- Skinned mesh with bone physics AND bone animation
for more information, take a look at: http://www.racer.nl/reference/animation.htm
Car movables are just like movables on a track.
The only difference is that their position is locked to the the car. So you can have all kinds of fun with it.
Convertible roofs, passengers, ...
Movables with physics dont make much sense since they will not follow the car's position (unless they have a joint connection with the car, but that requires scripting).
Only the animated movables will follow the car !
The best way to create your car-movable (skinned object) is to follow the steps to add a movable on a track (http://racer.nl/tutorial/animation.html ), and when all goes well, paste all the data to your car.
Follow the steps to add movables to a track described in the tutorial.
Now copy all the data from the track's geometry.ini to car.ini.
copy the tree of the movable and paste it in car.ini.
The name of the tree changes to model< n > and the tree must be located under 'graphics.movable'
for example:
Code:
; geomtrey.ini of a random track with a movables entry
objects
{
danceguy02
{
file=danceguy02.dof
flags=1024
type=4
trans_movable_to_zero=0
rot_dyn
{
x=0.000000
y=0.000000
z=0.000000
w=1.000000
}
offset_dyn
{
x=-93.354500
y=1.264354
z=-196.168533
}
group=0
}
}
Code:
graphics
{
movable
{
model0
{
file=danceguy02.dof
trans_movable_to_zero=0
type=4
offset_dyn
{
x=0.0
y=2.0
z=0.0
}
}
}
}
create a file movable.rsx and paste this code in the file
Code:
wait 5000
set kill after run 1
rcar $car=get local car
rmovable $mov = get $car movable 0
command $mov do "play 0"
Hoora !