Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: FogGobbler on February 27, 2009, 01:06:50 PM

Title: Distance between actor and object?
Post by: FogGobbler on February 27, 2009, 01:06:50 PM
Hi!

Is there a way to find out the distance between the 3D actor and a hotspot-region (GoToObject-Position)?

That could come in quite handy, because then the character could automatically run to an object, if the distance is large.

Oli
Title: Re: Distance between actor and object?
Post by: Mnemonic on February 27, 2009, 02:25:24 PM
Direct distance can be calculated as vector length. As described here: http://forum.dead-code.org/index.php?topic=2808.msg17747#msg17747