constrain attribute truck x (real) to self position x constrain attribute truck y (real) to self position y
in the trailer actor
when key l is down constrain attribute self position x to truck x constrain attribute self position y to truck y
if you want the trailer to rotate with the truck:
in the truck actor
constrain attribute truck rotation (angle) to self rotation
in the trailer actor
constrain attribute self rotation to truck rotation
Cheers Liamo
p.s. This will make the trailer stick onto the truck completely, to make it off to the sides, in the constrain attribute expression editor say. self position x+your value.
PSS. you might not need the constrains for the 'Y'
Hey BranFliz, liamo was correct in one way, but when doing this... constrain attribute self position x to truck x it should be constrain attribute self position x to truck x + (truck.size.height/2 + a little more if you need), which will refer to the end point of the truck.
Comments
constrain attribute truck x (real) to self position x
constrain attribute truck y (real) to self position y
in the trailer actor
when key l is down
constrain attribute self position x to truck x
constrain attribute self position y to truck y
if you want the trailer to rotate with the truck:
in the truck actor
constrain attribute truck rotation (angle) to self rotation
in the trailer actor
constrain attribute self rotation to truck rotation
Cheers
Liamo
p.s. This will make the trailer stick onto the truck completely, to make it off to the sides, in the constrain attribute expression editor say.
self position x+your value.
PSS. you might not need the constrains for the 'Y'
~t
constrain attribute self position x to truck x
it should be
constrain attribute self position x to truck x + (truck.size.height/2 + a little more if you need), which will refer to the end point of the truck.
____________________________________
Follow Me On Twitter
Like Me On Facebook
Check Out My Site For Development Blogs