PDA

View Full Version : ope following the rider (by rotating)



IImayneII
06-04-2013, 03:53 PM
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.

dasraizer
06-04-2013, 04:16 PM
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.

IImayneII
06-04-2013, 04:56 PM
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.

SparkierJoNESZ
06-04-2013, 04:58 PM
https://docs.google.com/folder/d/0B1g45eEhm7-BUF9wanpFNXBkdkE/edit?docId=0B4h--wDXoFOjUkp4cjZuYVpwUjA

https://docs.google.com/drawings/d/1TcF1FtqGVtgXb_vK8gtebh4Iq_pAE15OSp9zsJtUypw/edit

some helpfull links that show what das is explaining

IImayneII
06-04-2013, 05:10 PM
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 http://forum.redlynx.com/forum/images/smilies/icon_lol.gif

BlastergamerX
06-05-2013, 02:35 PM
I just tested it and it works nicely. Thanks for the help. Didn't expect it was going to be this easy to do http://forum.redlynx.com/forum/images/smilies/icon_lol.gif
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.