1. #1
    IImayneII's Avatar Senior Member
    Join Date
    Mar 2014
    Posts
    1,060

    ope following the rider (by rotating)

    I want to make the same effect as the custom camera's do when you set them to follow the rider (the camera always points to the rider depending on it's position)

    So, I have a static object placed alongside the driving line (let's say 2 meters offset to the dl). I want the object to follow the rider (who is on a certain point on the dl) by rotating, during a certain period (1 second). So the front of the object always follows the rider depending on his position on the driving line. Is there an easy way to do this? I guess it is maybe possible with some math but I don't want to spend hours on something I don't know is going to work like I want it to.
    Share this post

  2. #2
    dasraizer's Avatar Senior Member
    Join Date
    Apr 2014
    Location
    UK, Isle of Wight
    Posts
    1,195

    Re: ope following the rider (by rotating)

    hi, if your not looking for a maths solution, by far the easiest way to do this is to use the custom camera.

    place the camera where the object is and turn its activation distance right down (or try unchecking disable, it may still track)

    use object info set on Yaw/Pitch/Bank and then use these in an OPE with local rotation unchecked and set rotation checked

    the tracking object will most likely need to be glued to a pivot. this is so you can match the objects rotation to the rotation data from the info sources to the objects natural rotation, to do this open the object menu and select the glue pivot, open the glue properties and set it to custom and then place it in the world, now reselect the pivot and in its properties go to choose members and select the tracking object. now just move the pivot so its at the point you want the object to rotate and move the tracking object to the same location, target it with the OPE, do a quick test to see if the rotation is correct, if not, object select the tracking object (ie not with pivot, bumper select on xbox) and rotate it about the pivot, it may take some trial and error to get it, but should work well.

    for timed tracking, i'd use an area trigger and under advance settings use the impulses generated from the On Active and target the OPE, now all you need to do is set the area triggers size you want the bike to be inside this activation zone.
    Share this post

  3. #3
    IImayneII's Avatar Senior Member
    Join Date
    Mar 2014
    Posts
    1,060

    Re: ope following the rider (by rotating)

    Thanks for the detailed information. I'll definitly try that, looks fairly easy to do so I'll see pretty fast if it works or not.
    Share this post

  4. #4

    Re: ope following the rider (by rotating)

    Share this post

  5. #5
    IImayneII's Avatar Senior Member
    Join Date
    Mar 2014
    Posts
    1,060

    Re: ope following the rider (by rotating)

    Originally Posted by sparkierjonesz
    some helpfull links that show what das is explaining
    Thanks man, I looked in the google docs but I guess I missed it.

    I just tested it and it works nicely. Thanks for the help. Didn't expect it was going to be this easy to do
    Share this post

  6. #6
    Blastergamer's Avatar Senior Member
    Join Date
    Mar 2014
    Location
    Rocking Trials Country
    Posts
    2,539

    Re: ope following the rider (by rotating)

    Originally Posted by basslineux001
    I just tested it and it works nicely. Thanks for the help. Didn't expect it was going to be this easy to do
    oh, as additional, also add Z rotation to the OPE, and use a glue pivot which the rotation X,Y and Z is at Global 0 coordinate.
    I'll edit that tut now.
    Share this post