Finally i made offmeshlinks to work properly with animations, i used a curve to control the agents speed for more realistic velocity of the jumps. Pickable objects are still at a testing phase
since people asked for more explanation i'm pasting my answer from reddit for others to see
since people asked for more explanation i'm pasting my answer from reddit for others to see
all animations have curves in it and i linked the speed of the agent with them,so the velocity of the agent is not always the same and is more realistic, for example when you are going downwards you should move at a higher speed than when you are jumping upwards etc.
I don't use bi directional off mesh links because they tend not to work as expected, i had some problems with them in the past, so you will have to make one for every each one direction, then have every direction with a tag to play the animation you want.
Now my real problem was that most animations are heavily unoptimized (thus the name Raw MoCap i guess) so the root sometimes flies away, to tackle this i chopped most animations to 2-3 parts and have the root to the apropriate place, always leaving the transition to the final part (the landing) to be decided from a boolean which is turned on when the agent reaches the end transform.
Curves are pro only though, or you can use only one in the free version i don't really know. So if you don't have them you can fake them by adjusting the speed overtime, but this would mean that you will need to have every offmeshlink of the same type at the same length (it's easier than it sounds but it's not easier than using curves).
I hope i was clear enough, if not tell me and i'll paste a sample code
Δεν υπάρχουν σχόλια:
Δημοσίευση σχολίου