I'm using the caurina.transitions.Tweener; class with AS3 to tween a 3D object through my 3D environment (created with alternativa3D platform) from point A to point B. And everything works great, they move as intended from where they were to where I told them to go.
I was wondering if there was a way to make the object stop moving (or tweening) if the slope they were trying to walk over was too steep (like a giant hill or mountain in real life)?
This is basically the code I am using for this:
var playerDistance: Number = Vector3D.distance(
new Vector3D( _escapeeManager.activeEscapee.x,
_escapeeManager.activeEscapee.y,
_escapeeManager.activeEscapee.z ),
intersectData.point );
Tweener.addTween( _escapeeManager.activeEscapee, { x:intersectData.point.x, y:intersectData.point.y, time:(playerDistance/_escapeeManager.activeEscapee.speed), transition:"linear" } );
And if you'd like to see an example in the game I'm developing, it can be found here: http://redmenmusic.ca/godsend.html
Thanks for your help guys!